Protocol rework

This commit is contained in:
ThePetrovich 2026-05-10 15:33:08 +08:00
parent 3e77d34ccc
commit 2b713a3e3a
15 changed files with 1347 additions and 1155 deletions

View file

@ -1,6 +1,6 @@
/*
* @file iodefs.h
* @brief
* @brief Hardware pin assignments for the SBC firmware.
*
* Created: 21.09.2025 05:39:48
* Author: ThePetrovich
@ -18,32 +18,38 @@
#include <avr/io.h>
#include <avr/pgmspace.h>
#define DET_TRIG_PIN 21 // PC7, event input
#define DET_READ_PIN A3 // PD3 (ADC3)
#define DET_PREAMP_PIN A2 // PD2 (ADC2)
/* Detector signal path */
#define DET_TRIG_PIN 21 /* PC7, event input */
#define DET_READ_PIN A3 /* PD3 (ADC3) */
#define DET_PREAMP_PIN A2 /* PD2 (ADC2) */
#define STATUS_LED 31 // PE1
/* Status indicator */
#define STATUS_LED 31 /* PE1 */
#define HV_EN 16 // PC2
#define DET_EN 18 // PC4
#define DET_RST 20 // PC6
/* Power and reset control */
#define HV_EN 16 /* PC2 */
#define DET_EN 18 /* PC4 */
#define DET_RST 20 /* PC6 */
#define V28V0_FB_PIN A0 // PD0 (ADC0)
#define HV_TEMP_PIN A1 // PD1 (ADC1)
#define AMP_TEMP_PIN A4 // PD4 (ADC4)
#define DET_TEMP_PIN A5 // PD5 (ADC5)
/* Housekeeping ADC inputs */
#define V28V0_FB_PIN A0 /* PD0 (ADC0) */
#define HV_TEMP_PIN A1 /* PD1 (ADC1) */
#define AMP_TEMP_PIN A4 /* PD4 (ADC4) */
#define DET_TEMP_PIN A5 /* PD5 (ADC5) */
#define HV_CS 15 // PC1
#define AMP_CS 17 // PC3
#define DET_CS 19 // PC5
/* AD5160 digital potentiometer chip selects */
#define HV_CS 15 /* PC1 */
#define AMP_CS 17 /* PC3 */
#define DET_CS 19 /* PC5 */
#define SCL0 8 // PB0
#define SDA0 9 // PB1
/* Light sensor I2C bus pins (software-bitbanged) */
#define SCL0 8 /* PB0 */
#define SDA0 9 /* PB1 */
#define SCL1 10 // PB2
#define SDA1 11 // PB3
#define SCL1 10 /* PB2 */
#define SDA1 11 /* PB3 */
#define SCL2 12 // PB4
#define SDA2 13 // PB5
#define SCL2 12 /* PB4 */
#define SDA2 13 /* PB5 */
#endif // LSENSE_IODEFS_H
#endif /* LSENSE_IODEFS_H */