From 4e08d013d07e73b292f0b812ca06adfbfed93033 Mon Sep 17 00:00:00 2001 From: marcoveeneman Date: Mon, 3 Jul 2017 22:05:46 +0200 Subject: Improved ADC testhal application. --- testhal/TIVA/TM4C123x/ADC/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'testhal/TIVA') diff --git a/testhal/TIVA/TM4C123x/ADC/main.c b/testhal/TIVA/TM4C123x/ADC/main.c index c538e6d..cbb7362 100644 --- a/testhal/TIVA/TM4C123x/ADC/main.c +++ b/testhal/TIVA/TM4C123x/ADC/main.c @@ -128,6 +128,10 @@ int main(void) halInit(); chSysInit(); + /* Configure RX and TX pins for UART0.*/ + palSetLineMode(LINE_UART0_RX, PAL_MODE_INPUT | PAL_MODE_ALTERNATE(1)); + palSetLineMode(LINE_UART0_TX, PAL_MODE_INPUT | PAL_MODE_ALTERNATE(1)); + sdStart(&SD1, NULL); chprintf((BaseSequentialStream *)&SD1, "Starting ADC0..."); @@ -154,7 +158,7 @@ int main(void) while (TRUE) { chThdSleepMilliseconds(500); - chprintf((BaseSequentialStream *)&SD1, "A:%d\tB:%d\r\n", nx, ny); + chprintf((BaseSequentialStream *)&SD1, "A:%d\tB:%d\ttmp:%d\r\n", nx, ny, temp); } return 0; -- cgit v1.2.3