Macros | |
#define | NRF_ATFIFO_BUF_NAME(fifo_id) CONCAT_2(fifo_id, _data) |
Macro for generating the name for a data buffer. More... | |
#define | NRF_ATFIFO_INST_NAME(fifo_id) CONCAT_2(fifo_id, _inst) |
Macro for generating the name for a FIFO instance. More... | |
#define | NRF_ATFIFO_DEF(fifo_id, storage_type, item_cnt) |
Macro for creating an instance. More... | |
#define | NRF_ATFIFO_INIT(fifo_id) |
Macro for initializing the FIFO that was previously declared 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 nrf_atfifo_init function.
#define NRF_ATFIFO_BUF_NAME | ( | fifo_id | ) | CONCAT_2(fifo_id, _data) |
Macro for generating the name for a data buffer.
The name of the data buffer that would be created by NRF_ATFIFO_DEF macro.
[in] | fifo_id | Identifier of the FIFO object. |
#define NRF_ATFIFO_DEF | ( | fifo_id, | |
storage_type, | |||
item_cnt | |||
) |
Macro for creating an instance.
Creates the FIFO object variable itself.
Usage example:
[in] | fifo_id | Identifier of a FIFO object. This identifier will be a pointer to the instance. It makes it possible to use this directly for the functions that operate on the FIFO. Because it is a static const object, it should be optimized by the compiler. |
[in] | storage_type | Type of data that will be stored in the FIFO. |
[in] | item_cnt | Capacity of the created FIFO in maximum number of items that may be stored. The phisical size of the buffer will be 1 element bigger. |
#define NRF_ATFIFO_INIT | ( | fifo_id | ) |
Macro for initializing the FIFO that was previously declared by the macro.
Use this macro to simplify FIFO initialization.
[in] | fifo_id | Identifier of the FIFO object. |
#define NRF_ATFIFO_INST_NAME | ( | fifo_id | ) | CONCAT_2(fifo_id, _inst) |
Macro for generating the name for a FIFO instance.
The name of the instance variable that will be created by the NRF_ATFIFO_DEF macro.
[in] | fifo_id | Identifier of the FIFO object. |