altos/telebt-v3.0: Flip CTS/RTS pins for BT module
authorKeith Packard <keithp@keithp.com>
Mon, 25 Apr 2016 22:49:45 +0000 (18:49 -0400)
committerKeith Packard <keithp@keithp.com>
Mon, 25 Apr 2016 22:49:45 +0000 (18:49 -0400)
These are wired backwards, so ask that the right pins be used, which
requires switching to software control of the pins.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/telebt-v3.0/ao_pins.h
src/telebt-v3.0/ao_telebt.c

index a6a016622fa06aa364262d53db15b402cf9d92ea..5058494008c46559f9adcd9f75decc3e2067e108 100644 (file)
 #define USE_SERIAL_2_STDIN     1
 #define DELAY_SERIAL_2_STDIN   1
 #define USE_SERIAL_2_FLOW      1
+#define USE_SERIAL_2_SW_FLOW   1
 #define SERIAL_2_PA2_PA3       1
 #define SERIAL_2_PD5_PD6       0
+#define SERIAL_2_PORT_RTS      (&stm_gpioa)
+#define SERIAL_2_PIN_RTS       0
+#define SERIAL_2_PORT_CTS      (&stm_gpioa)
+#define SERIAL_2_PIN_CTS       1
 
 #define HAS_SERIAL_3           0
 #define USE_SERIAL_3_STDIN     0
index 44ee4f3dabe745369527fa3040b228369c21e382..1fe06b1ac42137beca30107ff12f4ef943ba156c 100644 (file)
@@ -31,7 +31,6 @@ main(void)
        ao_clock_init();
 
        ao_task_init();
-       ao_serial_init();
        ao_led_init(LEDS_AVAILABLE);
        ao_led_on(AO_LED_RED);
        ao_timer_init();