Fixed NV14 firmware and simu build error.

This commit is contained in:
Richard Li
2021-07-27 02:03:47 +08:00
parent 6cd3ee557a
commit 86d787756e
3 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -482,7 +482,7 @@ int32_t getVolume();
void telemetryPortInit(uint32_t baudrate, uint8_t mode); void telemetryPortInit(uint32_t baudrate, uint8_t mode);
void telemetryPortSetDirectionOutput(); void telemetryPortSetDirectionOutput();
void telemetryPortSetDirectionInput(); void telemetryPortSetDirectionInput();
void sportSendBuffer(uint8_t * buffer, uint32_t count); void sportSendBuffer(const uint8_t * buffer, uint32_t count);
bool telemetryGetByte(uint8_t * byte); bool telemetryGetByte(uint8_t * byte);
void telemetryClearFifo(); void telemetryClearFifo();
void sportSendByte(uint8_t byte); void sportSendByte(uint8_t byte);
+4 -4
View File
@@ -24,9 +24,9 @@ uint32_t readKeys()
{ {
uint32_t result = 0; uint32_t result = 0;
bool getKeys = true; bool getKeys = true;
#if defined(LUA) /*#if defined(LUA)
getKeys = (luaState & INTERPRETER_RUNNING_STANDALONE_SCRIPT); getKeys = (luaState & INTERPRETER_RUNNING_STANDALONE_SCRIPT);
#endif #endif*/ //TODO: not sure why has LUA condition here, this construct is not in horus target
if (getKeys) { if (getKeys) {
if (TRIMS_GPIO_REG_LHL & TRIMS_GPIO_PIN_LHL) if (TRIMS_GPIO_REG_LHL & TRIMS_GPIO_PIN_LHL)
result |= 1 << KEY_PGDN; result |= 1 << KEY_PGDN;
@@ -57,11 +57,11 @@ uint32_t readTrims()
{ {
uint32_t result = 0; uint32_t result = 0;
bool getTrim = true; bool getTrim = true;
#if defined(LUA) /*#if defined(LUA)
if(luaState & INTERPRETER_RUNNING_STANDALONE_SCRIPT) { if(luaState & INTERPRETER_RUNNING_STANDALONE_SCRIPT) {
getTrim = false; getTrim = false;
} }
#endif #endif*/ //TODO: not sure why has LUA condition here, this construct is not in horus target
if(!getTrim) return result; if(!getTrim) return result;
if (TRIMS_GPIO_REG_LHL & TRIMS_GPIO_PIN_LHL) if (TRIMS_GPIO_REG_LHL & TRIMS_GPIO_PIN_LHL)
result |= 1 << (TRM_LH_DWN - TRM_BASE); result |= 1 << (TRM_LH_DWN - TRM_BASE);
+1 -1
View File
@@ -117,7 +117,7 @@ void sportSendByte(uint8_t byte)
USART_SendData(TELEMETRY_USART, byte); USART_SendData(TELEMETRY_USART, byte);
} }
void sportSendBuffer(uint8_t * buffer, uint32_t count) void sportSendBuffer(const uint8_t * buffer, uint32_t count)
{ {
telemetryPortSetDirectionOutput(); telemetryPortSetDirectionOutput();