Peter Niebert <[email protected]> has asked  for Patch_or_Contribution:
Bug 1000781: incomplete register flag declarations for AT91 SPI status register
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000781

------- Additional Comments from Peter Niebert <[email protected]>
hal/arm/at91/var/current/include/var_io.h lists a certain number of flags of
the SPI status register:

#define AT91_SPI_SR_RDRF       0x00000001        // Receive Data Register Full
#define AT91_SPI_SR_TDRE       0x00000002        // Tx Data Register Empty
#define AT91_SPI_SR_MODF       0x00000004        // Mode Fault Error
#define AT91_SPI_SR_OVRES      0x00000008        // Overrun Error Status
#define AT91_SPI_SR_ENDRX      0x00000010        // End of Receiver Transfer
#define AT91_SPI_SR_ENDTX      0x00000020        // End of Transmitter Transfer


For obcure reasons, the four remaining flags are not declared and should be
added as follows:


#define AT91_SPI_SR_RXBUFF     0x00000040        // RX Buffer Full
#define AT91_SPI_SR_TXBUFE     0x00000080        // TX Buffer Empty
#define AT91_SPI_SR_NSSR       0x00000100        // NSS Rising
#define AT91_SPI_SR_TXEMPTY    0x00000200        // Transmission Registers
Empty


Attached is the modified file hal/arm/at91/var/current/include/var_io.h

Reply via email to