git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1465 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
gdisirio 2009-12-24 09:57:44 +00:00
parent 282ffcd5ba
commit 5d22110eeb
3 changed files with 15 additions and 12 deletions

View File

@ -21,7 +21,7 @@ CC = $(TRGT)gcc
AS = $(TRGT)gcc -x assembler-with-cpp AS = $(TRGT)gcc -x assembler-with-cpp
# List all default C defines here, like -D_DEBUG=1 # List all default C defines here, like -D_DEBUG=1
DDEFS = -DSHELL_USE_IPRINTF=FALSE DDEFS = -DSIMULATOR -DSHELL_USE_IPRINTF=FALSE
# List all default ASM defines here, like -D_DEBUG=1 # List all default ASM defines here, like -D_DEBUG=1
DADEFS = DADEFS =

View File

@ -26,7 +26,7 @@
#define CONSOLE_WA_SIZE THD_WA_SIZE(4096) #define CONSOLE_WA_SIZE THD_WA_SIZE(4096)
#define TEST_WA_SIZE THD_WA_SIZE(4096) #define TEST_WA_SIZE THD_WA_SIZE(4096)
#define cprint(msg) chMsgSend(cdtp, (msg_t)msg) #define cputs(msg) chMsgSend(cdtp, (msg_t)msg)
static Thread *cdtp; static Thread *cdtp;
static Thread *shelltp1; static Thread *shelltp1;
@ -73,7 +73,7 @@ static msg_t console_thread(void *arg) {
(void)arg; (void)arg;
while (!chThdShouldTerminate()) { while (!chThdShouldTerminate()) {
printf((char *)chMsgWait()); puts((char *)chMsgWait());
fflush(stdout); fflush(stdout);
chMsgRelease(RDY_OK); chMsgRelease(RDY_OK);
} }
@ -92,7 +92,7 @@ static void termination_handler(eventid_t id) {
chThdWait(shelltp1); chThdWait(shelltp1);
shelltp1 = NULL; shelltp1 = NULL;
chThdSleepMilliseconds(10); chThdSleepMilliseconds(10);
cprint("Init: shell on SD1 terminated\n"); cputs("Init: shell on SD1 terminated");
chSysLock(); chSysLock();
chOQResetI(&SD1.d2.oqueue); chOQResetI(&SD1.d2.oqueue);
chSysUnlock(); chSysUnlock();
@ -101,7 +101,7 @@ static void termination_handler(eventid_t id) {
chThdWait(shelltp2); chThdWait(shelltp2);
shelltp2 = NULL; shelltp2 = NULL;
chThdSleepMilliseconds(10); chThdSleepMilliseconds(10);
cprint("Init: shell on SD2 terminated\n"); cputs("Init: shell on SD2 terminated");
chSysLock(); chSysLock();
chOQResetI(&SD2.d2.oqueue); chOQResetI(&SD2.d2.oqueue);
chSysUnlock(); chSysUnlock();
@ -119,11 +119,11 @@ static void sd1_handler(eventid_t id) {
(void)id; (void)id;
flags = sdGetAndClearFlags(&SD1); flags = sdGetAndClearFlags(&SD1);
if ((flags & SD_CONNECTED) && (shelltp1 == NULL)) { if ((flags & SD_CONNECTED) && (shelltp1 == NULL)) {
cprint("Init: connection on SD1\n"); cputs("Init: connection on SD1");
shelltp1 = shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO + 1); shelltp1 = shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO + 1);
} }
if (flags & SD_DISCONNECTED) { if (flags & SD_DISCONNECTED) {
cprint("Init: disconnection on SD1\n"); cputs("Init: disconnection on SD1");
chSysLock(); chSysLock();
chIQResetI(&SD1.d2.iqueue); chIQResetI(&SD1.d2.iqueue);
chSysUnlock(); chSysUnlock();
@ -141,11 +141,11 @@ static void sd2_handler(eventid_t id) {
(void)id; (void)id;
flags = sdGetAndClearFlags(&SD2); flags = sdGetAndClearFlags(&SD2);
if ((flags & SD_CONNECTED) && (shelltp2 == NULL)) { if ((flags & SD_CONNECTED) && (shelltp2 == NULL)) {
cprint("Init: connection on SD2\n"); cputs("Init: connection on SD2");
shelltp2 = shellCreate(&shell_cfg2, SHELL_WA_SIZE, NORMALPRIO + 10); shelltp2 = shellCreate(&shell_cfg2, SHELL_WA_SIZE, NORMALPRIO + 10);
} }
if (flags & SD_DISCONNECTED) { if (flags & SD_DISCONNECTED) {
cprint("Init: disconnection on SD2\n"); cputs("Init: disconnection on SD2");
chSysLock(); chSysLock();
chIQResetI(&SD2.d2.iqueue); chIQResetI(&SD2.d2.iqueue);
chSysUnlock(); chSysUnlock();
@ -195,11 +195,11 @@ int main(void) {
/* /*
* Initializing connection/disconnection events. * Initializing connection/disconnection events.
*/ */
cprint("Shell service started on SD1, SD2\n"); cputs("Shell service started on SD1, SD2");
cprint(" - Listening for connections on SD1\n"); cputs(" - Listening for connections on SD1");
(void) sdGetAndClearFlags(&SD1); (void) sdGetAndClearFlags(&SD1);
chEvtRegister(&SD1.d2.sevent, &sd1fel, 1); chEvtRegister(&SD1.d2.sevent, &sd1fel, 1);
cprint(" - Listening for connections on SD2\n"); cputs(" - Listening for connections on SD2");
(void) sdGetAndClearFlags(&SD2); (void) sdGetAndClearFlags(&SD2);
chEvtRegister(&SD2.d2.sevent, &sd2fel, 2); chEvtRegister(&SD2.d2.sevent, &sd2fel, 2);

View File

@ -5,6 +5,9 @@
*** 1.3.6 *** *** 1.3.6 ***
- FIX: Fixed missing STM32 PWM low level driver error in platform.mk by - FIX: Fixed missing STM32 PWM low level driver error in platform.mk by
adding the driver files (bug 2913560). adding the driver files (bug 2913560).
- NEW: The Linux simulator now works again and also supports the serial
drivers over TCP/IP and has a command line interface like the Win32
simulator.
- NEW: STM32 PWM driver implementation. - NEW: STM32 PWM driver implementation.
- NEW: LPC214x SPI driver implementation (SSP only, polled mode, no IRQ), this - NEW: LPC214x SPI driver implementation (SSP only, polled mode, no IRQ), this
driver replaces the old, not HAL compatible, SSP driver. driver replaces the old, not HAL compatible, SSP driver.