aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/TIVA/TM4C123x/SPI/main.c
diff options
context:
space:
mode:
authormarcoveeneman <marco-veeneman@hotmail.com>2016-11-21 22:26:49 +0100
committerGitHub <noreply@github.com>2016-11-21 22:26:49 +0100
commit7f7fe88e1473a15b46fe8a64c856932183f40047 (patch)
tree86fb27ce70abbb6a9e8a6504aedc84d70688fc76 /testhal/TIVA/TM4C123x/SPI/main.c
parent319c9f9ee259cc7ae05bbff952b149118e6dc032 (diff)
parentf6f6bf3918d0534606d5b9ecb48f22624e9369c0 (diff)
downloadChibiOS-Contrib-7f7fe88e1473a15b46fe8a64c856932183f40047.tar.gz
ChibiOS-Contrib-7f7fe88e1473a15b46fe8a64c856932183f40047.tar.bz2
ChibiOS-Contrib-7f7fe88e1473a15b46fe8a64c856932183f40047.zip
Merge pull request #100 from marcoveeneman/tiva-improvements
Tiva improvements
Diffstat (limited to 'testhal/TIVA/TM4C123x/SPI/main.c')
-rw-r--r--testhal/TIVA/TM4C123x/SPI/main.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/testhal/TIVA/TM4C123x/SPI/main.c b/testhal/TIVA/TM4C123x/SPI/main.c
index 7fa05ee..d4bbad2 100644
--- a/testhal/TIVA/TM4C123x/SPI/main.c
+++ b/testhal/TIVA/TM4C123x/SPI/main.c
@@ -104,15 +104,11 @@ int main(void)
halInit();
chSysInit();
- palSetPadMode(GPIOA, GPIOA_SSI0_CLK, PAL_MODE_OUTPUT_PUSHPULL |
- PAL_MODE_ALTERNATE(2));
- palSetPadMode(GPIOA, GPIOA_SSI0_RX, PAL_MODE_OUTPUT_PUSHPULL |
- PAL_MODE_ALTERNATE(2));
- palSetPadMode(GPIOA, GPIOA_SSI0_TX, PAL_MODE_OUTPUT_PUSHPULL |
- PAL_MODE_ALTERNATE(2));
- palSetPadMode(GPIOA, GPIOA_PIN3, PAL_MODE_OUTPUT_PUSHPULL);
-
- palSetPadMode(GPIOF, GPIOF_LED_GREEN, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetLineMode(LINE_SSI0_CLK, PAL_MODE_OUTPUT_PUSHPULL | PAL_MODE_ALTERNATE(2));
+ palSetLineMode(LINE_SSI0_RX, PAL_MODE_OUTPUT_PUSHPULL | PAL_MODE_ALTERNATE(2));
+ palSetLineMode(LINE_SSI0_TX, PAL_MODE_OUTPUT_PUSHPULL | PAL_MODE_ALTERNATE(2));
+ palSetLineMode(LINE_LED_GREEN, PAL_MODE_OUTPUT_PUSHPULL);
+ palSetPadMode(GPIOA, GPIOA_PIN3, PAL_MODE_OUTPUT_PUSHPULL);
/*
* Prepare transmit pattern.
@@ -124,10 +120,16 @@ int main(void)
/*
* Starting the transmitter and receiver threads.
*/
- chThdCreateStatic(spi_thread_1_wa, sizeof(spi_thread_1_wa),
- NORMALPRIO + 1, spi_thread_1, NULL);
- chThdCreateStatic(spi_thread_2_wa, sizeof(spi_thread_2_wa),
- NORMALPRIO + 1, spi_thread_2, NULL);
+ chThdCreateStatic(spi_thread_1_wa,
+ sizeof(spi_thread_1_wa),
+ NORMALPRIO + 1,
+ spi_thread_1,
+ NULL);
+ chThdCreateStatic(spi_thread_2_wa,
+ sizeof(spi_thread_2_wa),
+ NORMALPRIO + 1,
+ spi_thread_2,
+ NULL);
/*
* Normal main() thread activity