Miscellaneous libraries.
More...
|
#define | SIZEOF_ARRAY(arr) (sizeof((arr)) / sizeof((arr)[0])) |
|
#define | SIZEOF_FIELD(type, field) (sizeof(((type *)0)->field)) |
|
#define | SWAP_UINT16(x) (uint16_t)(((uint16_t)(x) >> 8) | ((uint16_t)(x) << 8)) |
|
#define | STRINGIFY_(x) #x |
|
#define | STRINGIFY(x) STRINGIFY_(x) |
|
#define | MIN(a, b) |
|
#define | MAX(a, b) |
|
#define | TEST_ASSERT_OK(code) TEST_ASSERT_EQUAL(STATUS_CODE_OK, (code)) |
|
#define | TEST_ASSERT_NOT_OK(code) TEST_ASSERT_NOT_EQUAL(STATUS_CODE_OK, (code)) |
|
#define | TEST_MOCK(func) __attribute__((used)) __wrap_##func |
|
#define | TEST_CASE(...) |
|
#define | TEST_PRE_TASK |
|
#define | TEST_IN_TASK |
|
Miscellaneous libraries.
◆ MAX
Value: ({ \
__typeof__(a) _a = (a); \
__typeof__(b) _b = (b); \
_a > _b ? _a : _b; \
})
◆ MIN
Value: ({ \
__typeof__(a) _a = (a); \
__typeof__(b) _b = (b); \
_a < _b ? _a : _b; \
})
◆ test_helpers_end_get_semphr()
uint8_t test_helpers_end_get_semphr |
( |
void |
| ) |
|
Gets the semaphore for the test end.
- Returns
- Value from 0-10
◆ test_helpers_end_give_semphr()
Gives the test end semaphore.
- Returns
- STATUS_CODE_OK if the semaphore was given successfully STATUS_CODE_INTERNAL_ERROR if it fails
◆ test_helpers_end_take_semphr()
Takes the test end semaphore.
- Returns
- STATUS_CODE_OK if the semaphore was successfully taken STATUS_CODE_INTERNAL_ERROR if it fails
◆ test_helpers_start_get_semphr()
uint8_t test_helpers_start_get_semphr |
( |
void |
| ) |
|
Gets the semaphore for the test start.
- Returns
- Value from 0-10
◆ test_helpers_start_give_semphr()
StatusCode test_helpers_start_give_semphr |
( |
void |
| ) |
|
Gives the test start semaphore.
- Returns
- STATUS_CODE_OK if the semaphore was given successfully STATUS_CODE_INTERNAL_ERROR if it fails
◆ test_helpers_start_take_semphr()
StatusCode test_helpers_start_take_semphr |
( |
void |
| ) |
|
Takes the test start semaphore.
- Returns
- STATUS_CODE_OK if the semaphore was successfully taken STATUS_CODE_INTERNAL_ERROR if it fails