device configuration prepared
This commit is contained in:
@ -3,9 +3,10 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <spi.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
#define CONFIG_MAGIC 0xdead0003
|
||||
#define CONFIG_MAGIC 0xdead0004
|
||||
#define DEVICE_MAGIC 0xaffe0000
|
||||
|
||||
typedef struct __attribute__((__packed__)) s_configBlock {
|
||||
uint32_t configMagic;
|
||||
@ -27,11 +28,12 @@ typedef struct __attribute__((__packed__)) s_configBlock {
|
||||
#define MBUSDEVICE_NUM_OF_CONSIDEREDFIELDS 4
|
||||
|
||||
typedef struct __attribute__((__packed__)) s_deviceBlock {
|
||||
char deviceName[MBUSDEVICE_NAMELENGTH];
|
||||
uint8_t address;
|
||||
int8_t consideredField[MBUSDEVICE_NUM_OF_CONSIDEREDFIELDS];
|
||||
int32_t period;
|
||||
uint8_t filler[7];
|
||||
uint32_t deviceMagic;
|
||||
char deviceName[MBUSDEVICE_NAMELENGTH];
|
||||
uint8_t address;
|
||||
int8_t consideredField[MBUSDEVICE_NUM_OF_CONSIDEREDFIELDS];
|
||||
int32_t period;
|
||||
uint8_t filler[3];
|
||||
} t_deviceBlock;
|
||||
|
||||
void configInit();
|
||||
|
Reference in New Issue
Block a user