Warnings fixed and remarks from #3666 taken into account
This commit is contained in:
@@ -96,10 +96,10 @@ void OpenTxSimulator::start(QByteArray & ee, bool tests)
|
|||||||
|
|
||||||
void OpenTxSimulator::start(const char * filename, bool tests)
|
void OpenTxSimulator::start(const char * filename, bool tests)
|
||||||
{
|
{
|
||||||
#if defined(PCBSKY9X) && !defined(REVX) && !defined(AR9X)
|
#if ROTARY_ENCODERS > 0
|
||||||
g_rotenc[0] = 0;
|
|
||||||
#elif defined(PCBGRUVIN9X)
|
|
||||||
g_rotenc[0] = 0;
|
g_rotenc[0] = 0;
|
||||||
|
#endif
|
||||||
|
#if ROTARY_ENCODERS > 1
|
||||||
g_rotenc[1] = 0;
|
g_rotenc[1] = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@ void OpenTxSimulator::wheelEvent(int steps)
|
|||||||
rotencValue -= 2;
|
rotencValue -= 2;
|
||||||
else
|
else
|
||||||
rotencValue += 2;
|
rotencValue += 2;
|
||||||
#elif defined(PCBSKY9X) && !defined(REVX) && !defined(AR9X)
|
#elif defined(PCBSKY9X) && ROTARY_ENCODERS > 0
|
||||||
g_rotenc[0] += steps*4;
|
g_rotenc[0] += steps*4;
|
||||||
#elif defined(PCBGRUVIN9X)
|
#elif defined(PCBGRUVIN9X)
|
||||||
g_rotenc[0] += steps;
|
g_rotenc[0] += steps;
|
||||||
|
|||||||
@@ -187,18 +187,22 @@ void disable_dsm2(uint32_t port);
|
|||||||
|
|
||||||
// SD driver
|
// SD driver
|
||||||
#if defined(SIMU)
|
#if defined(SIMU)
|
||||||
#define sdInit()
|
#define sdInit()
|
||||||
#define sdDone()
|
#define sdDone()
|
||||||
#else
|
#else
|
||||||
#define sdPoll10ms()
|
#define sdPoll10ms()
|
||||||
void sdMountPoll();
|
void sdMountPoll();
|
||||||
extern "C" {
|
#if defined(__cplusplus)
|
||||||
void init_SDcard();
|
extern "C" {
|
||||||
void sdInit();
|
#endif
|
||||||
void sdDone();
|
void init_SDcard();
|
||||||
uint32_t sd_card_ready();
|
void sdInit();
|
||||||
uint32_t sdMounted();
|
void sdDone();
|
||||||
}
|
uint32_t sd_card_ready();
|
||||||
|
uint32_t sdMounted();
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// WDT driver
|
// WDT driver
|
||||||
@@ -251,7 +255,9 @@ void i2cCheck();
|
|||||||
// Coproc driver
|
// Coproc driver
|
||||||
void coprocInit();
|
void coprocInit();
|
||||||
void coprocWriteData(uint8_t *data, uint32_t size);
|
void coprocWriteData(uint8_t *data, uint32_t size);
|
||||||
|
#if defined(__cplusplus)
|
||||||
void coprocReadData(bool onlytemp=false);
|
void coprocReadData(bool onlytemp=false);
|
||||||
|
#endif
|
||||||
extern int8_t volumeRequired;
|
extern int8_t volumeRequired;
|
||||||
extern uint8_t Coproc_read;
|
extern uint8_t Coproc_read;
|
||||||
extern int8_t Coproc_valid;
|
extern int8_t Coproc_valid;
|
||||||
@@ -306,7 +312,9 @@ void rxPdcUsart( void (*pChProcess)(uint8_t x) );
|
|||||||
|
|
||||||
// Second UART driver
|
// Second UART driver
|
||||||
void serial2TelemetryInit(unsigned int protocol);
|
void serial2TelemetryInit(unsigned int protocol);
|
||||||
|
#if defined(__cplusplus)
|
||||||
bool telemetrySecondPortReceive(uint8_t & data);
|
bool telemetrySecondPortReceive(uint8_t & data);
|
||||||
|
#endif
|
||||||
|
|
||||||
extern const uint8_t BootCode[];
|
extern const uint8_t BootCode[];
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
#include "i2c_driver.h"
|
|
||||||
#include "twi.h"
|
#include "twi.h"
|
||||||
#include "board_lowlevel.h"
|
|
||||||
#include "stdlib.h"
|
|
||||||
|
|
||||||
#define I2C_CLK_FAST 400000
|
#define I2C_CLK_FAST 400000
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
#include "rtc.h"
|
|
||||||
#include "i2c_driver.h"
|
#include "i2c_driver.h"
|
||||||
|
|
||||||
#define DS3231_I2C_ADDR 0x68
|
#define DS3231_I2C_ADDR 0x68
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ uint32_t twi_master_init(Twi *p_twi, const twi_options_t *p_opt)
|
|||||||
uint32_t status = TWI_SUCCESS;
|
uint32_t status = TWI_SUCCESS;
|
||||||
|
|
||||||
/* Disable TWI interrupts */
|
/* Disable TWI interrupts */
|
||||||
p_twi->TWI_IDR = ~0UL;
|
p_twi->TWI_IDR = ~(uint32_t)0;
|
||||||
|
|
||||||
/* Dummy read in status register */
|
/* Dummy read in status register */
|
||||||
p_twi->TWI_SR;
|
p_twi->TWI_SR;
|
||||||
@@ -494,7 +494,7 @@ void twi_disable_slave_mode(Twi *p_twi)
|
|||||||
void twi_slave_init(Twi *p_twi, uint32_t ul_device_addr)
|
void twi_slave_init(Twi *p_twi, uint32_t ul_device_addr)
|
||||||
{
|
{
|
||||||
/* Disable TWI interrupts */
|
/* Disable TWI interrupts */
|
||||||
p_twi->TWI_IDR = ~0UL;
|
p_twi->TWI_IDR = ~(uint32_t)0;
|
||||||
p_twi->TWI_SR;
|
p_twi->TWI_SR;
|
||||||
|
|
||||||
/* Reset TWI */
|
/* Reset TWI */
|
||||||
|
|||||||
Reference in New Issue
Block a user