test/embedded: fix compile

This commit is contained in:
Matthias Ringwald 2019-09-23 14:44:03 +02:00
parent 464d3e4332
commit 108ce72e4d
5 changed files with 69 additions and 0 deletions

1
test/embedded/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*_test

9
test/embedded/FreeRTOS.h Normal file
View File

@ -0,0 +1,9 @@
#define configSUPPORT_STATIC_ALLOCATION 1
#define INCLUDE_xEventGroupSetBitFromISR 1
// dummy typedefs to make it compile
#define pdTRUE 1
#define pdFALSE 0
#define portMAX_DELAY 0xffffffff

View File

@ -0,0 +1,22 @@
typedef int EventGroupHandle_t;
typedef int EventBits_t;
typedef int BaseType_t;
typedef int TickType_t;
EventGroupHandle_t xEventGroupCreate( void );
EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToSet );
BaseType_t xEventGroupSetBitsFromISR(
EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToSet,
BaseType_t *pxHigherPriorityTaskWoken );
EventBits_t xEventGroupWaitBits(
const EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToWaitFor,
const BaseType_t xClearOnExit,
const BaseType_t xWaitForAllBits,
TickType_t xTicksToWait );

35
test/embedded/queue.h Normal file
View File

@ -0,0 +1,35 @@
#include <stdint.h>
typedef int StaticQueue_t;
typedef int QueueHandle_t;
typedef int BaseType_t;
typedef unsigned int UBaseType_t;
typedef int TickType_t;
#define pdMS_TO_TICKS(ms) ms
BaseType_t xQueueSendToBack(
QueueHandle_t xQueue,
const void * pvItemToQueue,
TickType_t xTicksToWait
);
BaseType_t xQueueSendToBackFromISR
(
QueueHandle_t xQueue,
const void *pvItemToQueue,
BaseType_t *pxHigherPriorityTaskWoken
);
BaseType_t xQueueReceive(
QueueHandle_t xQueue,
void *pvBuffer,
TickType_t xTicksToWait
);
QueueHandle_t xQueueCreateStatic(
UBaseType_t uxQueueLength,
UBaseType_t uxItemSize,
uint8_t *pucQueueStorageBuffer,
StaticQueue_t *pxQueueBuffer );

2
test/embedded/task.h Normal file
View File

@ -0,0 +1,2 @@
typedef int TaskHandle_t;
TaskHandle_t xTaskGetCurrentTaskHandle( void );