aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcoveeneman <marco-veeneman@hotmail.com>2016-05-11 20:40:28 +0200
committermarcoveeneman <marco-veeneman@hotmail.com>2016-05-11 20:40:28 +0200
commit32e712aae11da737c52f8739706db1f6fc48217b (patch)
tree2b322ca3c465a0d0adcc128d4e3123edd5654a68
parent50439f54df9826bb5963dafccbadc6e2116f6df8 (diff)
downloadChibiOS-Contrib-32e712aae11da737c52f8739706db1f6fc48217b.tar.gz
ChibiOS-Contrib-32e712aae11da737c52f8739706db1f6fc48217b.tar.bz2
ChibiOS-Contrib-32e712aae11da737c52f8739706db1f6fc48217b.zip
Tiva. UART. Fixed enabling and disabling UART modules 1-7.
-rw-r--r--os/hal/ports/TIVA/LLD/hal_serial_lld.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/os/hal/ports/TIVA/LLD/hal_serial_lld.c b/os/hal/ports/TIVA/LLD/hal_serial_lld.c
index bd1b81e..1bed97c 100644
--- a/os/hal/ports/TIVA/LLD/hal_serial_lld.c
+++ b/os/hal/ports/TIVA/LLD/hal_serial_lld.c
@@ -513,43 +513,43 @@ void sd_lld_start(SerialDriver *sdp, const SerialConfig *config)
#endif
#if TIVA_SERIAL_USE_UART1
if (&SD2 == sdp) {
- SYSCTL->RCGC.UART |= (1 << 1);
+ SYSCTL->RCGCUART |= (1 << 1);
nvicEnableVector(TIVA_UART1_NUMBER, TIVA_SERIAL_UART1_PRIORITY);
}
#endif
#if TIVA_SERIAL_USE_UART2
if (&SD3 == sdp) {
- SYSCTL->RCGC.UART |= (1 << 2); /* enable UART2 module */
+ SYSCTL->RCGCUART |= (1 << 2); /* enable UART2 module */
nvicEnableVector(TIVA_UART2_NUMBER, TIVA_SERIAL_UART2_PRIORITY);
}
#endif
#if TIVA_SERIAL_USE_UART3
if (&SD4 == sdp) {
- SYSCTL->RCGC.UART |= (1 << 3); /* enable UART3 module */
+ SYSCTL->RCGCUART |= (1 << 3); /* enable UART3 module */
nvicEnableVector(TIVA_UART3_NUMBER, TIVA_SERIAL_UART3_PRIORITY);
}
#endif
#if TIVA_SERIAL_USE_UART4
if (&SD5 == sdp) {
- SYSCTL->RCGC.UART |= (1 << 4); /* enable UART4 module */
+ SYSCTL->RCGCUART |= (1 << 4); /* enable UART4 module */
nvicEnableVector(TIVA_UART4_NUMBER, TIVA_SERIAL_UART4_PRIORITY);
}
#endif
#if TIVA_SERIAL_USE_UART5
if (&SD6 == sdp) {
- SYSCTL->RCGC.UART |= (1 << 5); /* enable UART5 module */
+ SYSCTL->RCGCUART |= (1 << 5); /* enable UART5 module */
nvicEnableVector(TIVA_UART5_NUMBER, TIVA_SERIAL_UART5_PRIORITY);
}
#endif
#if TIVA_SERIAL_USE_UART6
if (&SD7 == sdp) {
- SYSCTL->RCGC.UART |= (1 << 6); /* enable UART6 module */
+ SYSCTL->RCGCUART |= (1 << 6); /* enable UART6 module */
nvicEnableVector(TIVA_UART6_NUMBER, TIVA_SERIAL_UART6_PRIORITY);
}
#endif
#if TIVA_SERIAL_USE_UART7
if (&SD8 == sdp) {
- SYSCTL->RCGC.UART |= (1 << 7); /* enable UART7 module */
+ SYSCTL->RCGCUART |= (1 << 7); /* enable UART7 module */
nvicEnableVector(TIVA_UART7_NUMBER, TIVA_SERIAL_UART7_PRIORITY);
}
#endif
@@ -577,49 +577,49 @@ void sd_lld_stop(SerialDriver *sdp)
#endif
#if TIVA_SERIAL_USE_UART1
if (&SD2 == sdp) {
- SYSCTL->RCGC.UART &= ~(1 << 1); /* disable UART1 module */
+ SYSCTL->RCGCUART &= ~(1 << 1); /* disable UART1 module */
nvicDisableVector(TIVA_UART1_NUMBER);
return;
}
#endif
#if TIVA_SERIAL_USE_UART2
if (&SD3 == sdp) {
- SYSCTL->RCGC.UART &= ~(1 << 2); /* disable UART2 module */
+ SYSCTL->RCGCUART &= ~(1 << 2); /* disable UART2 module */
nvicDisableVector(TIVA_UART2_NUMBER);
return;
}
#endif
#if TIVA_SERIAL_USE_UART3
if (&SD4 == sdp) {
- SYSCTL->RCGC.UART &= ~(1 << 3); /* disable UART3 module */
+ SYSCTL->RCGCUART &= ~(1 << 3); /* disable UART3 module */
nvicDisableVector(TIVA_UART3_NUMBER);
return;
}
#endif
#if TIVA_SERIAL_USE_UART4
if (&SD5 == sdp) {
- SYSCTL->RCGC.UART &= ~(1 << 4); /* disable UART4 module */
+ SYSCTL->RCGCUART &= ~(1 << 4); /* disable UART4 module */
nvicDisableVector(TIVA_UART4_NUMBER);
return;
}
#endif
#if TIVA_SERIAL_USE_UART5
if (&SD6 == sdp) {
- SYSCTL->RCGC.UART &= ~(1 << 5); /* disable UART5 module */
+ SYSCTL->RCGCUART &= ~(1 << 5); /* disable UART5 module */
nvicDisableVector(TIVA_UART5_NUMBER);
return;
}
#endif
#if TIVA_SERIAL_USE_UART6
if (&SD7 == sdp) {
- SYSCTL->RCGC.UART &= ~(1 << 6); /* disable UART6 module */
+ SYSCTL->RCGCUART &= ~(1 << 6); /* disable UART6 module */
nvicDisableVector(TIVA_UART6_NUMBER);
return;
}
#endif
#if TIVA_SERIAL_USE_UART7
if (&SD8 == sdp) {
- SYSCTL->RCGC.UART &= ~(1 << 7); /* disable UART7 module */
+ SYSCTL->RCGCUART &= ~(1 << 7); /* disable UART7 module */
nvicDisableVector(TIVA_UART7_NUMBER);
return;
}