mirror of
https://github.com/liberatedsystems/RNode_Firmware_CE.git
synced 2024-07-02 14:34:13 +02:00
Added querying packet buffer state as KISS command
This commit is contained in:
parent
b3b87bd7c5
commit
2b25762060
2
Config.h
2
Config.h
@ -4,7 +4,7 @@
|
|||||||
#define CONFIG_H
|
#define CONFIG_H
|
||||||
|
|
||||||
#define MAJ_VERS 0x01
|
#define MAJ_VERS 0x01
|
||||||
#define MIN_VERS 0x0B
|
#define MIN_VERS 0x0C
|
||||||
|
|
||||||
#define MCU_328P 0x90
|
#define MCU_328P 0x90
|
||||||
#define MCU_1284P 0x91
|
#define MCU_1284P 0x91
|
||||||
|
@ -468,6 +468,12 @@ void serialCallback(uint8_t sbyte) {
|
|||||||
promisc_disable();
|
promisc_disable();
|
||||||
}
|
}
|
||||||
kiss_indicate_promisc();
|
kiss_indicate_promisc();
|
||||||
|
} else if (command == CMD_READY) {
|
||||||
|
if (!queueFull()) {
|
||||||
|
kiss_indicate_ready();
|
||||||
|
} else {
|
||||||
|
kiss_indicate_not_ready();
|
||||||
|
}
|
||||||
} else if (command == CMD_UNLOCK_ROM) {
|
} else if (command == CMD_UNLOCK_ROM) {
|
||||||
if (sbyte == ROM_UNLOCK_BYTE) {
|
if (sbyte == ROM_UNLOCK_BYTE) {
|
||||||
unlock_rom();
|
unlock_rom();
|
||||||
|
@ -207,6 +207,13 @@ void kiss_indicate_ready() {
|
|||||||
Serial.write(FEND);
|
Serial.write(FEND);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void kiss_indicate_not_ready() {
|
||||||
|
Serial.write(FEND);
|
||||||
|
Serial.write(CMD_READY);
|
||||||
|
Serial.write(0x00);
|
||||||
|
Serial.write(FEND);
|
||||||
|
}
|
||||||
|
|
||||||
void kiss_indicate_promisc() {
|
void kiss_indicate_promisc() {
|
||||||
Serial.write(FEND);
|
Serial.write(FEND);
|
||||||
Serial.write(CMD_PROMISC);
|
Serial.write(CMD_PROMISC);
|
||||||
|
Loading…
Reference in New Issue
Block a user