mirror of
https://github.com/marqs85/ossc.git
synced 2025-02-05 12:33:24 +00:00
ulibSD/spi_io.[ch]: Add function to write a single byte over SPI.
Additionally, fix the misleading documentation for SPI_RW(). The new function, SPI_WW() follows the same naming logic, for better or worse.
This commit is contained in:
parent
124bcc8df8
commit
cd77713255
@ -23,6 +23,10 @@ void SPI_R(BYTE *rd, int len) {
|
||||
SPI_read(SD_SPI_BASE, rd, len);
|
||||
}
|
||||
|
||||
void SPI_WW(BYTE d) {
|
||||
SPI_W(&d, 1);
|
||||
}
|
||||
|
||||
BYTE SPI_RW (BYTE d) {
|
||||
BYTE w;
|
||||
SPI_R(&w, 1);
|
||||
|
@ -36,12 +36,18 @@ void SPI_R (BYTE *rd, int len);
|
||||
void SPI_W (BYTE *wd, int len);
|
||||
|
||||
/**
|
||||
\brief Read/Write a single byte.
|
||||
\param d Byte to send.
|
||||
\brief Read a single byte.
|
||||
\param d Byte. Ignored.
|
||||
\return Byte that arrived.
|
||||
*/
|
||||
BYTE SPI_RW (BYTE d);
|
||||
|
||||
/**
|
||||
\brief Write a single byte.
|
||||
\param d Byte to write.
|
||||
*/
|
||||
void SPI_WW(BYTE d);
|
||||
|
||||
/**
|
||||
\brief Flush of SPI buffer.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user