low level FIFO API. [詳細]
#include "ndstypes.h"
型定義 | |
typedef void(* | FifoAddressHandlerFunc )(void *address, void *userdata) |
typedef void(* | FifoValue32HandlerFunc )(u32 value32, void *userdata) |
typedef void(* | FifoDatamsgHandlerFunc )(int num_bytes, void *userdata) |
列挙型 | |
enum | FifoChannels { FIFO_PM = 0, FIFO_SOUND = 1, FIFO_SYSTEM = 2, FIFO_MAXMOD = 3, FIFO_DSWIFI = 4, FIFO_RSDV_01 = 5, FIFO_RSVD_02 = 6, FIFO_RSVD_03 = 7, FIFO_USER_01 = 8, FIFO_USER_02 = 9, FIFO_USER_03 = 10, FIFO_USER_04 = 11, FIFO_USER_05 = 12, FIFO_USER_06 = 13, FIFO_USER_07 = 14, FIFO_USER_08 = 15 } |
enum | FifoSoundCommand { SOUND_SET_PAN = 0 << 20, SOUND_SET_VOLUME = 1 << 20, SOUND_SET_FREQ = 2 << 20, SOUND_SET_WAVEDUTY = 3 << 20, SOUND_MASTER_ENABLE = 4 << 20, SOUND_MASTER_DISABLE = 5 << 20, SOUND_PAUSE = 6 << 20, SOUND_RESUME = 7 << 20, SOUND_KILL = 8 << 20, SOUND_SET_MASTER_VOL = 9 << 20, MIC_STOP = 10 << 20 } |
enum | FifoSystemCommands { SYS_REQ_TOUCH, SYS_REQ_KEYS, SYS_REQ_TIME } |
enum | FifoPMCommands { PM_REQ_ON = (1<<16), PM_REQ_OFF = (2<<16), PM_REQ_LED = (3<<16), PM_REQ_SLEEP = (4<<16), PM_REQ_SLEEP_DISABLE = (5<<16), PM_REQ_SLEEP_ENABLE = (6<<16) } |
enum | FifoWifiCommands { WIFI_ENABLE, WIFI_DISABLE, WIFI_SYNC, WIFI_STARTUP } |
enum | PM_LedBlinkMode { PM_LED_ON = (0<<4), PM_LED_SLEEP = (1<<4), PM_LED_BLINK = (3<<4) } |
Power Management LED blink mode control bits. [詳細] | |
関数 | |
bool | fifoInit () |
Initializes the fifo system. | |
bool | fifoSendAddress (int channel, void *address) |
Send an address. | |
bool | fifoSendValue32 (int channel, u32 value32) |
Send a 32bit value. | |
bool | fifoSendDatamsg (int channel, int num_bytes, u8 *data_array) |
Send a sequence of bytes to the other CPU. | |
bool | fifoSetAddressHandler (int channel, FifoAddressHandlerFunc newhandler, void *userdata) |
Set user address message callback. | |
bool | fifoSetValue32Handler (int channel, FifoValue32HandlerFunc newhandler, void *userdata) |
Set user value32 message callback. | |
bool | fifoSetDatamsgHandler (int channel, FifoDatamsgHandlerFunc newhandler, void *userdata) |
bool | fifoCheckAddress (int channel) |
bool | fifoCheckValue32 (int channel) |
bool | fifoCheckDatamsg (int channel) |
int | fifoCheckDatamsgLength (int channel) |
void * | fifoGetAddress (int channel) |
u32 | fifoGetValue32 (int channel) |
int | fifoGetDatamsg (int channel, int buffersize, u8 *destbuffer) |
low level FIFO API.
enum PM_LedBlinkMode |
fifoInit | ( | ) |
Initializes the fifo system.
Attempts to sync with the other CPU, if it fails, fifo services won't be provided.
fifoSendAddress | ( | int | channel, | |
void * | address | |||
) |
Send an address.
channel | channel number to send to | |
address | address to send Transmits an address in the range 0x02000000-0x023FFFFF to the other CPU. |
fifoSendDatamsg | ( | int | channel, | |
int | num_bytes, | |||
u8 * | data_array | |||
) |
Send a sequence of bytes to the other CPU.
channel | channel number to send to | |
num_bytes | number of bytes to send | |
data_array | pointer to data array |
num_bytes can be between 0 and FIFO_MAX_DATA_BYTES (see above) - sending 0 bytes can be useful sometimes ...
fifoSendValue32 | ( | int | channel, | |
u32 | value32 | |||
) |
Send a 32bit value.
channel | channel number to send to | |
value32 | 32bit value to send Transmits a 32bit value to the other CPU. |
fifoSetAddressHandler | ( | int | channel, | |
FifoAddressHandlerFunc | newhandler, | |||
void * | userdata | |||
) |
Set user address message callback.
channel | ||
newhandler | ||
userdata | Set a callback to receive incoming address messages on a specific channel. |
fifoSetValue32Handler | ( | int | channel, | |
FifoValue32HandlerFunc | newhandler, | |||
void * | userdata | |||
) |
Set user value32 message callback.
Set user data message callback.
channel | ||
newhandler | ||
userdata | Set a callback to receive incoming value32 messages on a specific channel. | |
channel | ||
newhandler | ||
userdata | Set a callback to receive incoming data messages on a specific channel. |