aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-08-26 13:34:52 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-08-26 13:34:52 +0000
commit46827225678cea64b9519813fb60d5a0d388676f (patch)
tree5af3f158ec732acd47282e303ed461245ed881a2
parent6b9e823237f11f44f70044d6cdc81751fca5b3b3 (diff)
downloadChibiOS-46827225678cea64b9519813fb60d5a0d388676f.tar.gz
ChibiOS-46827225678cea64b9519813fb60d5a0d388676f.tar.bz2
ChibiOS-46827225678cea64b9519813fb60d5a0d388676f.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1106 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--demos/ARM7-AT91SAM7X-GCC/chconf.h10
-rw-r--r--demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h10
-rw-r--r--demos/ARM7-LPC214x-G++/chconf.h10
-rw-r--r--demos/ARM7-LPC214x-GCC-minimal/chconf.h10
-rw-r--r--demos/ARM7-LPC214x-GCC/chconf.h10
-rw-r--r--demos/AVR-AT90CANx-GCC/Makefile8
-rw-r--r--demos/AVR-AT90CANx-GCC/board.c8
-rw-r--r--demos/AVR-AT90CANx-GCC/chconf.h10
-rw-r--r--demos/AVR-AT90CANx-GCC/main.c9
-rw-r--r--demos/AVR-ATmega128-GCC/Makefile10
-rw-r--r--demos/AVR-ATmega128-GCC/board.c4
-rw-r--r--demos/AVR-ATmega128-GCC/chconf.h10
-rw-r--r--demos/AVR-ATmega128-GCC/main.c9
-rw-r--r--demos/MSP430-MSP430x1611-GCC/chconf.h10
14 files changed, 33 insertions, 95 deletions
diff --git a/demos/ARM7-AT91SAM7X-GCC/chconf.h b/demos/ARM7-AT91SAM7X-GCC/chconf.h
index fd9c18d69..ba2e6d048 100644
--- a/demos/ARM7-AT91SAM7X-GCC/chconf.h
+++ b/demos/ARM7-AT91SAM7X-GCC/chconf.h
@@ -233,16 +233,6 @@
#endif
/**
- * If specified then the full duplex serial driver APIs are included in the
- * kernel.
- * @note The default is @p TRUE.
- * @note Requires @p CH_USE_QUEUES.
- */
-#if !defined(CH_USE_SERIAL_FULLDUPLEX) || defined(__DOXYGEN__)
-#define CH_USE_SERIAL_FULLDUPLEX TRUE
-#endif
-
-/**
* If specified then the memory heap allocator APIs are included in the kernel.
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MUTEXES or @p CH_USE_SEMAPHORES.
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h b/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h
index 8e6eda189..3c6353168 100644
--- a/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h
+++ b/demos/ARM7-AT91SAM7X-WEB-GCC/chconf.h
@@ -233,16 +233,6 @@
#endif
/**
- * If specified then the full duplex serial driver APIs are included in the
- * kernel.
- * @note The default is @p TRUE.
- * @note Requires @p CH_USE_QUEUES.
- */
-#if !defined(CH_USE_SERIAL_FULLDUPLEX) || defined(__DOXYGEN__)
-#define CH_USE_SERIAL_FULLDUPLEX TRUE
-#endif
-
-/**
* If specified then the memory heap allocator APIs are included in the kernel.
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MUTEXES or @p CH_USE_SEMAPHORES.
diff --git a/demos/ARM7-LPC214x-G++/chconf.h b/demos/ARM7-LPC214x-G++/chconf.h
index 8e6eda189..3c6353168 100644
--- a/demos/ARM7-LPC214x-G++/chconf.h
+++ b/demos/ARM7-LPC214x-G++/chconf.h
@@ -233,16 +233,6 @@
#endif
/**
- * If specified then the full duplex serial driver APIs are included in the
- * kernel.
- * @note The default is @p TRUE.
- * @note Requires @p CH_USE_QUEUES.
- */
-#if !defined(CH_USE_SERIAL_FULLDUPLEX) || defined(__DOXYGEN__)
-#define CH_USE_SERIAL_FULLDUPLEX TRUE
-#endif
-
-/**
* If specified then the memory heap allocator APIs are included in the kernel.
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MUTEXES or @p CH_USE_SEMAPHORES.
diff --git a/demos/ARM7-LPC214x-GCC-minimal/chconf.h b/demos/ARM7-LPC214x-GCC-minimal/chconf.h
index 42baa1f3d..08663fea3 100644
--- a/demos/ARM7-LPC214x-GCC-minimal/chconf.h
+++ b/demos/ARM7-LPC214x-GCC-minimal/chconf.h
@@ -233,16 +233,6 @@
#endif
/**
- * If specified then the full duplex serial driver APIs are included in the
- * kernel.
- * @note The default is @p TRUE.
- * @note Requires @p CH_USE_QUEUES.
- */
-#if !defined(CH_USE_SERIAL_FULLDUPLEX) || defined(__DOXYGEN__)
-#define CH_USE_SERIAL_FULLDUPLEX FALSE
-#endif
-
-/**
* If specified then the memory heap allocator APIs are included in the kernel.
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MUTEXES or @p CH_USE_SEMAPHORES.
diff --git a/demos/ARM7-LPC214x-GCC/chconf.h b/demos/ARM7-LPC214x-GCC/chconf.h
index 8e6eda189..3c6353168 100644
--- a/demos/ARM7-LPC214x-GCC/chconf.h
+++ b/demos/ARM7-LPC214x-GCC/chconf.h
@@ -233,16 +233,6 @@
#endif
/**
- * If specified then the full duplex serial driver APIs are included in the
- * kernel.
- * @note The default is @p TRUE.
- * @note Requires @p CH_USE_QUEUES.
- */
-#if !defined(CH_USE_SERIAL_FULLDUPLEX) || defined(__DOXYGEN__)
-#define CH_USE_SERIAL_FULLDUPLEX TRUE
-#endif
-
-/**
* If specified then the memory heap allocator APIs are included in the kernel.
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MUTEXES or @p CH_USE_SEMAPHORES.
diff --git a/demos/AVR-AT90CANx-GCC/Makefile b/demos/AVR-AT90CANx-GCC/Makefile
index 7b880f6d9..30ae2aad0 100644
--- a/demos/AVR-AT90CANx-GCC/Makefile
+++ b/demos/AVR-AT90CANx-GCC/Makefile
@@ -89,7 +89,8 @@ include ../../test/test.mk
SRC = ${PORTSRC} \
${KERNSRC} \
${TESTSRC} \
- ../../os/ports/GCC/AVR/avr_serial.c \
+ ../../os/io/serial.c \
+ ../../os/io/platforms/AVR/serial_lld.c \
../../os/various/evtimer.c \
board.c main.c
@@ -125,7 +126,10 @@ DEBUG = dwarf-2
# Each directory must be seperated by a space.
# Use forward slashes for directory separators.
# For a directory that has spaces, enclose it in quotes.
-EXTRAINCDIRS = $(PORTINC) $(KERNINC) $(TESTINC)e ../../os/various
+EXTRAINCDIRS = $(PORTINC) $(KERNINC) $(TESTINC) \
+ ../../os/io \
+ ../../os/io/platforms/AVR \
+ ../../os/various
# Compiler flag to set the C Standard level.
diff --git a/demos/AVR-AT90CANx-GCC/board.c b/demos/AVR-AT90CANx-GCC/board.c
index 3119b82be..2fdf128a1 100644
--- a/demos/AVR-AT90CANx-GCC/board.c
+++ b/demos/AVR-AT90CANx-GCC/board.c
@@ -18,9 +18,9 @@
*/
#include <ch.h>
+#include <serial.h>
#include "board.h"
-#include "avr_serial.h"
CH_IRQ_HANDLER(TIMER0_COMP_vect) {
@@ -71,9 +71,9 @@ void hwinit(void) {
/*
* Timer 0 setup.
*/
- TCCR0A = (1 << WGM01) | (0 << WGM00) | // CTC mode.
+ TCCR0A = (1 << WGM01) | (0 << WGM00) | // CTC mode.
(0 << COM0A1) | (0 << COM0A0) | // OC0A disabled (normal I/O).
- (0 << CS02) | (1 << CS01) | (1 << CS00); // CLK/64 clock source.
+ (0 << CS02) | (1 << CS01) | (1 << CS00); // CLK/64 clock source.
OCR0A = F_CPU / 64 / CH_FREQUENCY - 1;
TCNT0 = 0; // Reset counter.
TIFR0 = (1 << OCF0A); // Reset pending (if any).
@@ -82,5 +82,5 @@ void hwinit(void) {
/*
* Other initializations.
*/
- serial_init();
+ sdInit();
}
diff --git a/demos/AVR-AT90CANx-GCC/chconf.h b/demos/AVR-AT90CANx-GCC/chconf.h
index 717a0ce09..cb7da16d3 100644
--- a/demos/AVR-AT90CANx-GCC/chconf.h
+++ b/demos/AVR-AT90CANx-GCC/chconf.h
@@ -233,16 +233,6 @@
#endif
/**
- * If specified then the full duplex serial driver APIs are included in the
- * kernel.
- * @note The default is @p TRUE.
- * @note Requires @p CH_USE_QUEUES.
- */
-#if !defined(CH_USE_SERIAL_FULLDUPLEX) || defined(__DOXYGEN__)
-#define CH_USE_SERIAL_FULLDUPLEX TRUE
-#endif
-
-/**
* If specified then the memory heap allocator APIs are included in the kernel.
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MUTEXES or @p CH_USE_SEMAPHORES.
diff --git a/demos/AVR-AT90CANx-GCC/main.c b/demos/AVR-AT90CANx-GCC/main.c
index aa9b99dc0..a19b1e9c5 100644
--- a/demos/AVR-AT90CANx-GCC/main.c
+++ b/demos/AVR-AT90CANx-GCC/main.c
@@ -18,8 +18,8 @@
*/
#include <ch.h>
+#include <serial.h>
#include <evtimer.h>
-#include <avr_serial.h>
#include <avr/io.h>
@@ -41,7 +41,7 @@ static void TimerHandler(eventid_t id) {
msg_t TestThread(void *p);
if (!(PORTE & PORTE_BUTTON))
- TestThread(&SER2);
+ TestThread(&SD2);
}
int main(int argc, char **argv) {
@@ -60,6 +60,11 @@ int main(int argc, char **argv) {
chSysInit();
/*
+ * Activates the serial driver 2 using the driver default configuration.
+ */
+ sdStart(&SD2, NULL);
+
+ /*
* Event Timer initialization.
*/
evtInit(&evt, MS2ST(500)); /* Initializes an event timer object. */
diff --git a/demos/AVR-ATmega128-GCC/Makefile b/demos/AVR-ATmega128-GCC/Makefile
index c13d60ef9..4af1c53db 100644
--- a/demos/AVR-ATmega128-GCC/Makefile
+++ b/demos/AVR-ATmega128-GCC/Makefile
@@ -89,9 +89,10 @@ include ../../test/test.mk
SRC = ${PORTSRC} \
${KERNSRC} \
${TESTSRC} \
- ../../os/ports/GCC/AVR/avr_serial.c \
+ ../../os/io/serial.c \
+ ../../os/io/platforms/AVR/serial_lld.c \
../../os/various/evtimer.c \
- board.c lcd.c main.c
+ board.c main.c
# List C++ source files here. (C dependencies are automatically generated.)
@@ -125,7 +126,10 @@ DEBUG = dwarf-2
# Each directory must be seperated by a space.
# Use forward slashes for directory separators.
# For a directory that has spaces, enclose it in quotes.
-EXTRAINCDIRS = $(PORTINC) $(KERNINC) $(TESTINC)e ../../os/various
+EXTRAINCDIRS = $(PORTINC) $(KERNINC) $(TESTINC) \
+ ../../os/io \
+ ../../os/io/platforms/AVR \
+ ../../os/various
# Compiler flag to set the C Standard level.
diff --git a/demos/AVR-ATmega128-GCC/board.c b/demos/AVR-ATmega128-GCC/board.c
index 490dd0362..84e1565cb 100644
--- a/demos/AVR-ATmega128-GCC/board.c
+++ b/demos/AVR-ATmega128-GCC/board.c
@@ -18,9 +18,9 @@
*/
#include <ch.h>
+#include <serial.h>
#include "board.h"
-#include "avr_serial.h"
CH_IRQ_HANDLER(TIMER0_COMP_vect) {
@@ -82,5 +82,5 @@ void hwinit(void) {
/*
* Other initializations.
*/
- serial_init();
+ sdInit();
}
diff --git a/demos/AVR-ATmega128-GCC/chconf.h b/demos/AVR-ATmega128-GCC/chconf.h
index 717a0ce09..cb7da16d3 100644
--- a/demos/AVR-ATmega128-GCC/chconf.h
+++ b/demos/AVR-ATmega128-GCC/chconf.h
@@ -233,16 +233,6 @@
#endif
/**
- * If specified then the full duplex serial driver APIs are included in the
- * kernel.
- * @note The default is @p TRUE.
- * @note Requires @p CH_USE_QUEUES.
- */
-#if !defined(CH_USE_SERIAL_FULLDUPLEX) || defined(__DOXYGEN__)
-#define CH_USE_SERIAL_FULLDUPLEX TRUE
-#endif
-
-/**
* If specified then the memory heap allocator APIs are included in the kernel.
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MUTEXES or @p CH_USE_SEMAPHORES.
diff --git a/demos/AVR-ATmega128-GCC/main.c b/demos/AVR-ATmega128-GCC/main.c
index 405770d00..dc3fd33c3 100644
--- a/demos/AVR-ATmega128-GCC/main.c
+++ b/demos/AVR-ATmega128-GCC/main.c
@@ -18,8 +18,8 @@
*/
#include <ch.h>
+#include <serial.h>
#include <evtimer.h>
-#include <avr_serial.h>
#include <avr/io.h>
@@ -43,7 +43,7 @@ static void TimerHandler(eventid_t id) {
msg_t TestThread(void *p);
if (!(PINA & PORTA_BUTTON1))
- TestThread(&SER2);
+ TestThread(&SD2);
}
int main(int argc, char **argv) {
@@ -62,6 +62,11 @@ int main(int argc, char **argv) {
chSysInit();
/*
+ * Activates the serial driver 2 using the driver default configuration.
+ */
+ sdStart(&SD2, NULL);
+
+ /*
* This initialization requires the OS already active because it uses delay
* APIs inside.
*/
diff --git a/demos/MSP430-MSP430x1611-GCC/chconf.h b/demos/MSP430-MSP430x1611-GCC/chconf.h
index 14e6004c9..2f018c290 100644
--- a/demos/MSP430-MSP430x1611-GCC/chconf.h
+++ b/demos/MSP430-MSP430x1611-GCC/chconf.h
@@ -233,16 +233,6 @@
#endif
/**
- * If specified then the full duplex serial driver APIs are included in the
- * kernel.
- * @note The default is @p TRUE.
- * @note Requires @p CH_USE_QUEUES.
- */
-#if !defined(CH_USE_SERIAL_FULLDUPLEX) || defined(__DOXYGEN__)
-#define CH_USE_SERIAL_FULLDUPLEX TRUE
-#endif
-
-/**
* If specified then the memory heap allocator APIs are included in the kernel.
* @note The default is @p TRUE.
* @note Requires @p CH_USE_MUTEXES or @p CH_USE_SEMAPHORES.