46 return (baudRate & 0x3F) | ((busMode & 0x3) << 6);
58 return (waitType & 0xF) | ((deassertType & 0xF) << 4) | ((timeout & 0xFFFFFFFFFFFFFF) << 8);
FS_CardSpiBusMode
Card SPI bus mode.
Definition: fs.h:108
FS_CardSpiBaudRate
Card SPI baud rate.
Definition: fs.h:97
PXIDEV_DeassertType
Card SPI register deassertion type.
Definition: pxidev.h:18
@ DEASSERT_AFTER_WAIT
Deassert after waiting.
Definition: pxidev.h:21
@ DEASSERT_BEFORE_WAIT
Deassert before waiting.
Definition: pxidev.h:20
@ DEASSERT_NONE
Do not deassert.
Definition: pxidev.h:19
static u64 pxiDevMakeWaitOperation(PXIDEV_WaitType waitType, PXIDEV_DeassertType deassertType, u64 timeout)
Creates a packed card SPI wait operation value.
Definition: pxidev.h:56
Result pxiDevInit(void)
Initializes pxi:dev.
void pxiDevExit(void)
Shuts down pxi:dev.
PXIDEV_WaitType
Card SPI wait operation type.
Definition: pxidev.h:10
@ WAIT_NONE
Do not wait.
Definition: pxidev.h:11
@ WAIT_IREQ_RETURN
Wait for IREQ, return if timeout.
Definition: pxidev.h:13
@ WAIT_SLEEP
Sleep for the specified number of nanoseconds.
Definition: pxidev.h:12
@ WAIT_IREQ_CONTINUE
Wait for IREQ, continue if timeout.
Definition: pxidev.h:14
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.
static u8 pxiDevMakeTransferOption(FS_CardSpiBaudRate baudRate, FS_CardSpiBusMode busMode)
Creates a packed card SPI transfer option value.
Definition: pxidev.h:44
Result PXIDEV_SPIWriteRead(u32 *bytesRead, u64 initialWaitOperation, PXIDEV_SPIBuffer *writeBuffer, PXIDEV_SPIBuffer *readBuffer)
Performs a single card SPI write and read.
Card SPI transfer buffer.
Definition: pxidev.h:25
u64 waitOperation
Wait operation. See pxiDevMakeWaitOperation.
Definition: pxidev.h:29
void * ptr
Data pointer.
Definition: pxidev.h:26
u32 size
Data size.
Definition: pxidev.h:27
u8 transferOption
Transfer options. See pxiDevMakeTransferOption.
Definition: pxidev.h:28
uint64_t u64
64-bit unsigned integer
Definition: types.h:24
uint8_t u8
would be nice if newlib had this already
Definition: types.h:21
s32 Result
Function result.
Definition: types.h:42
uint32_t u32
32-bit unsigned integer
Definition: types.h:23