aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/platforms/SPC563/serial_lld.c10
-rw-r--r--os/hal/platforms/SPC563/serial_lld.h12
2 files changed, 11 insertions, 11 deletions
diff --git a/os/hal/platforms/SPC563/serial_lld.c b/os/hal/platforms/SPC563/serial_lld.c
index 0ad4bf312..e31615019 100644
--- a/os/hal/platforms/SPC563/serial_lld.c
+++ b/os/hal/platforms/SPC563/serial_lld.c
@@ -57,7 +57,7 @@ SerialDriver SD2;
*/
static const SerialConfig default_config = {
SERIAL_DEFAULT_BITRATE,
- SC_MODE_NORMAL | SC_MODE_PARITY_NONE
+ SD_MODE_NORMAL | SD_MODE_PARITY_NONE
};
/*===========================================================================*/
@@ -78,12 +78,12 @@ static void esci_init(SerialDriver *sdp) {
escip->CR1.R = 0;
escip->LCR.R = 0;
escip->CR1.B.SBR = SPC563_SYSCLK / (16 * sdp->config->sc_speed);
- if (mode & SC_MODE_LOOPBACK)
+ if (mode & SD_MODE_LOOPBACK)
escip->CR1.B.LOOPS = 1;
- switch (mode & SC_MODE_PARITY) {
- case SC_MODE_PARITY_ODD:
+ switch (mode & SD_MODE_PARITY) {
+ case SD_MODE_PARITY_ODD:
escip->CR1.B.PT = 1;
- case SC_MODE_PARITY_EVEN:
+ case SD_MODE_PARITY_EVEN:
escip->CR1.B.PE = 1;
escip->CR1.B.M = 1; /* Makes it 8 bits data + 1 bit parity. */
default:
diff --git a/os/hal/platforms/SPC563/serial_lld.h b/os/hal/platforms/SPC563/serial_lld.h
index 8bfab7a67..f3df7b73a 100644
--- a/os/hal/platforms/SPC563/serial_lld.h
+++ b/os/hal/platforms/SPC563/serial_lld.h
@@ -34,13 +34,13 @@
/* Driver constants. */
/*===========================================================================*/
-#define SC_MODE_PARITY 0x03 /**< @brief Parity field mask. */
-#define SC_MODE_PARITY_NONE 0x00 /**< @brief No parity. */
-#define SC_MODE_PARITY_EVEN 0x01 /**< @brief Even parity. */
-#define SC_MODE_PARITY_ODD 0x02 /**< @brief Odd parity. */
+#define SD_MODE_PARITY 0x03 /**< @brief Parity field mask. */
+#define SD_MODE_PARITY_NONE 0x00 /**< @brief No parity. */
+#define SD_MODE_PARITY_EVEN 0x01 /**< @brief Even parity. */
+#define SD_MODE_PARITY_ODD 0x02 /**< @brief Odd parity. */
-#define SC_MODE_NORMAL 0x00 /**< @brief Normal operations. */
-#define SC_MODE_LOOPBACK 0x80 /**< @brief Internal loopback. */
+#define SD_MODE_NORMAL 0x00 /**< @brief Normal operations. */
+#define SD_MODE_LOOPBACK 0x80 /**< @brief Internal loopback. */
/*===========================================================================*/
/* Driver pre-compile time settings. */