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,19 +112,15 @@ main(void)
leds_off(LEDS_ALL); leds_off(LEDS_ALL);
#ifdef WITH_SDC #if WITH_SDC
{
int r;
sdspi_init(); sdspi_init();
sd_init(); sd_init();
r = sd_init_card(&sd_cache); r = sd_init_card(&sd_cache);
if (r == SD_INIT_SUCCESS) { if (r == SD_INIT_SUCCESS) {
printf("Found SD card (%lu bytes)\n", sd_get_size()); printf("Found SD card (%lu bytes)\n", sd_get_size());
uart_set_mode(UART_MODE_SPI);
} else { } else {
printf("SD card initialization failed: %d\n", r); printf("SD card initialization failed: %d\n", r);
} }
}
#endif #endif
printf(CONTIKI_VERSION_STRING " started. Node id %u.\n", node_id); printf(CONTIKI_VERSION_STRING " started. Node id %u.\n", node_id);
@ -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);
} }