[X9D] UART driver renamed, work on debug output
This commit is contained in:
+1
-2
@@ -485,7 +485,7 @@ ifeq ($(PCB), X9D)
|
|||||||
EEPROMSRC = eeprom_avr.cpp # TODO later eeprom_conversions.cpp
|
EEPROMSRC = eeprom_avr.cpp # TODO later eeprom_conversions.cpp
|
||||||
PULSESSRC = pulses_arm.cpp
|
PULSESSRC = pulses_arm.cpp
|
||||||
CPPSRC += audio_arm.cpp
|
CPPSRC += audio_arm.cpp
|
||||||
CPPSRC += x9d/pwr_driver.cpp x9d/pulses_driver.cpp x9d/keys_driver.cpp x9d/adc_driver.cpp x9d/trainer_driver.cpp x9d/audio_driver.cpp x9d/delays.cpp
|
CPPSRC += x9d/pwr_driver.cpp x9d/pulses_driver.cpp x9d/keys_driver.cpp x9d/adc_driver.cpp x9d/trainer_driver.cpp x9d/audio_driver.cpp x9d/delays.cpp x9d/uart_driver.cpp
|
||||||
CPPSRC += bmp.cpp monitors_views.cpp
|
CPPSRC += bmp.cpp monitors_views.cpp
|
||||||
SRC += x9d/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c
|
SRC += x9d/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Source/Templates/system_stm32f2xx.c
|
||||||
SRC += x9d/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_gpio.c
|
SRC += x9d/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/src/stm32f2xx_gpio.c
|
||||||
@@ -509,7 +509,6 @@ ifeq ($(PCB), X9D)
|
|||||||
|
|
||||||
ifeq ($(DEBUG), YES)
|
ifeq ($(DEBUG), YES)
|
||||||
CPPSRC += debug.cpp
|
CPPSRC += debug.cpp
|
||||||
CPPSRC += x9d/debug_driver.cpp
|
|
||||||
SRC += sky9x/syscalls.c
|
SRC += sky9x/syscalls.c
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -411,7 +411,7 @@
|
|||||||
#define TR_BLOFFBRIGHTNESS INDENT"Luminosit\200 OFF"
|
#define TR_BLOFFBRIGHTNESS INDENT"Luminosit\200 OFF"
|
||||||
#define TR_SPLASHSCREEN "Ecran d'accueil"
|
#define TR_SPLASHSCREEN "Ecran d'accueil"
|
||||||
#define TR_THROTTLEWARNING "Alerte gaz"
|
#define TR_THROTTLEWARNING "Alerte gaz"
|
||||||
#define TR_SWITCHWARNING TR("Alerte Int","Alerte interrupt.")
|
#define TR_SWITCHWARNING TR("Alerte int","Alerte interrupt.")
|
||||||
#define TR_TIMEZONE "Fuseau horaire"
|
#define TR_TIMEZONE "Fuseau horaire"
|
||||||
#define TR_RXCHANNELORD TR("Ordre voies RX","Ordre des voies pr\200f\200r\200")
|
#define TR_RXCHANNELORD TR("Ordre voies RX","Ordre des voies pr\200f\200r\200")
|
||||||
#define TR_SLAVE "El\201ve"
|
#define TR_SLAVE "El\201ve"
|
||||||
@@ -509,7 +509,7 @@
|
|||||||
#define TR_CURRENT_CALIB "Calib. Courant"
|
#define TR_CURRENT_CALIB "Calib. Courant"
|
||||||
#define TR_VOLTAGE INDENT"Tension"
|
#define TR_VOLTAGE INDENT"Tension"
|
||||||
#define TR_CURRENT INDENT"Courant"
|
#define TR_CURRENT INDENT"Courant"
|
||||||
#define TR_SELECT_MODEL "S\200lect Mod\201le"
|
#define TR_SELECT_MODEL "S\200lect. Mod\201le"
|
||||||
#define TR_CREATE_MODEL "Cr\200er Mod\201le"
|
#define TR_CREATE_MODEL "Cr\200er Mod\201le"
|
||||||
#define TR_COPY_MODEL "Copier Mod\201le"
|
#define TR_COPY_MODEL "Copier Mod\201le"
|
||||||
#define TR_MOVE_MODEL "D\200placer Mod\201le"
|
#define TR_MOVE_MODEL "D\200placer Mod\201le"
|
||||||
|
|||||||
@@ -103,6 +103,13 @@ void configure_pins( uint32_t pins, uint16_t config )
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(DEBUG)
|
||||||
|
void debugPutc(const char c)
|
||||||
|
{
|
||||||
|
uartPutc(c);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8_t getTemperature()
|
uint8_t getTemperature()
|
||||||
{
|
{
|
||||||
return temperature + g_eeGeneral.temperatureCalib;
|
return temperature + g_eeGeneral.temperatureCalib;
|
||||||
@@ -181,7 +188,7 @@ void boardInit()
|
|||||||
delaysInit();
|
delaysInit();
|
||||||
audioInit();
|
audioInit();
|
||||||
#if defined(DEBUG)
|
#if defined(DEBUG)
|
||||||
debugInit();
|
uartInit(DEBUG_UART_BAUDRATE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// TODO init_ppm() ;
|
// TODO init_ppm() ;
|
||||||
|
|||||||
+2
-3
@@ -79,12 +79,11 @@ extern uint16_t sessionTimer;
|
|||||||
#define SLAVE_MODE() (0/*pwrCheck() == e_power_trainer*/)
|
#define SLAVE_MODE() (0/*pwrCheck() == e_power_trainer*/)
|
||||||
|
|
||||||
void delaysInit();
|
void delaysInit();
|
||||||
void debugInit();
|
|
||||||
|
|
||||||
#define DEBUG_UART_BAUDRATE 115200
|
#define DEBUG_UART_BAUDRATE 115200
|
||||||
|
|
||||||
void uartInit(void);
|
void uartInit(uint32_t baudrate);
|
||||||
void uartSendChar(uint8_t c);
|
void uartPutc(const char c);
|
||||||
|
|
||||||
void delaysInit(void);
|
void delaysInit(void);
|
||||||
void delay_01us(uint16_t nb);
|
void delay_01us(uint16_t nb);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#include "../open9x.h"
|
#include "../open9x.h"
|
||||||
|
|
||||||
void debugInit(void)
|
void uartInit(uint32_t baudrate)
|
||||||
{
|
{
|
||||||
USART_InitTypeDef USART_InitStructure;
|
USART_InitTypeDef USART_InitStructure;
|
||||||
GPIO_InitTypeDef GPIO_InitStructure;
|
GPIO_InitTypeDef GPIO_InitStructure;
|
||||||
@@ -54,7 +54,7 @@ void debugInit(void)
|
|||||||
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
|
||||||
GPIO_Init(GPIO_UART, &GPIO_InitStructure);
|
GPIO_Init(GPIO_UART, &GPIO_InitStructure);
|
||||||
|
|
||||||
USART_InitStructure.USART_BaudRate = DEBUG_UART_BAUDRATE;
|
USART_InitStructure.USART_BaudRate = baudrate;
|
||||||
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
|
USART_InitStructure.USART_WordLength = USART_WordLength_8b;
|
||||||
USART_InitStructure.USART_StopBits = USART_StopBits_1;
|
USART_InitStructure.USART_StopBits = USART_StopBits_1;
|
||||||
USART_InitStructure.USART_Parity = USART_Parity_No;
|
USART_InitStructure.USART_Parity = USART_Parity_No;
|
||||||
@@ -65,7 +65,7 @@ void debugInit(void)
|
|||||||
USART_Cmd(UART_DEBUG, ENABLE);
|
USART_Cmd(UART_DEBUG, ENABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void debugPutc(const char c)
|
void uartPutc(const char c)
|
||||||
{
|
{
|
||||||
USART_SendData(UART_DEBUG, c);
|
USART_SendData(UART_DEBUG, c);
|
||||||
|
|
||||||
Reference in New Issue
Block a user