Remove SPI, add UART comm
This commit is contained in:
@@ -10,11 +10,25 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define MAGIC 0x1304
|
||||
|
||||
enum CCDMsgType {
|
||||
CCDMSG_CFG,
|
||||
CCDMSG_READ,
|
||||
};
|
||||
|
||||
typedef struct CCDConfig {
|
||||
uint32_t sh_period;
|
||||
uint32_t icg_period;
|
||||
} CCDConfig_t;
|
||||
|
||||
typedef struct CCDCmd {
|
||||
uint16_t magic;
|
||||
uint8_t type;
|
||||
uint32_t len;
|
||||
uint8_t data[];
|
||||
} __attribute__((__packed__)) CCDCmd_t;
|
||||
|
||||
void tcd1304_set_config(CCDConfig_t *cfg);
|
||||
void tcd1304_setup();
|
||||
void tcd1304_loop();
|
||||
|
||||
Reference in New Issue
Block a user