libnds
Loading...
Searching...
No Matches
Functions
serial.h File Reference

SPI bus controller ARM7 helpers. More...

#include <nds/bios.h>
#include <nds/input.h>

Functions

u8 spiExchange (u8 value)
 Does an exchange in the SPI bus (sends a value while a value is received).
 
u8 spiRead (void)
 Reads a value from the SPI bus (by doing an exchange and sending a 0).
 
void spiWaitBusy (void)
 Wait until the SPI bus is available.
 
void spiWrite (u8 value)
 Writes a value to the SPI bus.
 

Detailed Description

SPI bus controller ARM7 helpers.

Function Documentation

◆ spiExchange()

u8 spiExchange ( u8  value)

Does an exchange in the SPI bus (sends a value while a value is received).

Parameters
valueValue to write to the SPI bus.
Returns
Returns the value read from the SPI bus.

◆ spiRead()

u8 spiRead ( void  )

Reads a value from the SPI bus (by doing an exchange and sending a 0).

Returns
Returns the value read from the SPI bus.

◆ spiWrite()

void spiWrite ( u8  value)

Writes a value to the SPI bus.

Parameters
valueValue to write to the SPI bus.