helping F7 uart
This commit is contained in:
parent
d0b0e91d72
commit
05db8477e8
|
@ -18,10 +18,7 @@ DDEFS += -DDISABLE_PIN_STATE_VALIDATION=TRUE
|
|||
|
||||
include $(BOARDS_DIR)/hellen/hellen-common144.mk
|
||||
|
||||
# serial ports only on F4
|
||||
ifeq ($(PROJECT_CPU),ARCH_STM32F4)
|
||||
DDEFS += $(PRIMARY_COMMUNICATION_PORT_USART2)
|
||||
endif
|
||||
DDEFS += $(PRIMARY_COMMUNICATION_PORT_USART2)
|
||||
|
||||
ifeq ($(PROJECT_CPU),ARCH_STM32F7)
|
||||
DDEFS += -DSHORT_BOARD_NAME=alphax-4chan-f7
|
||||
|
|
|
@ -46,11 +46,16 @@ void UartTsChannel::start(uint32_t baud) {
|
|||
.rxchar_cb = NULL,
|
||||
.rxerr_cb = NULL,
|
||||
.timeout_cb = NULL,
|
||||
#if defined(STM32F7XX)
|
||||
.timeout = 0,
|
||||
#endif
|
||||
.speed = baud,
|
||||
.cr1 = 0,
|
||||
.cr2 = USART_CR2_STOP1_BITS | USART_CR2_LINEN,
|
||||
.cr3 = 0,
|
||||
#if defined(STM32F4XX)
|
||||
.rxhalf_cb = NULL
|
||||
#endif
|
||||
};
|
||||
|
||||
uartStart(m_driver, &m_config);
|
||||
|
|
Loading…
Reference in New Issue