diff --git a/board/Microchip_M2S010/BSP/Inc/config.h b/board/Microchip_M2S010/BSP/Inc/config.h deleted file mode 100644 index fc189395fd8545803ad72fdea2e6b5112ac896d2..0000000000000000000000000000000000000000 --- a/board/Microchip_M2S010/BSP/Inc/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) 2006-2020, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: - * Date Author Notes - * 2020-08-06 whik first version - */ -#ifndef __CONFIG_H__ -#define __CONFIG_H__ - -#include "mss_gpio.h" -#include "mss_uart.h" - -#include -#include - -void sw0_isr(void *args); -void sw1_isr(void *args); -void boardInit(void); -void sayHello(void); - -#endif diff --git a/board/Microchip_M2S010/BSP/Inc/mcu_init.h b/board/Microchip_M2S010/BSP/Inc/mcu_init.h index ae846b737b543879b8715b62862ffe71ce34c1ad..0e604d884675e044e762582209b8973644a2ca9e 100644 --- a/board/Microchip_M2S010/BSP/Inc/mcu_init.h +++ b/board/Microchip_M2S010/BSP/Inc/mcu_init.h @@ -12,8 +12,4 @@ void board_init(void); -#ifdef __cplusplus -} -#endif - #endif /* _MCU_INIT_H_ */ diff --git a/board/Microchip_M2S010/BSP/Src/board.c b/board/Microchip_M2S010/BSP/Src/board.c deleted file mode 100644 index a024a8b167c0304393d95c6a7cc559509ef6e74d..0000000000000000000000000000000000000000 --- a/board/Microchip_M2S010/BSP/Src/board.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2006-2020, RT-Thread Development Team - * - * SPDX-License-Identifier: Apache-2.0 - * - * Change Logs: - * Date Author Notes - * 2020-08-06 whik first version - */ - -#include -#include -#include - -#define _SCB_BASE (0xE000E010UL) -#define _SYSTICK_CTRL (*(rt_uint32_t *)(_SCB_BASE + 0x0)) -#define _SYSTICK_LOAD (*(rt_uint32_t *)(_SCB_BASE + 0x4)) -#define _SYSTICK_VAL (*(rt_uint32_t *)(_SCB_BASE + 0x8)) -#define _SYSTICK_CALIB (*(rt_uint32_t *)(_SCB_BASE + 0xC)) -#define _SYSTICK_PRI (*(rt_uint8_t *)(0xE000ED23UL)) - -extern void SystemCoreClockUpdate(void); -extern uint32_t SystemCoreClock; - -static uint32_t _SysTick_Config(rt_uint32_t ticks) -{ - if ((ticks - 1) > 0xFFFFFF) - { - return 1; - } - - _SYSTICK_LOAD = ticks - 1; - _SYSTICK_PRI = 0xFF; - _SYSTICK_VAL = 0; - _SYSTICK_CTRL = 0x07; - - return 0; -} - -#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP) -#define RT_HEAP_SIZE 1024 -static uint32_t rt_heap[RT_HEAP_SIZE]; // heap default size: 4K(1024 * 4) -RT_WEAK void *rt_heap_begin_get(void) -{ - return rt_heap; -} - -RT_WEAK void *rt_heap_end_get(void) -{ - return rt_heap + RT_HEAP_SIZE; -} -#endif - -/* This function will initial your board. */ -void rt_hw_board_init() -{ - /* System Clock Update */ - SystemCoreClockUpdate(); - - /* System Tick Configuration */ - _SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND); - - /* Call components board initial (use INIT_BOARD_EXPORT()) */ -#ifdef RT_USING_COMPONENTS_INIT - rt_components_board_init(); -#endif - -#ifdef RT_USING_CONSOLE - rt_console_set_device(RT_CONSOLE_DEVICE_NAME); -#endif - -#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP) - rt_system_heap_init(rt_heap_begin_get(), rt_heap_end_get()); -#endif -} - -void SysTick_Handler(void) -{ - /* enter interrupt */ - rt_interrupt_enter(); - - rt_tick_increase(); - - /* leave interrupt */ - rt_interrupt_leave(); -}