Local¶
- group Local_buffer
buffer locals
lorem
Macros¶
- group Macros_buffer
Variables¶
- group Variables_buffer
API’s¶
- group Apis_buffer_c
Getters¶
- group Getters_buffer_c
Setters¶
- group Setters_buffer_c
General¶
- group General_buffer_c
Functions
-
CosmOS_BufferStateType buffer_pull(CosmOS_BufferConfigurationType *bufferCfg, unsigned char *data)¶
Pull data from the buffer. This function cannot be called from the unprivileged context directly. DEMO.
The implementation contains obtaining of the buffer size by calling function buffer_getBufferSize and obtaining buffer array pointer by calling function buffer_getBuffer. To the data pointer argument is then written one byte from the buffer tail and fullCells of the current bufferCfg are decremented by one. Position of the tail is updated and buffer empty state is obtained by the buffer_isEmpty function and returned.
- Parameters
bufferCfg – [in] buffer configuration structure pointer
data – [out] data to pull from the buffer
- Returns
CosmOS_BufferStateType
-
CosmOS_BufferStateType buffer_push(CosmOS_BufferConfigurationType *bufferCfg, unsigned char data)¶
Push data to the buffer. This function cannot be called from the unprivileged context directly. DEMO.
The implementation contains obtaining of the buffer size by calling function buffer_getBufferSize and obtaining buffer array pointer by calling function buffer_getBuffer. To the buffer array in the head position is written the data byte argument and fullCells of the current bufferCfg are incremented by one. Position of the head is updated and buffer full state is obtained by the buffer_isFull function and returned.
- Parameters
bufferCfg – [in] buffer configuration structure pointer
data – [in] data to push to the buffer
- Returns
CosmOS_BufferStateType
-
CosmOS_BufferStateType buffer_pull(CosmOS_BufferConfigurationType *bufferCfg, unsigned char *data)¶