39 lines
626 B
C
39 lines
626 B
C
#pragma once
|
|
|
|
#define CLS_HEARTBEAT_INTERVAL_MS 1000
|
|
|
|
#include "cls_device.pb.h"
|
|
|
|
typedef cls_device_Type CLS_Type_t;
|
|
|
|
typedef cls_device_Position CLS_Position_Option_t;
|
|
|
|
typedef struct CLS_Position {
|
|
CLS_Position_Option_t p0:4;
|
|
CLS_Position_Option_t p1:4;
|
|
} CLS_Position_t;
|
|
|
|
|
|
typedef struct CLS_HeatbeatData
|
|
{
|
|
struct
|
|
{
|
|
uint8_t major;
|
|
uint8_t minor;
|
|
uint8_t patch;
|
|
uint8_t count;
|
|
}firmware_version;
|
|
|
|
CLS_Type_t type;
|
|
uint8_t id;
|
|
uint8_t counter;
|
|
CLS_Position_t position;
|
|
} CLS_HeatbeatData_t;
|
|
|
|
extern uint8_t gCLS_DEVICE_ADDRESS;
|
|
|
|
|
|
|
|
|
|
void CLS_Init(void);
|