DSWifi
|
ARM7 header of DSWifi. More...
#include "dswifi_version.h"
Typedefs | |
typedef void(* | WifiSyncHandler) (void) |
Wifi Sync Handler function. | |
Functions | |
void | installWifiFIFO (void) |
Setup system FIFO handler for WiFi library messages. | |
int | PowerChip_ReadWrite (int cmd, int data) |
Reads or writes a value to the DS's power chip. | |
void | Read_Flash (int address, char *destination, int length) |
Reads an arbitrary amount of data from the firmware flash chip. | |
void | Wifi_Deinit (void) |
In case it is necessary, this function cuts power to the WiFi system. | |
void | Wifi_Init (unsigned long WifiData) |
Requires the data returned by the ARM9 WiFi init call. | |
void | Wifi_Interrupt (void) |
Handler for the ARM7 WiFi interrupt. | |
void | Wifi_SetSyncHandler (WifiSyncHandler sh) |
Call this function to request notification of when the ARM9-side Wifi_Sync() function should be called. | |
void | Wifi_Sync (void) |
Call this function when requested to sync by the ARM9 side of the WiFi lib. | |
void | Wifi_Update (void) |
Sync function to ensure data continues to flow between the two CPUs smoothly. | |
ARM7 header of DSWifi.
typedef void(* WifiSyncHandler) (void) |
Wifi Sync Handler function.
Callback function that is called when the arm9 needs to be told to synchronize with new fifo data. If this callback is used (see Wifi_SetSyncHandler()), it should send a message via the fifo to the ARM9, which will call Wifi_Sync() on ARM9.
int PowerChip_ReadWrite | ( | int | cmd, |
int | data | ||
) |
Reads or writes a value to the DS's power chip.
cmd | The byte-long command to send to the chip (top bit 1=read, 0=write - other bits = register ID to read/write) |
data | The data to write to the chip (if sending a read command, this should be zero) |
void Read_Flash | ( | int | address, |
char * | destination, | ||
int | length | ||
) |
Reads an arbitrary amount of data from the firmware flash chip.
address | Offset to start reading from in the flash chip. |
destination | Pointer to a memory buffer to hold incoming data. |
length | The number of bytes to read. |
void Wifi_Deinit | ( | void | ) |
In case it is necessary, this function cuts power to the WiFi system.
After this WiFi will be unusable until Wifi_Init() is called again.
void Wifi_Init | ( | unsigned long | WifiData | ) |
Requires the data returned by the ARM9 WiFi init call.
The data returned by the ARM9 init call must be passed to the ARM7 and then given to this function.
This function also enables power to the WiFi system, which will shorten battery life.
WifiData | You must pass the 32bit value returned by the call to Wifi_Init() on the ARM9. |
void Wifi_Interrupt | ( | void | ) |
Handler for the ARM7 WiFi interrupt.
It should be called by the interrupt handler on ARM7, and should not have multiple interrupts enabled.
void Wifi_SetSyncHandler | ( | WifiSyncHandler | sh | ) |
Call this function to request notification of when the ARM9-side Wifi_Sync() function should be called.
sh | Pointer to the function to be called for notification. |
void Wifi_Update | ( | void | ) |
Sync function to ensure data continues to flow between the two CPUs smoothly.
It Should be called at a periodic interval, such as in VBlank.