diff options
| author | Yaochenger <[email protected]> | 2023-03-02 22:17:43 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-02 09:17:43 -0500 |
| commit | 95540854a669bffd29ed7bde05d4a12addd43319 (patch) | |
| tree | 6166cd9a44cc733fbfc5c5621a73d6264b27d4d5 /libcpu | |
| parent | fc2e122ee291ee4240305e9f795e4eb274c80705 (diff) | |
[libcpu/riscv]迁移libcpu/riscv/ch32中文件至bsp (#7004)
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/risc-v/ch32/SConscript | 12 | ||||
| -rw-r--r-- | libcpu/risc-v/ch32/software_irq.c | 41 |
2 files changed, 0 insertions, 53 deletions
diff --git a/libcpu/risc-v/ch32/SConscript b/libcpu/risc-v/ch32/SConscript deleted file mode 100644 index ccd26ae518..0000000000 --- a/libcpu/risc-v/ch32/SConscript +++ /dev/null @@ -1,12 +0,0 @@ -# RT-Thread building script for component - -from building import * - -cwd = GetCurrentDir() -src = Glob('*.c') + Glob('*.cpp') + Glob('*_gcc.S') -CPPPATH = [cwd] -ASFLAGS = ' -I ' + cwd - -group = DefineGroup('CPU', src, depend = [''], CPPPATH = CPPPATH, ASFLAGS = ASFLAGS) - -Return('group') diff --git a/libcpu/risc-v/ch32/software_irq.c b/libcpu/risc-v/ch32/software_irq.c deleted file mode 100644 index e91a588312..0000000000 --- a/libcpu/risc-v/ch32/software_irq.c +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2006-2018, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: - * Date Author Notes - * 2021-09-09 WCH the first version - * 2023-01-04 WangShun Remove redundant files - */ -#include "rtconfig.h" -#if defined (SOC_RISCV_SERIES_CH32V1) -#include "ch32v10x.h" -#elif defined (SOC_RISCV_SERIES_CH32V2) -#include "ch32v20x.h" -#elif defined (SOC_RISCV_SERIES_CH32V3) -#include "ch32v30x.h" -#else -#error "CH32 architecture doesn't support!" -#endif -void rt_trigger_software_interrupt(void) -{ - /*CH32V103 does not support systick software interrupt*/ -#if defined(SOC_RISCV_SERIES_CH32V1) - NVIC_SetPendingIRQ(Software_IRQn); -#else - SysTick->CTLR |= (1 << 31); -#endif -} - -void rt_hw_do_after_save_above(void) -{ - __asm volatile ("li t0,0x20" ); - __asm volatile ("csrs 0x804, t0"); - /*CH32V103 does not support systick software interrupt*/ -#if defined(SOC_RISCV_SERIES_CH32V1) - NVIC_ClearPendingIRQ(Software_IRQn); -#else - SysTick->CTLR &= ~(1 << 31); -#endif -}
\ No newline at end of file |
