diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-02-20 10:52:39 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-02-20 10:52:39 +0000 |
commit | ee9a1b480bf34513eaf3494f27f13f2f80ca578c (patch) | |
tree | 9dcf6e0ed4cfbdc4db0bce83547def1a76f0ddba /os/hal | |
parent | 5d983fd514b3fcad1f7a27faf74e21789d93e99a (diff) | |
download | ChibiOS-ee9a1b480bf34513eaf3494f27f13f2f80ca578c.tar.gz ChibiOS-ee9a1b480bf34513eaf3494f27f13f2f80ca578c.tar.bz2 ChibiOS-ee9a1b480bf34513eaf3494f27f13f2f80ca578c.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1643 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/platforms/SPC563/serial_lld.c | 10 | ||||
-rw-r--r-- | os/hal/platforms/SPC563/serial_lld.h | 12 |
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. */
|