Donziboy, where did you get these numbers from? I've been looking at the datasheet, but I still don't understand the correlation between
0x000f000 and 0x0004000.
Can you explain how you determined 0x0000f000
Code:#define SPI_SR_TXCTR 0x0000f000
and how you got 0x00004000
Code:#define SPI_WRITE_8(c) \ do { \ while ((SPI0_SR & SPI_SR_TXCTR) >= 0x00004000); \ SPI0_PUSHR = ((c)&0xff) | SPI0_PUSHR_CTAS(0) | SPI0_PUSHR_CONT; \ } while(0)
I did not come up with them read the rest of thread. It is Plovedays code not mine.