This commit is contained in:
hathach committed 2019-09-18 11:57:49 +07:00
1 parent d900149a61
commit d2fb5785dd
2 files changed
+4 -12

No files matched your search

+1 -1
View File
@@ -56,7 +56,7 @@ static void loop_task(void* arg)
while (1)
{
loop();
yield(); // yield run usb background task
yield(); // yield to run other task
// Serial events
if (serialEvent && serialEventRun) serialEventRun();
+3 -11
View File
@@ -66,12 +66,6 @@ enum
#define tick2us(tck) ( ( ((uint64_t)(tck)) * 1000000) / configTICK_RATE_HZ )
#define malloc_type(type) rtos_malloc( sizeof(type) )
#if 0
#define rtos_malloc(_size) ({ printf("[malloc] %s:%d : %d bytes\r\n", __PRETTY_FUNCTION__, __LINE__, _size); pvPortMalloc(_size); })
#define rtos_free(ptr) ({ printf("[free] %s:%d\r\n" ,__PRETTY_FUNCTION__, __LINE__/*malloc_usable_size(ptr)*/); vPortFree(ptr); })
#else
#define rtos_malloc_type(_type) (_type*) rtos_malloc(sizeof(_type))
static inline void* rtos_malloc(size_t _size)
@@ -84,9 +78,8 @@ static inline void rtos_free( void *pv )
return (xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED) ? free(pv) : vPortFree(pv);
}
#endif
#ifdef __cplusplus // Visible only with cplusplus
// Visible only with C++
#ifdef __cplusplus
#define SCHEDULER_STACK_SIZE_DFLT (512*2)
@@ -106,7 +99,6 @@ public:
extern SchedulerRTOS Scheduler;
#endif
#endif // __cplusplus
#endif /* RTOS_H_ */