1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 05:15:25 +03:00

widening range of BLHeli/_S device id

widening range of BLHeli/_S device id filtering to ease integration of upcoming MCU types to ease integration of upcoming MCU types
This commit is contained in:
4712 2022-04-10 14:50:35 +02:00
parent 2fd2e8eca5
commit 057ba09d3f

View file

@ -76,7 +76,7 @@
// *** change to adapt Revision // *** change to adapt Revision
#define SERIAL_4WAY_VER_MAIN 20 #define SERIAL_4WAY_VER_MAIN 20
#define SERIAL_4WAY_VER_SUB_1 (uint8_t) 0 #define SERIAL_4WAY_VER_SUB_1 (uint8_t) 0
#define SERIAL_4WAY_VER_SUB_2 (uint8_t) 05 #define SERIAL_4WAY_VER_SUB_2 (uint8_t) 06
#define SERIAL_4WAY_PROTOCOL_VER 108 #define SERIAL_4WAY_PROTOCOL_VER 108
// *** end // *** end
@ -332,10 +332,8 @@ uint16_t _crc_xmodem_update (uint16_t crc, uint8_t data) {
#define ATMEL_DEVICE_MATCH ((pDeviceInfo->words[0] == 0x9307) || (pDeviceInfo->words[0] == 0x930A) || \ #define ATMEL_DEVICE_MATCH ((pDeviceInfo->words[0] == 0x9307) || (pDeviceInfo->words[0] == 0x930A) || \
(pDeviceInfo->words[0] == 0x930F) || (pDeviceInfo->words[0] == 0x940B)) (pDeviceInfo->words[0] == 0x930F) || (pDeviceInfo->words[0] == 0x940B))
#define SILABS_DEVICE_MATCH ((pDeviceInfo->words[0] == 0xF310) || (pDeviceInfo->words[0] == 0xF330) || \ #define SILABS_DEVICE_MATCH (pDeviceInfo->words[0] > 0xE800) // && (pDeviceInfo->words[0] < 0xF900))
(pDeviceInfo->words[0] == 0xF410) || (pDeviceInfo->words[0] == 0xF390) || \
(pDeviceInfo->words[0] == 0xF850) || (pDeviceInfo->words[0] == 0xE8B1) || \
(pDeviceInfo->words[0] == 0xE8B2))
// BLHeli_32 MCU ID hi > 0x00 and < 0x90 / lo always = 0x06 // BLHeli_32 MCU ID hi > 0x00 and < 0x90 / lo always = 0x06
#define ARM_DEVICE_MATCH ((pDeviceInfo->bytes[1] > 0x00) && (pDeviceInfo->bytes[1] < 0x90) && (pDeviceInfo->bytes[0] == 0x06)) #define ARM_DEVICE_MATCH ((pDeviceInfo->bytes[1] > 0x00) && (pDeviceInfo->bytes[1] < 0x90) && (pDeviceInfo->bytes[0] == 0x06))