aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/serial_lld.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-16 17:38:22 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-16 17:38:22 +0000
commit3a94137eb38857d9780a5ef65be30736804dea46 (patch)
tree3f2742af90d08db7c09a6ba9d0304a49225000fd /os/hal/platforms/STM32/serial_lld.c
parent46538d795be83d1d54b132e7d57213cb6d975c51 (diff)
downloadChibiOS-3a94137eb38857d9780a5ef65be30736804dea46.tar.gz
ChibiOS-3a94137eb38857d9780a5ef65be30736804dea46.tar.bz2
ChibiOS-3a94137eb38857d9780a5ef65be30736804dea46.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3320 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/serial_lld.c')
-rw-r--r--os/hal/platforms/STM32/serial_lld.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/os/hal/platforms/STM32/serial_lld.c b/os/hal/platforms/STM32/serial_lld.c
index 5aaa60de9..ce412dedb 100644
--- a/os/hal/platforms/STM32/serial_lld.c
+++ b/os/hal/platforms/STM32/serial_lld.c
@@ -376,35 +376,35 @@ void sd_lld_start(SerialDriver *sdp, const SerialConfig *config) {
if (sdp->state == SD_STOP) {
#if STM32_SERIAL_USE_USART1
if (&SD1 == sdp) {
- RCC->APB2ENR |= RCC_APB2ENR_USART1EN;
+ rccEnableUSART1(FALSE);
NVICEnableVector(USART1_IRQn,
CORTEX_PRIORITY_MASK(STM32_SERIAL_USART1_PRIORITY));
}
#endif
#if STM32_SERIAL_USE_USART2
if (&SD2 == sdp) {
- RCC->APB1ENR |= RCC_APB1ENR_USART2EN;
+ rccEnableUSART2(FALSE);
NVICEnableVector(USART2_IRQn,
CORTEX_PRIORITY_MASK(STM32_SERIAL_USART2_PRIORITY));
}
#endif
#if STM32_SERIAL_USE_USART3
if (&SD3 == sdp) {
- RCC->APB1ENR |= RCC_APB1ENR_USART3EN;
+ rccEnableUSART3(FALSE);
NVICEnableVector(USART3_IRQn,
CORTEX_PRIORITY_MASK(STM32_SERIAL_USART3_PRIORITY));
}
#endif
#if STM32_SERIAL_USE_UART4
if (&SD4 == sdp) {
- RCC->APB1ENR |= RCC_APB1ENR_UART4EN;
+ rccEnableUART4(FALSE);
NVICEnableVector(UART4_IRQn,
CORTEX_PRIORITY_MASK(STM32_SERIAL_UART4_PRIORITY));
}
#endif
#if STM32_SERIAL_USE_UART5
if (&SD5 == sdp) {
- RCC->APB1ENR |= RCC_APB1ENR_UART5EN;
+ rccEnableUART5(FALSE);
NVICEnableVector(UART5_IRQn,
CORTEX_PRIORITY_MASK(STM32_SERIAL_UART5_PRIORITY));
}
@@ -428,35 +428,35 @@ void sd_lld_stop(SerialDriver *sdp) {
usart_deinit(sdp->usart);
#if STM32_SERIAL_USE_USART1
if (&SD1 == sdp) {
- RCC->APB2ENR &= ~RCC_APB2ENR_USART1EN;
+ rccDisableUSART1(FALSE);
NVICDisableVector(USART1_IRQn);
return;
}
#endif
#if STM32_SERIAL_USE_USART2
if (&SD2 == sdp) {
- RCC->APB1ENR &= ~RCC_APB1ENR_USART2EN;
+ rccDisableUSART2(FALSE);
NVICDisableVector(USART2_IRQn);
return;
}
#endif
#if STM32_SERIAL_USE_USART3
if (&SD3 == sdp) {
- RCC->APB1ENR &= ~RCC_APB1ENR_USART3EN;
+ rccDisableUSART3(FALSE);
NVICDisableVector(USART3_IRQn);
return;
}
#endif
#if STM32_SERIAL_USE_UART4
if (&SD4 == sdp) {
- RCC->APB1ENR &= ~RCC_APB1ENR_UART4EN;
+ rccDisableUART4(FALSE);
NVICDisableVector(UART4_IRQn);
return;
}
#endif
#if STM32_SERIAL_USE_UART5
if (&SD5 == sdp) {
- RCC->APB1ENR &= ~RCC_APB1ENR_UART5EN;
+ rccDisableUART5(FALSE);
NVICDisableVector(UART5_IRQn);
return;
}