Make the serialized buffer fixed-size.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#include "config_state.h"
|
||||
|
||||
static uint8_t config[EEPROM_SIZE];
|
||||
serialized_buffer_t ConfigBuffer = { config };
|
||||
serialized_buffer_t ConfigBuffer;
|
||||
|
||||
uint8_t readUInt8(serialized_buffer_t *buffer) {
|
||||
return buffer->buffer[buffer->offset++];
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
// Typedefs:
|
||||
|
||||
typedef struct {
|
||||
uint8_t *const buffer;
|
||||
uint8_t const buffer[EEPROM_SIZE];
|
||||
uint16_t offset;
|
||||
} serialized_buffer_t;
|
||||
|
||||
|
||||
@@ -59,5 +59,6 @@ void InitPeripherals(void)
|
||||
InitI2c();
|
||||
InitTestLed();
|
||||
LedPwm_Init();
|
||||
// LedPwm_SetBrightness(100);
|
||||
InitI2cWatchdog();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user