clear bit when uart edge is set.

This commit is contained in:
nvt-se 2008-05-29 22:06:18 +00:00
parent 36fec8dd01
commit f83000af8a

View file

@ -66,6 +66,7 @@ main(void)
{ {
#ifdef WITH_SDC #ifdef WITH_SDC
sd_cache_t sd_cache; sd_cache_t sd_cache;
int r;
#endif #endif
msp430_cpu_init(); msp430_cpu_init();
@ -111,18 +112,14 @@ main(void)
leds_off(LEDS_ALL); leds_off(LEDS_ALL);
#ifdef WITH_SDC #if WITH_SDC
{ sdspi_init();
int r; sd_init();
sdspi_init(); r = sd_init_card(&sd_cache);
sd_init(); if (r == SD_INIT_SUCCESS) {
r = sd_init_card(&sd_cache); printf("Found SD card (%lu bytes)\n", sd_get_size());
if (r == SD_INIT_SUCCESS) { } else {
printf("Found SD card (%lu bytes)\n", sd_get_size()); printf("SD card initialization failed: %d\n", r);
uart_set_mode(UART_MODE_SPI);
} else {
printf("SD card initialization failed: %d\n", r);
}
} }
#endif #endif
@ -168,7 +165,7 @@ main(void)
energest_type_set(ENERGEST_TYPE_IRQ, irq_energest); energest_type_set(ENERGEST_TYPE_IRQ, irq_energest);
if (uart_edge) { if (uart_edge) {
_BIS_SR(LPM1_bits + GIE); _BIC_SR(LPM1_bits + GIE);
} else { } else {
_BIS_SR(LPM1_bits + GIE); _BIS_SR(LPM1_bits + GIE);
} }