Rename serialized_buffer_t to config_buffer_t
This commit is contained in:
@@ -1,29 +1,29 @@
|
||||
#include "config_state.h"
|
||||
|
||||
serialized_buffer_t ConfigBuffer;
|
||||
config_buffer_t ConfigBuffer;
|
||||
|
||||
uint8_t readUInt8(serialized_buffer_t *buffer) {
|
||||
uint8_t readUInt8(config_buffer_t *buffer) {
|
||||
return buffer->buffer[buffer->offset++];
|
||||
}
|
||||
|
||||
uint16_t readUInt16(serialized_buffer_t *buffer) {
|
||||
uint16_t readUInt16(config_buffer_t *buffer) {
|
||||
uint16_t uInt16 = *(uint16_t *)(buffer->buffer + buffer->offset);
|
||||
|
||||
buffer->offset += 2;
|
||||
return uInt16;
|
||||
}
|
||||
|
||||
bool readBool(serialized_buffer_t *buffer) {
|
||||
bool readBool(config_buffer_t *buffer) {
|
||||
return readUInt8(buffer);
|
||||
}
|
||||
|
||||
uint16_t readCompactLength(serialized_buffer_t *buffer) {
|
||||
uint16_t readCompactLength(config_buffer_t *buffer) {
|
||||
uint16_t compactLength = readUInt8(buffer);
|
||||
|
||||
return compactLength == 0xFF ? readUInt16(buffer) : compactLength;
|
||||
}
|
||||
|
||||
const char *readString(serialized_buffer_t *buffer, uint16_t *len) {
|
||||
const char *readString(config_buffer_t *buffer, uint16_t *len) {
|
||||
const char *string;
|
||||
|
||||
*len = readCompactLength(buffer);
|
||||
|
||||
Reference in New Issue
Block a user