Compilation fix

This commit is contained in:
Bertrand Songis
2019-08-16 17:48:46 +02:00
parent 1039450569
commit 2e032ae7ef
2 changed files with 21 additions and 16 deletions
+9 -8
View File
@@ -161,11 +161,11 @@ enum EnumSwitches
#define LCD_CONTRAST_MIN 10 #define LCD_CONTRAST_MIN 10
#define LCD_CONTRAST_MAX 45 #define LCD_CONTRAST_MAX 45
#define LCD_CONTRAST_DEFAULT 25 #define LCD_CONTRAST_DEFAULT 25
void lcdInit(void); void lcdInit();
void lcdRefresh(void); void lcdRefresh();
#define lcdRefreshWait() #define lcdRefreshWait()
void lcdSetRefVolt(uint8_t val); void lcdSetRefVolt(uint8_t val);
void lcdSetContrast(void); void lcdSetContrast();
// USB driver // USB driver
void usbMassStorage(); void usbMassStorage();
@@ -218,8 +218,8 @@ void flashWrite(uint32_t * address, uint32_t * buffer);
// Keys driver // Keys driver
uint32_t switchState(uint8_t index); uint32_t switchState(uint8_t index);
uint32_t readKeys(void); uint32_t readKeys();
uint32_t readTrims(void); uint32_t readTrims();
#define NUM_TRIMS 4 #define NUM_TRIMS 4
#define NUM_TRIMS_KEYS (NUM_TRIMS * 2) #define NUM_TRIMS_KEYS (NUM_TRIMS * 2)
#define TRIMS_PRESSED() readTrims() #define TRIMS_PRESSED() readTrims()
@@ -342,7 +342,7 @@ extern int8_t Coproc_maxtemp;
// Haptic driver // Haptic driver
#define HAPTIC_PWM #define HAPTIC_PWM
void hapticOff(void); void hapticOff();
void hapticOn(uint32_t pwmPercent); void hapticOn(uint32_t pwmPercent);
// BlueTooth driver // BlueTooth driver
@@ -357,8 +357,9 @@ void btPushByte(uint8_t data);
#define SOFT_PWR_CTRL #define SOFT_PWR_CTRL
void pwrInit(); void pwrInit();
void pwrOff(); void pwrOff();
void pwrOn();
uint32_t pwrCheck(); uint32_t pwrCheck();
uint32_t pwrPressed(); bool pwrPressed();
#define UNEXPECTED_SHUTDOWN() (g_eeGeneral.unexpectedShutdown) #define UNEXPECTED_SHUTDOWN() (g_eeGeneral.unexpectedShutdown)
// EEPROM driver // EEPROM driver
@@ -366,7 +367,7 @@ uint32_t pwrPressed();
#define EEPROM_BLOCK_SIZE (4*1024) #define EEPROM_BLOCK_SIZE (4*1024)
void eepromInit(); void eepromInit();
uint8_t eepromReadStatus(); uint8_t eepromReadStatus();
uint8_t eepromIsTransferComplete(void); uint8_t eepromIsTransferComplete();
void eepromBlockErase(uint32_t address); void eepromBlockErase(uint32_t address);
void eepromStartRead(uint8_t * buffer, size_t address, size_t size); void eepromStartRead(uint8_t * buffer, size_t address, size_t size);
void eepromStartWrite(uint8_t * buffer, size_t address, size_t size); void eepromStartWrite(uint8_t * buffer, size_t address, size_t size);
+12 -8
View File
@@ -20,7 +20,14 @@
#include "opentx.h" #include "opentx.h"
uint32_t pwrPressed() void pwrInit()
{
// Configure RF_power (PC17)
configure_pins(PIO_PC17, PIN_ENABLE | PIN_INPUT | PIN_PORTC | PIN_NO_PULLUP | PIN_PULLDOWN);
configure_pins(PIO_PA8, PIN_ENABLE | PIN_INPUT | PIN_PORTA | PIN_PULLUP); // Enable bit A8 (Soft Power)
}
bool pwrPressed()
{ {
#if defined(SIMU) #if defined(SIMU)
return true; return true;
@@ -29,15 +36,12 @@ uint32_t pwrPressed()
#endif #endif
} }
void pwrOn()
{
}
// turn off soft power // turn off soft power
void pwrOff() void pwrOff()
{ {
configure_pins(PIO_PA8, PIN_ENABLE | PIN_OUTPUT | PIN_LOW | PIN_PORTA | PIN_NO_PULLUP); configure_pins(PIO_PA8, PIN_ENABLE | PIN_OUTPUT | PIN_LOW | PIN_PORTA | PIN_NO_PULLUP);
} }
void pwrInit()
{
// Configure RF_power (PC17)
configure_pins(PIO_PC17, PIN_ENABLE | PIN_INPUT | PIN_PORTC | PIN_NO_PULLUP | PIN_PULLDOWN);
configure_pins(PIO_PA8, PIN_ENABLE | PIN_INPUT | PIN_PORTA | PIN_PULLUP); // Enable bit A8 (Soft Power)
}