mirror of
https://github.com/hathach/tinyusb.git
synced 2025-01-31 05:52:55 +08:00
remove cmsis rtx support
This commit is contained in:
parent
65a076f198
commit
45ea2ff358
@ -71,11 +71,19 @@ void led_blinking_set_interval(uint32_t ms)
|
||||
led_blink_interval_ms = ms;
|
||||
}
|
||||
|
||||
tusb_error_t led_blinking_subtask(void);
|
||||
void led_blinking_task(void* param)
|
||||
{
|
||||
(void) param;
|
||||
|
||||
OSAL_TASK_LOOP_BEGIN
|
||||
led_blinking_subtask();
|
||||
OSAL_TASK_LOOP_END
|
||||
}
|
||||
|
||||
tusb_error_t led_blinking_subtask(void)
|
||||
{
|
||||
OSAL_SUBTASK_BEGIN
|
||||
|
||||
static uint32_t led_on_mask = 0;
|
||||
|
||||
@ -92,7 +100,7 @@ void led_blinking_task(void* param)
|
||||
// if ( BIT_TEST_(btn_mask, i) ) printf("button %d is pressed\n", i);
|
||||
// }
|
||||
|
||||
OSAL_TASK_LOOP_END
|
||||
OSAL_SUBTASK_END
|
||||
}
|
||||
|
||||
// TODO remove legacy cmsis code
|
||||
|
@ -50,8 +50,6 @@
|
||||
#define LOWER_PRIO(x) 0 // does not matter
|
||||
#elif TUSB_CFG_OS == TUSB_OS_FREERTOS
|
||||
#define LOWER_PRIO(x) ((x)-1) // freeRTOS lower number --> lower priority
|
||||
#elif TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
|
||||
#define LOWER_PRIO(x) ((x)-1) // CMSIS-RTOS lower number --> lower priority
|
||||
#else
|
||||
#error Priority is not configured for this RTOS
|
||||
#endif
|
||||
|
@ -79,10 +79,6 @@ void os_none_start_scheduler(void)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#if TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
|
||||
osKernelInitialize(); // CMSIS RTX requires kernel init before any other OS functions
|
||||
#endif
|
||||
|
||||
board_init();
|
||||
print_greeting();
|
||||
|
||||
@ -101,8 +97,6 @@ int main(void)
|
||||
vTaskStartScheduler();
|
||||
#elif TUSB_CFG_OS == TUSB_OS_NONE
|
||||
os_none_start_scheduler();
|
||||
#elif TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
|
||||
osKernelStart();
|
||||
#else
|
||||
#error need to start RTOS schduler
|
||||
#endif
|
||||
@ -119,7 +113,6 @@ void print_greeting(void)
|
||||
{
|
||||
[TUSB_OS_NONE] = "None",
|
||||
[TUSB_OS_FREERTOS] = "FreeRTOS",
|
||||
[TUSB_OS_CMSIS_RTX] = "CMSIS-RTX"
|
||||
};
|
||||
|
||||
printf("\n\
|
||||
|
@ -51,8 +51,6 @@
|
||||
* @{ */
|
||||
#define TUSB_OS_NONE 1 ///< No RTOS is used
|
||||
#define TUSB_OS_FREERTOS 2 ///< FreeRTOS is used
|
||||
#define TUSB_OS_CMSIS_RTX 3 ///< CMSIS RTX is used
|
||||
#define TUSB_OS_UCOS3 4 ///< MicroC OS III is used (not supported yet)
|
||||
/** @} */
|
||||
|
||||
#include "tusb_option.h"
|
||||
@ -71,8 +69,6 @@ static inline bool osal_task_create(osal_func_t code, const char* name, uint32_t
|
||||
#else
|
||||
#if TUSB_CFG_OS == TUSB_OS_FREERTOS
|
||||
#include "osal_freeRTOS.h"
|
||||
#elif TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
|
||||
#include "osal_cmsis_rtx.h"
|
||||
#else
|
||||
#error TUSB_CFG_OS is not defined or OS is not supported yet
|
||||
#endif
|
||||
|
@ -69,7 +69,6 @@ static inline bool osal_task_create(osal_func_t code, const char* name, uint32_t
|
||||
return xTaskCreate(code, (const signed char*) name, stack_size, param, prio, task_hdl);
|
||||
}
|
||||
|
||||
static inline void osal_task_delay(uint32_t msec) ATTR_ALWAYS_INLINE;
|
||||
static inline void osal_task_delay(uint32_t msec)
|
||||
{
|
||||
vTaskDelay( (TUSB_CFG_TICKS_HZ * msec) / 1000 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user