APM:Libraries
Macros
blheli_4way_protocol.h File Reference

Go to the source code of this file.

Macros

#define cmd_Remote_Escape   0x2E
 
#define cmd_Local_Escape   0x2F
 
#define cmd_InterfaceTestAlive   0x30
 
#define cmd_ProtocolGetVersion   0x31
 
#define cmd_InterfaceGetName   0x32
 
#define cmd_InterfaceGetVersion   0x33
 
#define cmd_InterfaceExit   0x34
 
#define cmd_DeviceReset   0x35
 
#define cmd_DeviceInitFlash   0x37
 
#define cmd_DeviceEraseAll   0x38
 
#define cmd_DevicePageErase   0x39
 
#define cmd_DeviceRead   0x3A
 
#define cmd_DeviceWrite   0x3B
 
#define cmd_DeviceC2CK_LOW   0x3C
 
#define cmd_DeviceReadEEprom   0x3D
 
#define cmd_DeviceWriteEEprom   0x3E
 
#define cmd_InterfaceSetMode   0x3F
 
#define cmd_DeviceVerify   0x40
 
#define SERIAL_4WAY_VER_MAIN   20
 
#define SERIAL_4WAY_VER_SUB_1   (uint8_t) 0
 
#define SERIAL_4WAY_VER_SUB_2   (uint8_t) 02
 
#define SERIAL_4WAY_PROTOCOL_VER   107
 
#define SERIAL_4WAY_VERSION   (uint16_t) ((SERIAL_4WAY_VER_MAIN * 1000) + (SERIAL_4WAY_VER_SUB_1 * 100) + SERIAL_4WAY_VER_SUB_2)
 
#define SERIAL_4WAY_VERSION_HI   (uint8_t) (SERIAL_4WAY_VERSION / 100)
 
#define SERIAL_4WAY_VERSION_LO   (uint8_t) (SERIAL_4WAY_VERSION % 100)
 
#define brSUCCESS   0x30
 
#define brERRORVERIFY   0xC0
 
#define brERRORCOMMAND   0xC1
 
#define brERRORCRC   0xC2
 
#define brNONE   0xFF
 
#define CMD_RUN   0x00
 
#define CMD_PROG_FLASH   0x01
 
#define CMD_ERASE_FLASH   0x02
 
#define CMD_READ_FLASH_SIL   0x03
 
#define CMD_VERIFY_FLASH   0x03
 
#define CMD_VERIFY_FLASH_ARM   0x04
 
#define CMD_READ_EEPROM   0x04
 
#define CMD_PROG_EEPROM   0x05
 
#define CMD_READ_SRAM   0x06
 
#define CMD_READ_FLASH_ATM   0x07
 
#define CMD_KEEP_ALIVE   0xFD
 
#define CMD_SET_ADDRESS   0xFF
 
#define CMD_SET_BUFFER   0xFE
 
#define RestartBootloader   0
 
#define ExitBootloader   1
 
#define ACK_OK   0x00
 
#define ACK_I_INVALID_CMD   0x02
 
#define ACK_I_INVALID_CRC   0x03
 
#define ACK_I_VERIFY_ERROR   0x04
 
#define ACK_I_INVALID_CHANNEL   0x08
 
#define ACK_I_INVALID_PARAM   0x09
 
#define ACK_D_GENERAL_ERROR   0x0F
 
#define imC2   0
 
#define imSIL_BLB   1
 
#define imATM_BLB   2
 
#define imSK   3
 
#define imARM_BLB   4
 

Macro Definition Documentation

◆ ACK_D_GENERAL_ERROR

#define ACK_D_GENERAL_ERROR   0x0F

Definition at line 164 of file blheli_4way_protocol.h.

◆ ACK_I_INVALID_CHANNEL

#define ACK_I_INVALID_CHANNEL   0x08

Definition at line 162 of file blheli_4way_protocol.h.

◆ ACK_I_INVALID_CMD

#define ACK_I_INVALID_CMD   0x02

Definition at line 159 of file blheli_4way_protocol.h.

◆ ACK_I_INVALID_CRC

#define ACK_I_INVALID_CRC   0x03

