diff options
author | walkerstop <walkerstop@gmail.com> | 2018-05-01 01:00:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-01 01:00:33 -0700 |
commit | 40db44f540436398e0840544044154d13eee63b6 (patch) | |
tree | dad3f1f3b6ac3927484ee22002a947662a8a0173 /testhal/TIVA/TM4C123x/I2C/main.c | |
parent | 4e9f077fb10255dced1da4d5d2ad9f8ae41442a2 (diff) | |
parent | d4d384557df0e8e7a8071553448b0c42849f98c0 (diff) | |
download | ChibiOS-Contrib-40db44f540436398e0840544044154d13eee63b6.tar.gz ChibiOS-Contrib-40db44f540436398e0840544044154d13eee63b6.tar.bz2 ChibiOS-Contrib-40db44f540436398e0840544044154d13eee63b6.zip |
Merge branch 'master' into master
Diffstat (limited to 'testhal/TIVA/TM4C123x/I2C/main.c')
-rw-r--r-- | testhal/TIVA/TM4C123x/I2C/main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/testhal/TIVA/TM4C123x/I2C/main.c b/testhal/TIVA/TM4C123x/I2C/main.c index 5f58176..0253710 100644 --- a/testhal/TIVA/TM4C123x/I2C/main.c +++ b/testhal/TIVA/TM4C123x/I2C/main.c @@ -1,5 +1,5 @@ /* - Copyright (C) 2014..2016 Marco Veeneman + Copyright (C) 2014..2017 Marco Veeneman Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ static const I2CConfig i2cfg = int main(void) { msg_t status = MSG_OK; - systime_t tmo = MS2ST(100); + systime_t tmo = OSAL_MS2I(100); /* * System initializations. @@ -70,8 +70,8 @@ int main(void) chSysInit(); /* Configure RX and TX pins for UART0.*/ - palSetPadMode(GPIOA, GPIOA_UART0_RX, PAL_MODE_INPUT | PAL_MODE_ALTERNATE(1)); - palSetPadMode(GPIOA, GPIOA_UART0_TX, PAL_MODE_INPUT | PAL_MODE_ALTERNATE(1)); + palSetLineMode(LINE_UART0_RX, PAL_MODE_INPUT | PAL_MODE_ALTERNATE(1)); + palSetLineMode(LINE_UART0_TX, PAL_MODE_INPUT | PAL_MODE_ALTERNATE(1)); /* * Start the serial driver with the default configuration. @@ -79,8 +79,8 @@ int main(void) sdStart(&SD1, NULL); /* Configure SCK and SCL pins for I2C0.*/ - palSetPadMode(GPIOB, GPIOB_I2C0_SCL, PAL_MODE_OUTPUT_PUSHPULL | PAL_MODE_ALTERNATE(3)); - palSetPadMode(GPIOB, GPIOB_I2C0_SDA, PAL_MODE_OUTPUT_OPENDRAIN | PAL_MODE_ALTERNATE(3)); + palSetLineMode(LINE_I2C0_SCL, PAL_MODE_OUTPUT_PUSHPULL | PAL_MODE_ALTERNATE(3)); + palSetLineMode(LINE_I2C0_SDA, PAL_MODE_OUTPUT_OPENDRAIN | PAL_MODE_ALTERNATE(3)); /* * Start the i2c driver with the custom configuration. |