diff options
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/platforms/STM8L/serial_lld.c | 12 | ||||
-rw-r--r-- | os/hal/platforms/STM8L/serial_lld.h | 13 | ||||
-rw-r--r-- | os/hal/platforms/STM8L/shared_isr.c | 1 |
3 files changed, 18 insertions, 8 deletions
diff --git a/os/hal/platforms/STM8L/serial_lld.c b/os/hal/platforms/STM8L/serial_lld.c index 57749f371..70b130549 100644 --- a/os/hal/platforms/STM8L/serial_lld.c +++ b/os/hal/platforms/STM8L/serial_lld.c @@ -142,16 +142,16 @@ void sd_lld_init(void) { #if STM8L_SERIAL_USE_USART2
sdObjectInit(&SD2, NULL, notify2);
- CLK->PCKENR1 |= CLK_PCKENR1_USART2; /* PCKEN13, clock source. */
- USART2->CR1 = USART2_CR1_USARTD; /* USARTD (low power). */
- SD1.usart = USART2;
+ CLK->PCKENR3 |= CLK_PCKENR3_USART2; /* PCKEN13, clock source. */
+ USART2->CR1 = USART_CR1_USARTD; /* USARTD (low power). */
+ SD2.usart = USART2;
#endif
#if STM8L_SERIAL_USE_USART3
sdObjectInit(&SD3, NULL, notify3);
- CLK->PCKENR1 |= CLK_PCKENR1_USART3; /* PCKEN13, clock source. */
- USART3->CR1 = USART3_CR1_USARTD; /* USARTD (low power). */
- SD1.usart = USART3;
+ CLK->PCKENR3 |= CLK_PCKENR3_USART3; /* PCKEN13, clock source. */
+ USART3->CR1 = USART_CR1_USARTD; /* USARTD (low power). */
+ SD3.usart = USART3;
#endif
}
diff --git a/os/hal/platforms/STM8L/serial_lld.h b/os/hal/platforms/STM8L/serial_lld.h index b523f048f..0447c91aa 100644 --- a/os/hal/platforms/STM8L/serial_lld.h +++ b/os/hal/platforms/STM8L/serial_lld.h @@ -167,6 +167,9 @@ typedef struct { } \
}
+/**
+ * @brief USART1 TX interrupt handler segment. + */
#define _USART1_TRANSMIT_ISR() { \
if (USART1->SR & USART_SR_TXE) { \
msg_t b; \
@@ -183,7 +186,7 @@ typedef struct { #if STM8L_SERIAL_USE_USART2 || defined(__DOXYGEN__)
/**
- * @brief USART1 RX interrupt handler segment. + * @brief USART2 RX interrupt handler segment. */
#define _USART2_RECEIVE_ISR() { \
uint8_t sr = USART2->SR; \
@@ -197,6 +200,9 @@ typedef struct { } \
}
+/**
+ * @brief USART2 TX interrupt handler segment. + */
#define _USART2_TRANSMIT_ISR() { \
if (USART2->SR & USART_SR_TXE) { \
msg_t b; \
@@ -213,7 +219,7 @@ typedef struct { #if STM8L_SERIAL_USE_USART3 || defined(__DOXYGEN__)
/**
- * @brief USART1 RX interrupt handler segment. + * @brief USART3 RX interrupt handler segment. */
#define _USART3_RECEIVE_ISR() { \
uint8_t sr = USART3->SR; \
@@ -227,6 +233,9 @@ typedef struct { } \
}
+/**
+ * @brief USART3 TX interrupt handler segment. + */
#define _USART3_TRANSMIT_ISR() { \
if (USART3->SR & USART_SR_TXE) { \
msg_t b; \
diff --git a/os/hal/platforms/STM8L/shared_isr.c b/os/hal/platforms/STM8L/shared_isr.c index 6709442c5..e89e1f78c 100644 --- a/os/hal/platforms/STM8L/shared_isr.c +++ b/os/hal/platforms/STM8L/shared_isr.c @@ -45,6 +45,7 @@ * @details This handler is shared between the following sources:
* - TIM2 update/overflow/trigger/break.
* - USART2 transmit.
+ * .
*
* @isr
*/
|