mirror of
https://github.com/markqvist/RNode_Firmware.git
synced 2024-10-01 03:15:39 -04:00
Added board command to host protocol
This commit is contained in:
parent
c4f7767b4f
commit
9bb6d34ef4
8
Config.h
8
Config.h
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user