altos/telefireone-v1.0: Track ao_led_init API change
[fw/altos] / src / stm / ao_serial_stm.c
index ef56231334e28894a980f08042a1e72c8530a40f..7a552e5d86a5884d0e5653081b11c3921a3b8999 100644 (file)
@@ -33,7 +33,7 @@ _ao_usart_tx_start(struct ao_stm_usart *usart)
 {
        if (!ao_fifo_empty(usart->tx_fifo)) {
 #if HAS_SERIAL_SW_FLOW
-               if (usart->gpio_cts && ao_gpio_get(usart->gpio_cts, usart->pin_cts, foo) == 1) {
+               if (usart->gpio_cts && ao_gpio_get(usart->gpio_cts, usart->pin_cts) == 1) {
                        ao_exti_enable(usart->gpio_cts, usart->pin_cts);
                        return 0;
                }
@@ -60,20 +60,20 @@ _ao_usart_cts(struct ao_stm_usart *usart)
 #endif
 
 static void
-_ao_usart_rx(struct ao_stm_usart *usart, int stdin)
+_ao_usart_rx(struct ao_stm_usart *usart, int is_stdin)
 {
        if (usart->reg->sr & (1 << STM_USART_SR_RXNE)) {
                if (!ao_fifo_full(usart->rx_fifo)) {
                        ao_fifo_insert(usart->rx_fifo, usart->reg->dr);
                        ao_wakeup(&usart->rx_fifo);
-                       if (stdin)
+                       if (is_stdin)
                                ao_wakeup(&ao_stdin_ready);
 #if HAS_SERIAL_SW_FLOW
                        /* If the fifo is nearly full, turn off RTS and wait
                         * for it to drain a bunch
                         */
                        if (usart->gpio_rts && ao_fifo_mostly(usart->rx_fifo)) {
-                               ao_gpio_set(usart->gpio_rts, usart->pin_rts, usart->pin_rts, 1);
+                               ao_gpio_set(usart->gpio_rts, usart->pin_rts, 1);
                                usart->rts = 0;
                        }
 #endif
@@ -84,9 +84,9 @@ _ao_usart_rx(struct ao_stm_usart *usart, int stdin)
 }
 
 static void
-ao_usart_isr(struct ao_stm_usart *usart, int stdin)
+ao_usart_isr(struct ao_stm_usart *usart, int is_stdin)
 {
-       _ao_usart_rx(usart, stdin);
+       _ao_usart_rx(usart, is_stdin);
 
        if (!_ao_usart_tx_start(usart))
                usart->reg->cr1 &= ~(1<< STM_USART_CR1_TXEIE);
@@ -118,7 +118,7 @@ _ao_usart_pollchar(struct ao_stm_usart *usart)
 #if HAS_SERIAL_SW_FLOW
                /* If we've cleared RTS, check if there's space now and turn it back on */
                if (usart->gpio_rts && usart->rts == 0 && ao_fifo_barely(usart->rx_fifo)) {
-                       ao_gpio_set(usart->gpio_rts, usart->pin_rts, foo, 0);
+                       ao_gpio_set(usart->gpio_rts, usart->pin_rts, 0);
                        usart->rts = 1;
                }
 #endif
@@ -339,7 +339,7 @@ ao_serial2_set_speed(uint8_t speed)
 }
 
 #if HAS_SERIAL_SW_FLOW
-void
+static void
 ao_serial2_cts(void)
 {
        _ao_usart_cts(&ao_stm_usart2);
@@ -403,7 +403,7 @@ ao_serial_set_sw_rts_cts(struct ao_stm_usart *usart,
 {
        /* Pull RTS low to note that there's space in the FIFO
         */
-       ao_enable_output(port_rts, pin_rts, foo, 0);
+       ao_enable_output(port_rts, pin_rts, 0);
        usart->gpio_rts = port_rts;
        usart->pin_rts = pin_rts;
        usart->rts = 1;