Definition at line 160 of file blheli_4way_protocol.h.

◆ ACK_I_INVALID_PARAM

#define ACK_I_INVALID_PARAM   0x09

Definition at line 163 of file blheli_4way_protocol.h.

◆ ACK_I_VERIFY_ERROR

#define ACK_I_VERIFY_ERROR   0x04

Definition at line 161 of file blheli_4way_protocol.h.

◆ ACK_OK

#define ACK_OK   0x00

Definition at line 158 of file blheli_4way_protocol.h.

◆ brERRORCOMMAND

#define brERRORCOMMAND   0xC1

Definition at line 137 of file blheli_4way_protocol.h.

◆ brERRORCRC

#define brERRORCRC   0xC2

Definition at line 138 of file blheli_4way_protocol.h.

◆ brERRORVERIFY

#define brERRORVERIFY   0xC0

Definition at line 136 of file blheli_4way_protocol.h.

◆ brNONE

#define brNONE   0xFF

Definition at line 139 of file blheli_4way_protocol.h.

◆ brSUCCESS

#define brSUCCESS   0x30

Definition at line 135 of file blheli_4way_protocol.h.

◆ cmd_DeviceC2CK_LOW

#define cmd_DeviceC2CK_LOW   0x3C

Definition at line 86 of file blheli_4way_protocol.h.

◆ cmd_DeviceEraseAll

#define cmd_DeviceEraseAll   0x38

Definition at line 65 of file blheli_4way_protocol.h.

◆ cmd_DeviceInitFlash

#define cmd_DeviceInitFlash   0x37

Definition at line 61 of file blheli_4way_protocol.h.

◆ cmd_DevicePageErase

#define cmd_DevicePageErase   0x39

Definition at line 69 of file blheli_4way_protocol.h.

◆ cmd_DeviceRead

#define cmd_DeviceRead   0x3A

Definition at line 75 of file blheli_4way_protocol.h.

◆ cmd_DeviceReadEEprom

#define cmd_DeviceReadEEprom   0x3D

Definition at line 91 of file blheli_4way_protocol.h.

◆ cmd_DeviceReset

#define cmd_DeviceReset   0x35

Definition at line 53 of file blheli_4way_protocol.h.

◆ cmd_DeviceVerify

#define cmd_DeviceVerify   0x40

Definition at line 112 of file blheli_4way_protocol.h.

◆ cmd_DeviceWrite

#define cmd_DeviceWrite   0x3B

Definition at line 81 of file blheli_4way_protocol.h.

◆ cmd_DeviceWriteEEprom

#define cmd_DeviceWriteEEprom   0x3E

Definition at line 97 of file blheli_4way_protocol.h.

◆ CMD_ERASE_FLASH

#define CMD_ERASE_FLASH   0x02

Definition at line 143 of file blheli_4way_protocol.h.

◆ cmd_InterfaceExit

#define cmd_InterfaceExit   0x34

Definition at line 49 of file blheli_4way_protocol.h.

◆ cmd_InterfaceGetName

#define cmd_InterfaceGetName   0x32

Definition at line 40 of file blheli_4way_protocol.h.

◆ cmd_InterfaceGetVersion

#define cmd_InterfaceGetVersion   0x33

Definition at line 44 of file blheli_4way_protocol.h.

◆ cmd_InterfaceSetMode

#define cmd_InterfaceSetMode   0x3F

Definition at line 102 of file blheli_4way_protocol.h.

◆ cmd_InterfaceTestAlive

#define cmd_InterfaceTestAlive   0x30

Definition at line 32 of file blheli_4way_protocol.h.

◆ CMD_KEEP_ALIVE

#define CMD_KEEP_ALIVE   0xFD

Definition at line 151 of file blheli_4way_protocol.h.

◆ cmd_Local_Escape

#define cmd_Local_Escape   0x2F

Definition at line 29 of file blheli_4way_protocol.h.

◆ CMD_PROG_EEPROM

#define CMD_PROG_EEPROM   0x05

Definition at line 148 of file blheli_4way_protocol.h.

◆ CMD_PROG_FLASH

#define CMD_PROG_FLASH   0x01

