From 9e15416b0b807a43b643249acdf664057a875e10 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Tue, 21 Feb 2017 21:17:14 +0000 Subject: usb-rs485: update to latest library master --- tests/usb-serial-rs485/main-stm32f4-disco.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/usb-serial-rs485/main-stm32f4-disco.c') diff --git a/tests/usb-serial-rs485/main-stm32f4-disco.c b/tests/usb-serial-rs485/main-stm32f4-disco.c index 8678c43..ac3cdff 100644 --- a/tests/usb-serial-rs485/main-stm32f4-disco.c +++ b/tests/usb-serial-rs485/main-stm32f4-disco.c @@ -77,7 +77,7 @@ void usart2_isr(void) gpio_really(GPIOA, GPIO5, 1); // usbser-rxne() /* Check if we were called because of RXNE. */ - if (usart_get_interrupt_source(USART2, USART_SR_RXNE)) { + if (usart_get_flag(USART2, USART_SR_RXNE)) { gpio_set(LED_RX_PORT, LED_RX_PIN); uint8_t c = usart_recv(USART2); if (ringb_put(&rx_ring, c)) { @@ -92,7 +92,7 @@ void usart2_isr(void) gpio_clear(LED_RX_PORT, LED_RX_PIN); } // usbser-irq-txe() - if (usart_get_interrupt_source(USART2, USART_SR_TXE)) { + if (usart_get_flag(USART2, USART_SR_TXE)) { if (ringb_depth(&tx_ring) == 0) { // turn off tx empty interrupts, nothing left to send usart_disable_tx_interrupt(USART2); @@ -105,7 +105,7 @@ void usart2_isr(void) } } // usbser-irq-txc? rs485 is auto on some devices, but can be emulated anyway -// if (usart_get_interrupt_source(USART2, USART_SR_TC)) { +// if (usart_get_flag(USART2, USART_SR_TC)) { // ER_DPRINTF("TC"); // // turn off the complete irqs, we're done now. // USART_SR(USART2) &= ~USART_SR_TC; -- cgit