Switch to CMake

This commit is contained in:
Bertrand Songis
2015-12-21 23:43:18 +01:00
parent c8358d7e37
commit 88841f63ca
94 changed files with 1553 additions and 956 deletions
+29 -1
View File
@@ -43,6 +43,19 @@ extern "C" {
}
#endif
#define MENUS_STACK_SIZE 2000
#define MIXER_STACK_SIZE 500
#define AUDIO_STACK_SIZE 500
#define BLUETOOTH_STACK_SIZE 500
#if defined(_MSC_VER)
#define _ALIGNED(x) __declspec(align(x))
#elif defined(__GNUC__)
#define _ALIGNED(x) __attribute__ ((aligned(x)))
#endif
uint16_t getStackAvailable(void * address, uint16_t size);
template<int SIZE>
class TaskStack
{
@@ -50,7 +63,10 @@ class TaskStack
TaskStack() { }
void paint();
uint16_t size();
uint16_t available();
uint16_t available()
{
return getStackAvailable(stack, SIZE);
}
OS_STK stack[SIZE];
};
@@ -58,4 +74,16 @@ void stackPaint();
uint16_t stackSize();
uint16_t stackAvailable();
extern OS_TID menusTaskId;
// menus stack must be aligned to 8 bytes otherwise printf for %f does not work!
extern TaskStack<MENUS_STACK_SIZE> _ALIGNED(8) menusStack;
extern OS_TID mixerTaskId;
extern TaskStack<MIXER_STACK_SIZE> mixerStack;
extern OS_TID audioTaskId;
extern TaskStack<AUDIO_STACK_SIZE> audioStack;
void tasksStart();
#endif // _TASKS_ARM_H_