From: batt Date: Thu, 23 Oct 2008 17:05:57 +0000 (+0000) Subject: Merged from external project: X-Git-Tag: 2.0.0~35 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=2325bd9b0caad4f1ef2a277a7c568dae53c3f7f3;p=bertos.git Merged from external project: ********** r22537 | batt | 2008-10-23 19:04:36 +0200(gio, 23 ott 2008) | 1 line Remove old reference to ser_spi1. ********** git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1899 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/arm/drv/ser_at91.c b/bertos/cpu/arm/drv/ser_at91.c index 01a7ac27..c3c897cd 100644 --- a/bertos/cpu/arm/drv/ser_at91.c +++ b/bertos/cpu/arm/drv/ser_at91.c @@ -258,12 +258,6 @@ struct ArmSerial volatile bool sending; }; - - -#if CPU_ARM_AT91SAM7X128 || CPU_ARM_AT91SAM7X256 -struct Serial *ser_spi1 = &ser_handles[SER_SPI1]; -#endif - static void uart0_irq_dispatcher(void); static void uart1_irq_dispatcher(void); static void spi0_irq_handler(void); @@ -611,10 +605,10 @@ static void spi1_starttx(struct SerialHardware *_hw) IRQ_SAVE_DISABLE(flags); /* Send data only if the SPI is not already transmitting */ - if (!hw->sending && !fifo_isempty(&ser_spi1->txfifo)) + if (!hw->sending && !fifo_isempty(&ser_handles[SER_SPI1]->txfifo)) { hw->sending = true; - SPI1_TDR = fifo_pop(&ser_spi1->txfifo); + SPI1_TDR = fifo_pop(&ser_handles[SER_SPI1]->txfifo); } IRQ_RESTORE(flags); @@ -920,17 +914,17 @@ static void spi1_irq_handler(void) char c = SPI1_RDR; /* Read incoming byte. */ - if (!fifo_isfull(&ser_spi1->rxfifo)) - fifo_push(&ser_spi1->rxfifo, c); + if (!fifo_isfull(&ser_handles[SER_SPI1]->rxfifo)) + fifo_push(&ser_handles[SER_SPI1]->rxfifo, c); /* * FIXME else - ser_spi1->status |= SERRF_RXFIFOOVERRUN; + ser_handles[SER_SPI1]->status |= SERRF_RXFIFOOVERRUN; */ /* Send */ - if (!fifo_isempty(&ser_spi1->txfifo)) - SPI1_TDR = fifo_pop(&ser_spi1->txfifo); + if (!fifo_isempty(&ser_handles[SER_SPI1]->txfifo)) + SPI1_TDR = fifo_pop(&ser_handles[SER_SPI1]->txfifo); else UARTDescs[SER_SPI1].sending = false;