Added board command to host protocol

This commit is contained in:
Mark Qvist 2022-01-22 22:34:03 +01:00
parent c4f7767b4f
commit 9bb6d34ef4
4 changed files with 14 additions and 4 deletions

View File

@ -4,7 +4,7 @@
#define CONFIG_H
#define MAJ_VERS 0x01
#define MIN_VERS 0x19
#define MIN_VERS 0x20
#define PLATFORM_AVR 0x90
#define PLATFORM_ESP32 0x80
@ -133,9 +133,9 @@
#endif
#if BOARD_MODEL == BOARD_TBEAM
#define I2C_SDA 21
#define I2C_SCL 22
#define PMU_IRQ 35
#define I2C_SDA 21
#define I2C_SCL 22
#define PMU_IRQ 35
#endif
#define eeprom_addr(a) (a+EEPROM_OFFSET)

View File

@ -27,6 +27,7 @@
#define CMD_BLINK 0x30
#define CMD_RANDOM 0x40
#define CMD_BOARD 0x47
#define CMD_PLATFORM 0x48
#define CMD_MCU 0x49
#define CMD_FW_VERSION 0x50

View File

@ -615,6 +615,8 @@ void serialCallback(uint8_t sbyte) {
kiss_indicate_platform();
} else if (command == CMD_MCU) {
kiss_indicate_mcu();
} else if (command == CMD_BOARD) {
kiss_indicate_board();
} else if (command == CMD_CONF_SAVE) {
eeprom_conf_save();
} else if (command == CMD_CONF_DELETE) {

View File

@ -429,6 +429,13 @@ void kiss_indicate_platform() {
Serial.write(FEND);
}
void kiss_indicate_board() {
Serial.write(FEND);
Serial.write(CMD_BOARD);
Serial.write(BOARD_MODEL);
Serial.write(FEND);
}
void kiss_indicate_mcu() {
Serial.write(FEND);
Serial.write(CMD_MCU);