|
AWS IoT for ESP32 v1.0.0
An ESP-IDF based solution
|
Rig buffer library header file. More...
Go to the source code of this file.
Data Structures | |
| struct | rb_st |
| Ring buffer structure. More... | |
Functions | |
| bool | RB_init (rb_st *ps_rb, uint16_t sizeOfElement_u16, uint16_t noOfElements_u16) |
| Intialize the ring buffer. More... | |
| void | RB_free (rb_st *ps_rb) |
| Free the memory associated with ring buffer. More... | |
| void | RB_clear (rb_st *ps_rb) |
| Clear the ring buffer. More... | |
| uint16_t | RB_available (rb_st *ps_rb) |
| Number of bytes available in a ring buffer. More... | |
| uint16_t | RB_hasSpace (rb_st *ps_rb) |
| Check if ring buffer is not full. More... | |
| bool | RB_write (rb_st *ps_rb, void *pBuffer) |
| Write data to ring buffer. More... | |
| bool | RB_read (rb_st *ps_rb, void *pBuffer) |
| Read data from ring buffer. More... | |
Rig buffer library header file.
| uint16_t RB_available | ( | rb_st * | ps_rb | ) |
Number of bytes available in a ring buffer.
| [in] | ps_rb | Instance of ring buffer |
| void RB_clear | ( | rb_st * | ps_rb | ) |
Clear the ring buffer.
| [in] | ps_rb | Instance of ring buffer |
| void RB_free | ( | rb_st * | ps_rb | ) |
Free the memory associated with ring buffer.
| [in] | ps_rb | Instance of ring buffer |
| uint16_t RB_hasSpace | ( | rb_st * | ps_rb | ) |
Check if ring buffer is not full.
| [in] | ps_rb | Instance of ring buffer |
| bool RB_init | ( | rb_st * | ps_rb, |
| uint16_t | sizeOfElement_u16, | ||
| uint16_t | noOfElements_u16 | ||
| ) |
Intialize the ring buffer.
| [in] | ps_rb | Instance of ring buffer |
| [in] | sizeOfElement_u16 | size of each element in ring buffer |
| [in] | noOfElements_u16 | Total number of elements in a ring buffer |
| true | on success |
| false | on errors |
| bool RB_read | ( | rb_st * | ps_rb, |
| void * | pBuffer | ||
| ) |
Read data from ring buffer.
| [in] | ps_rb | Instance of ring buffer |
| [out] | pBuffer | data read from ring buffer |
| true | on successful read |
| false | on errors |
| bool RB_write | ( | rb_st * | ps_rb, |
| void * | pBuffer | ||
| ) |
Write data to ring buffer.
| [in] | ps_rb | Instance of ring buffer |
| [in] | pBuffer | data to be written |
| true | on successful write |
| false | on errors |