DSWifi
Loading...
Searching...
No Matches
Functions
Utilities related to Internet access.

Functions

u32 Wifi_GetIP (void)
 It returns the current IP address of the DS.
 
struct in_addr Wifi_GetIPInfo (struct in_addr *pGateway, struct in_addr *pSnmask, struct in_addr *pDns1, struct in_addr *pDns2)
 Returns IP information.
 
void Wifi_InternetMode (void)
 Sets the WiFI hardware in Internet mode.
 
void Wifi_SetIP (u32 IPaddr, u32 gateway, u32 subnetmask, u32 dns1, u32 dns2)
 Set the DS's IP address and other IP configuration information.
 

Detailed Description

Function Documentation

◆ Wifi_GetIP()

u32 Wifi_GetIP ( void  )

It returns the current IP address of the DS.

The IP may not be valid before connecting to an AP, or setting the IP manually.

Returns
The current IP address of the DS

◆ Wifi_GetIPInfo()

struct in_addr Wifi_GetIPInfo ( struct in_addr *  pGateway,
struct in_addr *  pSnmask,
struct in_addr *  pDns1,
struct in_addr *  pDns2 
)

Returns IP information.

The values may not be valid before connecting to an AP, or setting the IP manually.

Parameters
pGatewayPointer to receive the currently configured gateway IP.
pSnmaskPointer to receive the currently configured subnet mask.
pDns1Pointer to receive the currently configured primary DNS server IP.
pDns2Pointer to receive the currently configured secondary DNS server IP.
Returns
The current IP address of the DS

◆ Wifi_InternetMode()

void Wifi_InternetMode ( void  )

Sets the WiFI hardware in Internet mode.

Use Wifi_LibraryModeReady() to check when the mode change is finished.

◆ Wifi_SetIP()

void Wifi_SetIP ( u32  IPaddr,
u32  gateway,
u32  subnetmask,
u32  dns1,
u32  dns2 
)

Set the DS's IP address and other IP configuration information.

Parameters
IPaddrThe new IP address. If this value is zero, the IP, the gateway, and the subnet mask will be allocated via DHCP.
gatewayThe new gateway (example: 192.168.1.1 is 0xC0A80101)
subnetmaskThe new subnet mask (example: 255.255.255.0 is 0xFFFFFF00)
dns1The new primary dns server (NOTE! if this value is zero AND the IPaddr value is zero, dns1 and dns2 will be allocated via DHCP).
dns2The new secondary dns server