separate idle hook
This commit is contained in:
parent
3aa9796496
commit
e05186dd95
10
src/idle.c
10
src/idle.c
|
@ -30,8 +30,14 @@
|
||||||
#include <rthw.h>
|
#include <rthw.h>
|
||||||
#include <rtthread.h>
|
#include <rtthread.h>
|
||||||
|
|
||||||
|
#if defined (RT_USING_HOOK)
|
||||||
|
#ifndef RT_USING_IDLE_HOOK
|
||||||
|
#deifne RT_USING_IDLE_HOOK 1
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef IDLE_THREAD_STACK_SIZE
|
#ifndef IDLE_THREAD_STACK_SIZE
|
||||||
#if defined (RT_USING_HOOK) || defined(RT_USING_HEAP)
|
#if defined (RT_USING_IDLE_HOOK) || defined(RT_USING_HEAP)
|
||||||
#define IDLE_THREAD_STACK_SIZE 256
|
#define IDLE_THREAD_STACK_SIZE 256
|
||||||
#else
|
#else
|
||||||
#define IDLE_THREAD_STACK_SIZE 128
|
#define IDLE_THREAD_STACK_SIZE 128
|
||||||
|
@ -44,7 +50,7 @@ static rt_uint8_t rt_thread_stack[IDLE_THREAD_STACK_SIZE];
|
||||||
|
|
||||||
extern rt_list_t rt_thread_defunct;
|
extern rt_list_t rt_thread_defunct;
|
||||||
|
|
||||||
#ifdef RT_USING_HOOK
|
#ifdef RT_USING_IDLE_HOOK
|
||||||
static void (*rt_thread_idle_hook)();
|
static void (*rt_thread_idle_hook)();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue