Macros | |
#define | APP_ATFIFO_BUF_NAME(fifo_id) CONCAT_2(fifo_id, _data) |
Macro to generate the name for data buffer. More... | |
#define | APP_ATFIFO_INST_NAME(fifo_id) CONCAT_2(fifo_id, _inst) |
Macro to generate the name for FIFO instance. More... | |
#define | APP_ATFIFO_DEF(fifo_id, storage_type, item_cnt) |
Instance creation macro. More... | |
#define | APP_ATFIFO_INIT(fifo_id) |
Use this macro to initialize FIFO declared previously by the macro. More... | |
A group of macros helpful for FIFO instance creation and initialization. They may be used to create and initialize instances for most use cases.
FIFO may also be created and initialized directly using app_atfifo_init function.
#define APP_ATFIFO_BUF_NAME | ( | fifo_id | ) | CONCAT_2(fifo_id, _data) |
Macro to generate the name for data buffer.
The name of the data buffer that would be created by APP_ATFIFO_DEF macro.
[in] | fifo_id | The identifier of the FIFO object. |
#define APP_ATFIFO_DEF | ( | fifo_id, | |
storage_type, | |||
item_cnt | |||
) |
Instance creation macro.
Creates FIFO object variable itself and
Use example:
[in] | fifo_id | The identifier of FIFO object. This identifier would be a pointer to the instance. It makes it possible to use this directly for the functions that operates on the FIFO. Because it is static const object, it should be optimized by the compiler. |
[in] | storage_type | The type of data that would be stored in the FIFO. |
[in] | item_cnt | The capacity of created FIFO in maximum number of items that may be stored. The phisical size of the buffer would be 1 element bigger. |
#define APP_ATFIFO_INIT | ( | fifo_id | ) |
Use this macro to initialize FIFO declared previously by the macro.
Use this macro to simplify FIFO initialization.
[in] | fifo_id | The identifier of the FIFO object. |
#define APP_ATFIFO_INST_NAME | ( | fifo_id | ) | CONCAT_2(fifo_id, _inst) |
Macro to generate the name for FIFO instance.
The name of instance variable that would be created by APP_ATFIFO_DEF macro.
[in] | fifo_id | The identifier of the FIFO object. |