Remove SPI, add UART comm

This commit is contained in:
2023-10-29 20:55:35 -03:00
parent fa65606692
commit 8acd6a736e
14 changed files with 7463 additions and 4894 deletions

View File

@@ -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();