mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
Warnings removed
This commit is contained in:
parent
85f3bd4ed0
commit
e900ad6c49
5 changed files with 29 additions and 25 deletions
|
@ -2592,7 +2592,7 @@ void opentxInit(OPENTX_INIT_ARGS)
|
||||||
|
|
||||||
startPulses();
|
startPulses();
|
||||||
|
|
||||||
wdt_enable(WDT_500MS);
|
wdt_enable(WDTO_500MS);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(SIMU)
|
#if defined(SIMU)
|
||||||
|
|
|
@ -1756,6 +1756,4 @@ extern JitterMeter<uint16_t> avgJitter[NUMBER_ANALOG];
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WDT_500MS 500
|
|
||||||
|
|
||||||
#endif // _OPENTX_H_
|
#endif // _OPENTX_H_
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) OpenTX
|
* Copyright (C) OpenTX
|
||||||
*
|
*
|
||||||
* Based on code named
|
* Based on code named
|
||||||
* th9x - http://code.google.com/p/th9x
|
* th9x - http://code.google.com/p/th9x
|
||||||
* er9x - http://code.google.com/p/er9x
|
* er9x - http://code.google.com/p/er9x
|
||||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||||
*
|
*
|
||||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "serial_driver.h"
|
#include "serial_driver.h"
|
||||||
#include "opentx.h"
|
#include "opentx.h"
|
||||||
|
|
||||||
|
@ -292,8 +292,12 @@ void SERIAL_Init(void) {
|
||||||
// set 8N1
|
// set 8N1
|
||||||
UCSR0B = 0 | (0 << RXCIE0) | (0 << TXCIE0) | (0 << UDRIE0) | (0 << RXEN0) | (0 << TXEN0) | (0 << UCSZ02);
|
UCSR0B = 0 | (0 << RXCIE0) | (0 << TXCIE0) | (0 << UDRIE0) | (0 << RXEN0) | (0 << TXEN0) | (0 << UCSZ02);
|
||||||
UCSR0C = 0 | (1 << UCSZ01) | (1 << UCSZ00);
|
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_EnableTXD();
|
||||||
SERIAL_EnableRXD();
|
SERIAL_EnableRXD();
|
||||||
|
|
|
@ -175,6 +175,7 @@ extern uint32_t rotencSpeed;
|
||||||
void checkRotaryEncoder(void);
|
void checkRotaryEncoder(void);
|
||||||
|
|
||||||
// WDT driver
|
// WDT driver
|
||||||
|
#define WDTO_500MS 500
|
||||||
#define wdt_disable()
|
#define wdt_disable()
|
||||||
void watchdogInit(unsigned int duration);
|
void watchdogInit(unsigned int duration);
|
||||||
#if defined(WATCHDOG_DISABLED) || defined(SIMU)
|
#if defined(WATCHDOG_DISABLED) || defined(SIMU)
|
||||||
|
|
|
@ -234,6 +234,7 @@ void checkRotaryEncoder(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// WDT driver
|
// WDT driver
|
||||||
|
#define WDTO_500MS 500
|
||||||
#if defined(WATCHDOG_DISABLED) || defined(SIMU)
|
#if defined(WATCHDOG_DISABLED) || defined(SIMU)
|
||||||
#define wdt_enable(x)
|
#define wdt_enable(x)
|
||||||
#define wdt_reset()
|
#define wdt_reset()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue