sink struct
This commit is contained in:
22
cube/User/Inc/sinkStruct.h
Normal file
22
cube/User/Inc/sinkStruct.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef _SINKSTRUCT_H_
|
||||
#define _SINKSTRUCT_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sha256.h>
|
||||
#include <config.h>
|
||||
|
||||
typedef struct __attribute__((__packed__)) {
|
||||
uint64_t timestamp;
|
||||
uint32_t frequency;
|
||||
} t_event;
|
||||
|
||||
#define SECONDS_PER_MINUTE 60
|
||||
typedef struct __attribute__((__packed__)) {
|
||||
char deviceId[sizeof(((t_configBlock*)0)->deviceId)];
|
||||
char location[sizeof(((t_configBlock*)0)->location)];
|
||||
uint8_t hash[SHA256_BLOCK_SIZE];
|
||||
uint8_t done;
|
||||
t_event events[SECONDS_PER_MINUTE];
|
||||
} t_minuteStruct;
|
||||
|
||||
#endif // _SINKSTRUCT_H_
|
Reference in New Issue
Block a user