libctru
v2.4.1
|
Gamecard PXI service. More...
#include <3ds/services/fs.h>
Go to the source code of this file.
Data Structures | |
struct | PXIDEV_SPIBuffer |
Card SPI transfer buffer. More... | |
Enumerations | |
enum | PXIDEV_WaitType { WAIT_NONE = 0 , WAIT_SLEEP = 1 , WAIT_IREQ_RETURN = 2 , WAIT_IREQ_CONTINUE = 3 } |
Card SPI wait operation type. More... | |
enum | PXIDEV_DeassertType { DEASSERT_NONE = 0 , DEASSERT_BEFORE_WAIT = 1 , DEASSERT_AFTER_WAIT = 2 } |
Card SPI register deassertion type. More... | |
Functions | |
Result | pxiDevInit (void) |
Initializes pxi:dev. | |
void | pxiDevExit (void) |
Shuts down pxi:dev. | |
static u8 | pxiDevMakeTransferOption (FS_CardSpiBaudRate baudRate, FS_CardSpiBusMode busMode) |
Creates a packed card SPI transfer option value. More... | |
static u64 | pxiDevMakeWaitOperation (PXIDEV_WaitType waitType, PXIDEV_DeassertType deassertType, u64 timeout) |
Creates a packed card SPI wait operation value. More... | |
Result | PXIDEV_SPIMultiWriteRead (PXIDEV_SPIBuffer *header, PXIDEV_SPIBuffer *writeBuffer1, PXIDEV_SPIBuffer *readBuffer1, PXIDEV_SPIBuffer *writeBuffer2, PXIDEV_SPIBuffer *readBuffer2, PXIDEV_SPIBuffer *footer) |
Performs multiple card SPI writes and reads. More... | |
Result | PXIDEV_SPIWriteRead (u32 *bytesRead, u64 initialWaitOperation, PXIDEV_SPIBuffer *writeBuffer, PXIDEV_SPIBuffer *readBuffer) |
Performs a single card SPI write and read. More... | |
Gamecard PXI service.
enum PXIDEV_DeassertType |
enum PXIDEV_WaitType |
Result PXIDEV_SPIMultiWriteRead | ( | PXIDEV_SPIBuffer * | header, |
PXIDEV_SPIBuffer * | writeBuffer1, | ||
PXIDEV_SPIBuffer * | readBuffer1, | ||
PXIDEV_SPIBuffer * | writeBuffer2, | ||
PXIDEV_SPIBuffer * | readBuffer2, | ||
PXIDEV_SPIBuffer * | footer | ||
) |
Performs multiple card SPI writes and reads.
header | Header to lead the transfers with. Must be, at most, 8 bytes in size. |
writeBuffer1 | Buffer to make first transfer from. |
readBuffer1 | Buffer to receive first response to. |
writeBuffer2 | Buffer to make second transfer from. |
readBuffer2 | Buffer to receive second response to. |
footer | Footer to follow the transfers with. Must be, at most, 8 bytes in size. Wait operation is unused. |
Result PXIDEV_SPIWriteRead | ( | u32 * | bytesRead, |
u64 | initialWaitOperation, | ||
PXIDEV_SPIBuffer * | writeBuffer, | ||
PXIDEV_SPIBuffer * | readBuffer | ||
) |
Performs a single card SPI write and read.
bytesRead | Pointer to output the number of bytes received to. |
initialWaitOperation | Wait operation to perform before transferring data. |
writeBuffer | Buffer to transfer data from. |
readBuffer | Buffer to receive data to. |
|
inlinestatic |
Creates a packed card SPI transfer option value.
baudRate | Baud rate to use when transferring. |
busMode | Bus mode to use when transferring. |
|
inlinestatic |
Creates a packed card SPI wait operation value.
waitType | Type of wait to perform. |
deassertType | Type of register deassertion to perform. |
timeout | Timeout, in nanoseconds, to wait, if applicable. |