diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-01-09 10:10:39 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-01-09 10:10:39 +0000 |
commit | ff333430f1317247299863b592293faa7799e0a4 (patch) | |
tree | e7fbb1acfc6125c96b83b1f1097517d6f6f4ec9d /demos | |
parent | ab5dc4cae1ee3d7ab47afb58ee9f52056c507d3a (diff) | |
download | ChibiOS-ff333430f1317247299863b592293faa7799e0a4.tar.gz ChibiOS-ff333430f1317247299863b592293faa7799e0a4.tar.bz2 ChibiOS-ff333430f1317247299863b592293faa7799e0a4.zip |
Serial driver changes, bug 3153550 fixed.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2625 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos')
-rw-r--r-- | demos/ARM7-AT91SAM7S-FATFS-GCC/main.c | 5 | ||||
-rw-r--r-- | demos/ARM7-AT91SAM7X-FATFS-GCC/main.c | 5 | ||||
-rw-r--r-- | demos/ARM7-LPC214x-FATFS-GCC/main.c | 5 | ||||
-rw-r--r-- | demos/ARMCM3-STM32F103/mcuconf.h | 2 | ||||
-rw-r--r-- | demos/Win32-MinGW/main.c | 24 |
5 files changed, 16 insertions, 25 deletions
diff --git a/demos/ARM7-AT91SAM7S-FATFS-GCC/main.c b/demos/ARM7-AT91SAM7S-FATFS-GCC/main.c index faf8c5a8d..97898c9ce 100644 --- a/demos/ARM7-AT91SAM7S-FATFS-GCC/main.c +++ b/demos/ARM7-AT91SAM7S-FATFS-GCC/main.c @@ -59,9 +59,6 @@ static SPIConfig ls_spicfg = { (MIN_SPI_BITRATE << 8) | AT91C_SPI_NCPHA | AT91C_SPI_BITS_8
};
-/* MMC configuration (empty).*/
-static const MMCConfig mmc_cfg = {};
-
/* Card insertion verification.*/
static bool_t mmc_is_inserted(void) {
return !palReadPad(IOPORT1, PIOA_MMC_CP);
@@ -329,7 +326,7 @@ int main(void) { mmcObjectInit(&MMCD1, &SPID1,
&ls_spicfg, &hs_spicfg,
mmc_is_protected, mmc_is_inserted);
- mmcStart(&MMCD1, &mmc_cfg);
+ mmcStart(&MMCD1, NULL);
/*
* Creates the blinker threads.
diff --git a/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c b/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c index 3c3f2aae4..d7cd3f40e 100644 --- a/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c @@ -59,9 +59,6 @@ static SPIConfig ls_spicfg = { (MIN_SPI_BITRATE << 8) | AT91C_SPI_NCPHA | AT91C_SPI_BITS_8
};
-/* MMC configuration (empty).*/
-static const MMCConfig mmc_cfg = {};
-
/* Card insertion verification.*/
static bool_t mmc_is_inserted(void) {
return !palReadPad(IOPORT2, PIOB_MMC_CP);
@@ -312,7 +309,7 @@ int main(void) { mmcObjectInit(&MMCD1, &SPID1,
&ls_spicfg, &hs_spicfg,
mmc_is_protected, mmc_is_inserted);
- mmcStart(&MMCD1, &mmc_cfg);
+ mmcStart(&MMCD1, NULL);
/*
* Creates the blinker threads.
diff --git a/demos/ARM7-LPC214x-FATFS-GCC/main.c b/demos/ARM7-LPC214x-FATFS-GCC/main.c index 44afc36fd..1868bac05 100644 --- a/demos/ARM7-LPC214x-FATFS-GCC/main.c +++ b/demos/ARM7-LPC214x-FATFS-GCC/main.c @@ -59,9 +59,6 @@ static SPIConfig ls_spicfg = { 254
};
-/* MMC configuration (empty).*/
-static const MMCConfig mmc_cfg = {};
-
/* Card insertion verification.*/
static bool_t mmc_is_inserted(void) {
return !palReadPad(IOPORT2, PB_CP1);
@@ -258,7 +255,7 @@ int main(void) { mmcObjectInit(&MMCD1, &SPID1,
&ls_spicfg, &hs_spicfg,
mmc_is_protected, mmc_is_inserted);
- mmcStart(&MMCD1, &mmc_cfg);
+ mmcStart(&MMCD1, NULL);
/*
* Creates the blinker threads.
diff --git a/demos/ARMCM3-STM32F103/mcuconf.h b/demos/ARMCM3-STM32F103/mcuconf.h index 4e640b93f..e5ccc2584 100644 --- a/demos/ARMCM3-STM32F103/mcuconf.h +++ b/demos/ARMCM3-STM32F103/mcuconf.h @@ -37,7 +37,7 @@ #define STM32_SW STM32_SW_PLL
#define STM32_PLLSRC STM32_PLLSRC_HSE
#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1
-#define STM32_PLLMUL_VALUE 9
+#define STM32_PLLMUL_VALUE 6
#define STM32_HPRE STM32_HPRE_DIV1
#define STM32_PPRE1 STM32_PPRE1_DIV2
#define STM32_PPRE2 STM32_PPRE2_DIV2
diff --git a/demos/Win32-MinGW/main.c b/demos/Win32-MinGW/main.c index 9ce9b284a..cbdfc100d 100644 --- a/demos/Win32-MinGW/main.c +++ b/demos/Win32-MinGW/main.c @@ -172,12 +172,12 @@ static void sd1_handler(eventid_t id) { sdflags_t flags;
(void)id;
- flags = sdGetAndClearFlags(&SD1);
- if ((flags & SD_CONNECTED) && (shelltp1 == NULL)) {
+ flags = chIOGetAndClearFlags(&SD1);
+ if ((flags & IO_CONNECTED) && (shelltp1 == NULL)) {
cputs("Init: connection on SD1");
shelltp1 = shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO + 1);
}
- if (flags & SD_DISCONNECTED) {
+ if (flags & IO_DISCONNECTED) {
cputs("Init: disconnection on SD1");
chSysLock();
chIQResetI(&SD1.iqueue);
@@ -194,12 +194,12 @@ static void sd2_handler(eventid_t id) { sdflags_t flags;
(void)id;
- flags = sdGetAndClearFlags(&SD2);
- if ((flags & SD_CONNECTED) && (shelltp2 == NULL)) {
+ flags = chIOGetAndClearFlags(&SD2);
+ if ((flags & IO_CONNECTED) && (shelltp2 == NULL)) {
cputs("Init: connection on SD2");
shelltp2 = shellCreate(&shell_cfg2, SHELL_WA_SIZE, NORMALPRIO + 10);
}
- if (flags & SD_DISCONNECTED) {
+ if (flags & IO_DISCONNECTED) {
cputs("Init: disconnection on SD2");
chSysLock();
chIQResetI(&SD2.iqueue);
@@ -252,11 +252,11 @@ int main(void) { */
cputs("Shell service started on SD1, SD2");
cputs(" - Listening for connections on SD1");
- (void) sdGetAndClearFlags(&SD1);
- chEvtRegister(&SD1.sevent, &sd1fel, 1);
+ (void) chIOGetAndClearFlags(&SD1);
+ chEvtRegister(chIOGetEventSource(&SD1), &sd1fel, 1);
cputs(" - Listening for connections on SD2");
- (void) sdGetAndClearFlags(&SD2);
- chEvtRegister(&SD2.sevent, &sd2fel, 2);
+ (void) chIOGetAndClearFlags(&SD2);
+ chEvtRegister(chIOGetEventSource(&SD2), &sd2fel, 2);
/*
* Events servicing loop.
@@ -267,7 +267,7 @@ int main(void) { /*
* Clean simulator exit.
*/
- chEvtUnregister(&SD1.sevent, &sd1fel);
- chEvtUnregister(&SD2.sevent, &sd2fel);
+ chEvtUnregister(chIOGetEventSource(&SD1), &sd1fel);
+ chEvtUnregister(chIOGetEventSource(&SD2), &sd2fel);
return 0;
}
|