This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

AT91-SPI without 4to16decoder


Hi,

there is a little bug in the ChipSelect in cause it is the negation of what it 
should be.
This is only if you have an AT91-Chip without an 4-to-16-Decoder on the 
CS-PINs.

Attached is the patch-file.

Regards,
Sebastian
--- devs/spi/arm/at91/current/src/spi_at91.c	2004-10-13 22:16:21.000000000 +0200
+++ devs/spi/arm/at91/current/src/spi_at91.c	2004-11-11 14:45:49.000000000 +0100
@@ -266,7 +266,7 @@
                      AT91_SPI_PIO_NPCS(~dev->dev_num));
 #else
     HAL_WRITE_UINT32(AT91_SPI_PIO+AT91_PIO_CODR,
-                     AT91_SPI_PIO_NPCS((~(1<<dev->dev_num)) & 0x0F));
+                      AT91_SPI_PIO_NPCS((1<<dev->dev_num)));
 #endif
     CYGACC_CALL_IF_DELAY_US(dev->cs_up_udly);
    

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]