aboutsummaryrefslogtreecommitdiffstats
path: root/os/io/platforms/AVR
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-08-27 15:41:14 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-08-27 15:41:14 +0000
commit6cb018ac39eb99ae0668d00cdecfa48f08dfca89 (patch)
tree03e1d4ad565c52852f7bc991761dc08acc20ed43 /os/io/platforms/AVR
parent46827225678cea64b9519813fb60d5a0d388676f (diff)
downloadChibiOS-6cb018ac39eb99ae0668d00cdecfa48f08dfca89.tar.gz
ChibiOS-6cb018ac39eb99ae0668d00cdecfa48f08dfca89.tar.bz2
ChibiOS-6cb018ac39eb99ae0668d00cdecfa48f08dfca89.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1107 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/io/platforms/AVR')
-rw-r--r--os/io/platforms/AVR/serial_lld.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/os/io/platforms/AVR/serial_lld.c b/os/io/platforms/AVR/serial_lld.c
index e0e711242..c5a573423 100644
--- a/os/io/platforms/AVR/serial_lld.c
+++ b/os/io/platforms/AVR/serial_lld.c
@@ -55,7 +55,7 @@ static const SerialDriverConfig default_config = {
/*===========================================================================*/
static void set_error(uint8_t sra, SerialDriver *sdp) {
- dflags_t sts = 0;
+ sdflags_t sts = 0;
if (sra & (1 << DOR))
sts |= SD_OVERRUN_ERROR;
@@ -78,7 +78,7 @@ static void notify1(void) {
* @brief USART0 initialization.
* @param[in] config the architecture-dependent serial driver configuration
*/
-void usart0_init(SerialDriverConfig *config) {
+void usart0_init(const SerialDriverConfig *config) {
UBRR0L = config->brr;
UBRR0H = config->brr >> 8;
@@ -108,7 +108,7 @@ static void notify2(void) {
* @brief USART1 initialization.
* @param[in] config the architecture-dependent serial driver configuration
*/
-void usart1_init(SerialDriverConfig *config) {
+void usart1_init(const SerialDriverConfig *config) {
UBRR1L = config->brr;
UBRR1H = config->brr >> 8;
@@ -140,9 +140,9 @@ CH_IRQ_HANDLER(USART0_RX_vect) {
sra = UCSR0A;
if (sra & ((1 << DOR) | (1 << UPE) | (1 << FE)))
- set_error(sra, &SER1);
+ set_error(sra, &SD1);
chSysLockFromIsr();
- sdIncomingDataI(&SER1, UDR0);
+ sdIncomingDataI(&SD1, UDR0);
chSysUnlockFromIsr();
CH_IRQ_EPILOGUE();
@@ -173,9 +173,9 @@ CH_IRQ_HANDLER(USART1_RX_vect) {
sra = UCSR1A;
if (sra & ((1 << DOR) | (1 << UPE) | (1 << FE)))
- set_error(sra, &SER2);
+ set_error(sra, &SD2);
chSysLockFromIsr();
- sdIncomingDataI(&SER2, UDR1);
+ sdIncomingDataI(&SD2, UDR1);
chSysUnlockFromIsr();
CH_IRQ_EPILOGUE();
@@ -187,7 +187,7 @@ CH_IRQ_HANDLER(USART1_UDRE_vect) {
CH_IRQ_PROLOGUE();
chSysLockFromIsr();
- b = sdRequestDataI(&SER2);
+ b = sdRequestDataI(&SD2);
chSysUnlockFromIsr();
if (b < Q_OK)
UCSR1B &= ~(1 << UDRIE);
@@ -207,11 +207,11 @@ CH_IRQ_HANDLER(USART1_UDRE_vect) {
*/
void sd_lld_init(void) {
-#if USE_MSP430_USART0
- sdObjectInit(&COM1, NULL, notify1);
+#if USE_AVR_USART0
+ sdObjectInit(&SD1, NULL, notify1);
#endif
-#if USE_MSP430_USART1
- sdObjectInit(&COM2, NULL, notify2);
+#if USE_AVR_USART1
+ sdObjectInit(&SD2, NULL, notify2);
#endif
}