1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 16:25:16 +03:00

Warnings removed

This commit is contained in:
Bertrand Songis 2016-07-29 21:26:14 +02:00
parent 85f3bd4ed0
commit e900ad6c49
5 changed files with 29 additions and 25 deletions

View file

@ -2592,7 +2592,7 @@ void opentxInit(OPENTX_INIT_ARGS)
startPulses();
wdt_enable(WDT_500MS);
wdt_enable(WDTO_500MS);
}
#if defined(SIMU)

View file

@ -1756,6 +1756,4 @@ extern JitterMeter<uint16_t> avgJitter[NUMBER_ANALOG];
#endif
#endif
#define WDT_500MS 500
#endif // _OPENTX_H_

View file

@ -1,23 +1,23 @@
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
/*
* Copyright (C) OpenTX
*
* Based on code named
* th9x - http://code.google.com/p/th9x
* er9x - http://code.google.com/p/er9x
* gruvin9x - http://code.google.com/p/gruvin9x
*
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include "serial_driver.h"
#include "opentx.h"
@ -292,8 +292,12 @@ void SERIAL_Init(void) {
// set 8N1
UCSR0B = 0 | (0 << RXCIE0) | (0 << TXCIE0) | (0 << UDRIE0) | (0 << RXEN0) | (0 << TXEN0) | (0 << UCSZ02);
UCSR0C = 0 | (1 << UCSZ01) | (1 << UCSZ00);
while (UCSR0A & (1 << RXC0))
UDR0; // flush receive buffer
#if !defined(SIMU)
while (UCSR0A & (1 << RXC0)) {
UDR0; // flush receive buffer
}
#endif
SERIAL_EnableTXD();
SERIAL_EnableRXD();

View file

@ -175,6 +175,7 @@ extern uint32_t rotencSpeed;
void checkRotaryEncoder(void);
// WDT driver
#define WDTO_500MS 500
#define wdt_disable()
void watchdogInit(unsigned int duration);
#if defined(WATCHDOG_DISABLED) || defined(SIMU)

View file

@ -234,6 +234,7 @@ void checkRotaryEncoder(void);
#endif
// WDT driver
#define WDTO_500MS 500
#if defined(WATCHDOG_DISABLED) || defined(SIMU)
#define wdt_enable(x)
#define wdt_reset()