Commits (2)
......@@ -6,19 +6,6 @@
#include <capture.h>
#define CAPTURE_PRV
#include <capture_prv.h>
/*@
requires \valid(t);
behavior isInit:
assumes ((struct capture_generic *) t)->init == true;
ensures \result == CAPTURE_ALREDY_INITED;
assigns \nothing;
behavior isNotInit:
assumes ((struct capture_generic *) t)->init == false;
ensures ((struct capture_generic *) t)->init == true;
ensures \result == 0;
assigns ((struct capture_generic *) t)->init;
disjoint behaviors;
*/
int32_t capture_generic_init(struct capture *t) {
struct capture_generic *capture = (struct capture_generic *) t;
if (hal_isInit(capture)) {
......
......@@ -22,7 +22,7 @@
* \{
*/
#ifdef CONFIG_USE_STATIC
# define OS_DEFINE_TASK(name, stackSize) StaticTask_t name##_buffer; StackType_t ALIGN(portBYTE_ALIGNMENT) name##_stack[stackSize]; TaskHandle_t name
# define OS_DEFINE_TASK(name, stackSize) StaticTask_t name##_buffer; StackType_t ALIGN(portBYTE_ALIGNMENT) name##_stack[((stackSize < CONFIG_MINIMAL_STACK_SIZE) ? CONFIG_MINIMAL_STACK_SIZE : stackSize)]; TaskHandle_t name
# define OS_DEFINE_QUEUE(name, length, size) StaticQueue_t name##_buffer; uint8_t name##_storage[length * size]; QueueHandle_t name
# define OS_DEFINE_TIMER(name) StaticTimer_t name##_buffer; TimerHandle_t name
# define OS_DEFINE_EVENT_GROUP(name) StaticEventGroup_t name##_buffer; EventGroupHandle_t name
......@@ -34,7 +34,7 @@
# define OS_CREATE_TASK(function, name, stackSize, parameter, prio, handleName) (\
{\
BaseType_t ret; \
handleName = xTaskCreateStatic(function, name, stackSize, parameter, prio, handleName##_stack, &handleName##_buffer); \
handleName = xTaskCreateStatic(function, name, ((stackSize < CONFIG_MINIMAL_STACK_SIZE) ? CONFIG_MINIMAL_STACK_SIZE : stackSize), parameter, prio, handleName##_stack, &handleName##_buffer); \
ret = (handleName == NULL) ? errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY : pdPASS; \
ret;\
}\
......@@ -58,7 +58,7 @@
# define OS_DEFINE_MUTEX(name) OS_DEFINE_SEMARPHORE(name)
# define OS_DEFINE_MUTEX_RECURSIVE(name) OS_DEFINE_SEMARPHORE(name)
# define OS_CREATE_TASK(function, name, stackSize, parameter, prio, handleName) xTaskCreate(function, name, stackSize, parameter, prio, &handleName)
# define OS_CREATE_TASK(function, name, stackSize, parameter, prio, handleName) xTaskCreate(function, name, ((stackSize < CONFIG_MINIMAL_STACK_SIZE) ? CONFIG_MINIMAL_STACK_SIZE : stackSize), parameter, prio, &handleName)
# define OS_CREATE_QUEUE(length, size, handleName) xQueueCreate(length, size)
# define OS_CREATE_TIMER(name, period, autoReload, timerID, function, handleName) xTimerCreate(name,period, autoReload, timerID, function)
# define OS_CREATE_EVENT_GROUP(handleName) xEventGroupCreate()
......