Rename serialized_buffer_t to config_buffer_t

This commit is contained in:
László Monda
2017-07-15 11:23:02 +02:00
parent 5d39c725f9
commit b8b1bc4979
6 changed files with 27 additions and 27 deletions
+6 -6
View File
@@ -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);