21 #ifdef USE_SERIAL_4WAY_BLHELI_INTERFACE
23 #define USE_SERIAL_4WAY_BLHELI_BOOTLOADER
24 #define USE_SERIAL_4WAY_SK_BOOTLOADER
31 } esc4wayInterfaceMode_e;
35 cmd_InterfaceTestAlive = 0x30,
39 cmd_ProtocolGetVersion = 0x31,
43 cmd_InterfaceGetName = 0x32,
47 cmd_InterfaceGetVersion = 0x33,
51 cmd_InterfaceExit = 0x34,
55 cmd_DeviceReset = 0x35,
65 cmd_DeviceInitFlash = 0x37,
70 cmd_DeviceEraseAll = 0x38,
74 cmd_DevicePageErase = 0x39,
80 cmd_DeviceRead = 0x3A,
86 cmd_DeviceWrite = 0x3B,
91 cmd_DeviceC2CK_LOW = 0x3C,
96 cmd_DeviceReadEEprom = 0x3D,
102 cmd_DeviceWriteEEprom = 0x3E,
107 cmd_InterfaceSetMode = 0x3F,
114 esc4wayAck_OK = 0x00,
116 esc4wayAck_I_INVALID_CMD = 0x02,
117 esc4wayAck_I_INVALID_CRC = 0x03,
118 esc4wayAck_I_VERIFY_ERROR = 0x04,
122 esc4wayAck_I_INVALID_CHANNEL = 0x08,
123 esc4wayAck_I_INVALID_PARAM = 0x09,
124 esc4wayAck_D_GENERAL_ERROR = 0x0f,
127 typedef struct escDeviceInfo_s {
130 uint8_t interfaceMode;
133 extern bool esc4wayExitRequested;
135 int esc4wayInit(
void);
136 void esc4wayStart(
void);
137 void esc4wayRelease(
void);
139 esc4wayAck_e esc4wayProcessCmd(esc4wayCmd_e command, uint16_t
addr, uint8_t *
data,
int inLen,
int *outLen);
struct serial_config serial
Definition: config.h:116
uint16_t addr
Definition: config.c:90
uint16_t data
Definition: config.c:91