Definition at line 142 of file blheli_4way_protocol.h.

◆ cmd_ProtocolGetVersion

#define cmd_ProtocolGetVersion   0x31

Definition at line 36 of file blheli_4way_protocol.h.

◆ CMD_READ_EEPROM

#define CMD_READ_EEPROM   0x04

Definition at line 147 of file blheli_4way_protocol.h.

◆ CMD_READ_FLASH_ATM

#define CMD_READ_FLASH_ATM   0x07

Definition at line 150 of file blheli_4way_protocol.h.

◆ CMD_READ_FLASH_SIL

#define CMD_READ_FLASH_SIL   0x03

Definition at line 144 of file blheli_4way_protocol.h.

◆ CMD_READ_SRAM

#define CMD_READ_SRAM   0x06

Definition at line 149 of file blheli_4way_protocol.h.

◆ cmd_Remote_Escape

#define cmd_Remote_Escape   0x2E

Definition at line 28 of file blheli_4way_protocol.h.

◆ CMD_RUN

#define CMD_RUN   0x00

Definition at line 141 of file blheli_4way_protocol.h.

◆ CMD_SET_ADDRESS

#define CMD_SET_ADDRESS   0xFF

Definition at line 152 of file blheli_4way_protocol.h.

◆ CMD_SET_BUFFER

#define CMD_SET_BUFFER   0xFE

Definition at line 153 of file blheli_4way_protocol.h.

◆ CMD_VERIFY_FLASH

#define CMD_VERIFY_FLASH   0x03

Definition at line 145 of file blheli_4way_protocol.h.

◆ CMD_VERIFY_FLASH_ARM

#define CMD_VERIFY_FLASH_ARM   0x04

Definition at line 146 of file blheli_4way_protocol.h.

◆ ExitBootloader

#define ExitBootloader   1

Definition at line 156 of file blheli_4way_protocol.h.

◆ imARM_BLB

#define imARM_BLB   4

Definition at line 171 of file blheli_4way_protocol.h.

◆ imATM_BLB

#define imATM_BLB   2

Definition at line 169 of file blheli_4way_protocol.h.

◆ imC2

#define imC2   0

Definition at line 167 of file blheli_4way_protocol.h.

◆ imSIL_BLB

#define imSIL_BLB   1

Definition at line 168 of file blheli_4way_protocol.h.

◆ imSK

#define imSK   3

Definition at line 170 of file blheli_4way_protocol.h.

◆ RestartBootloader

#define RestartBootloader   0

Definition at line 155 of file blheli_4way_protocol.h.

◆ SERIAL_4WAY_PROTOCOL_VER

#define SERIAL_4WAY_PROTOCOL_VER   107

Definition at line 123 of file blheli_4way_protocol.h.

◆ SERIAL_4WAY_VER_MAIN

#define SERIAL_4WAY_VER_MAIN   20

Definition at line 119 of file blheli_4way_protocol.h.

◆ SERIAL_4WAY_VER_SUB_1

#define SERIAL_4WAY_VER_SUB_1   (uint8_t) 0

Definition at line 120 of file blheli_4way_protocol.h.

◆ SERIAL_4WAY_VER_SUB_2

#define SERIAL_4WAY_VER_SUB_2   (uint8_t) 02

Definition at line 121 of file blheli_4way_protocol.h.

◆ SERIAL_4WAY_VERSION

#define SERIAL_4WAY_VERSION   (uint16_t) ((SERIAL_4WAY_VER_MAIN * 1000) + (SERIAL_4WAY_VER_SUB_1 * 100) + SERIAL_4WAY_VER_SUB_2)

Definition at line 130 of file blheli_4way_protocol.h.

◆ SERIAL_4WAY_VERSION_HI

#define SERIAL_4WAY_VERSION_HI   (uint8_t) (SERIAL_4WAY_VERSION / 100)

Definition at line 132 of file blheli_4way_protocol.h.

◆ SERIAL_4WAY_VERSION_LO

#define SERIAL_4WAY_VERSION_LO   (uint8_t) (SERIAL_4WAY_VERSION % 100)

Definition at line 133 of file blheli_4way_protocol.h.