* // Create the buffer structure and its underlying storage array
* RingBuffer_t Buffer;
* uint8_t BufferData[128];
- *
+ *
* // Initialize the buffer with the created storage array
* RingBuffer_InitBuffer(&Buffer, BufferData, sizeof(BufferData));
- *
+ *
* // Insert some data into the buffer
* RingBuffer_Insert(Buffer, 'H');
* RingBuffer_Insert(Buffer, 'E');
* RingBuffer_Insert(Buffer, 'L');
* RingBuffer_Insert(Buffer, 'L');
* RingBuffer_Insert(Buffer, 'O');
- *
+ *
* // Cache the number of stored bytes in the buffer
* uint16_t BufferCount = RingBuffer_GetCount(&Buffer);
- *
+ *
* // Printer stored data length
* printf("Buffer Length: %d, Buffer Data: \r\n", BufferCount);
- *
+ *
* // Print contents of the buffer one character at a time
* while (BufferCount--)
* putc(RingBuffer_Remove(&Buffer));