Make the serialized buffer fixed-size.

This commit is contained in:
László Monda
2017-07-15 11:18:22 +02:00
parent 78e5aaa60e
commit 5d39c725f9
3 changed files with 3 additions and 3 deletions

View File

@@ -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++];

View File

@@ -13,7 +13,7 @@
// Typedefs:
typedef struct {
uint8_t *const buffer;
uint8_t const buffer[EEPROM_SIZE];
uint16_t offset;
} serialized_buffer_t;

View File

@@ -59,5 +59,6 @@ void InitPeripherals(void)
InitI2c();
InitTestLed();
LedPwm_Init();
// LedPwm_SetBrightness(100);
InitI2cWatchdog();
}