summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-20 16:31:41 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-20 16:31:41 +0000
commit9a85541b388cf04ebaa897ca9281ef270653c982 (patch)
treec0e80e2164d991563f10f897c4b3ba927a25a670 /c
parent2008-08-20 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-9a85541b388cf04ebaa897ca9281ef270653c982.tar.bz2
2008-08-20 Joel Sherrill <joel.sherrill@OARcorp.com>
* block/block.c, console/console.c, dswifi/arm9/source/sgIP.h, dswifi/arm9/source/sgIP_ARP.h, dswifi/arm9/source/sgIP_Config.h, dswifi/arm9/source/sgIP_DHCP.h, dswifi/arm9/source/sgIP_DNS.h, dswifi/arm9/source/sgIP_Hub.h, dswifi/arm9/source/sgIP_ICMP.h, dswifi/arm9/source/sgIP_IP.h, dswifi/arm9/source/sgIP_TCP.h, dswifi/arm9/source/sgIP_UDP.h, dswifi/arm9/source/sgIP_memblock.h, dswifi/arm9/source/wifi_arm9.c, dswifi/arm9/source/wifi_arm9.h, dswifi/include/dswifi7.h, dswifi/include/dswifi9.h, fb/fb.c, include/my_ipc.h, libfat/source/disc_io/disc_io.h, libfat/source/disc_io/io_nmmc.c, libnds/include/nds/arm9/exceptions.h, libnds/include/nds/arm9/input.h, libnds/include/nds/arm9/ndsmotion.h, libnds/include/nds/arm9/videoGL.h, libnds/source/arm9/console.c, libnds/source/arm9/gurumeditation.c, libnds/source/arm9/ndsmotion.c, libnds/source/common/card.c, libnds/source/common/interrupts.c, sound/sound.c, startup/start.c, touchscreen/reco.h, wifi/compat.c, wifi/compat.h: Fix most warnings.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/arm/nds/ChangeLog20
-rw-r--r--c/src/lib/libbsp/arm/nds/block/block.c1
-rw-r--r--c/src/lib/libbsp/arm/nds/console/console.c2
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP.h2
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_ARP.h4
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_Config.h4
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_DHCP.h8
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_DNS.h6
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_Hub.h4
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_ICMP.h2
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_IP.h2
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_TCP.h6
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_UDP.h4
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_memblock.h2
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/wifi_arm9.c10
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/arm9/source/wifi_arm9.h24
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/include/dswifi7.h10
-rw-r--r--c/src/lib/libbsp/arm/nds/dswifi/include/dswifi9.h24
-rw-r--r--c/src/lib/libbsp/arm/nds/fb/fb.c8
-rw-r--r--c/src/lib/libbsp/arm/nds/include/my_ipc.h2
-rw-r--r--c/src/lib/libbsp/arm/nds/libfat/source/disc_io/disc_io.h2
-rw-r--r--c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_nmmc.c4
-rw-r--r--c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/exceptions.h142
-rw-r--r--c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/input.h142
-rw-r--r--c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/ndsmotion.h76
-rw-r--r--c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/videoGL.h6
-rw-r--r--c/src/lib/libbsp/arm/nds/libnds/source/arm9/console.c3
-rw-r--r--c/src/lib/libbsp/arm/nds/libnds/source/arm9/gurumeditation.c9
-rw-r--r--c/src/lib/libbsp/arm/nds/libnds/source/arm9/ndsmotion.c24
-rw-r--r--c/src/lib/libbsp/arm/nds/libnds/source/common/card.c2
-rw-r--r--c/src/lib/libbsp/arm/nds/libnds/source/common/interrupts.c140
-rw-r--r--c/src/lib/libbsp/arm/nds/sound/sound.c4
-rw-r--r--c/src/lib/libbsp/arm/nds/startup/start.c9
-rw-r--r--c/src/lib/libbsp/arm/nds/touchscreen/reco.h2
-rw-r--r--c/src/lib/libbsp/arm/nds/wifi/compat.c9
-rw-r--r--c/src/lib/libbsp/arm/nds/wifi/compat.h6
36 files changed, 582 insertions, 143 deletions
diff --git a/c/src/lib/libbsp/arm/nds/ChangeLog b/c/src/lib/libbsp/arm/nds/ChangeLog
index aaa5560642..ef1dfa4d7b 100644
--- a/c/src/lib/libbsp/arm/nds/ChangeLog
+++ b/c/src/lib/libbsp/arm/nds/ChangeLog
@@ -1,3 +1,23 @@
+2008-08-20 Joel Sherrill <joel.sherrill@OARcorp.com>
+
+ * block/block.c, console/console.c, dswifi/arm9/source/sgIP.h,
+ dswifi/arm9/source/sgIP_ARP.h, dswifi/arm9/source/sgIP_Config.h,
+ dswifi/arm9/source/sgIP_DHCP.h, dswifi/arm9/source/sgIP_DNS.h,
+ dswifi/arm9/source/sgIP_Hub.h, dswifi/arm9/source/sgIP_ICMP.h,
+ dswifi/arm9/source/sgIP_IP.h, dswifi/arm9/source/sgIP_TCP.h,
+ dswifi/arm9/source/sgIP_UDP.h, dswifi/arm9/source/sgIP_memblock.h,
+ dswifi/arm9/source/wifi_arm9.c, dswifi/arm9/source/wifi_arm9.h,
+ dswifi/include/dswifi7.h, dswifi/include/dswifi9.h, fb/fb.c,
+ include/my_ipc.h, libfat/source/disc_io/disc_io.h,
+ libfat/source/disc_io/io_nmmc.c,
+ libnds/include/nds/arm9/exceptions.h,
+ libnds/include/nds/arm9/input.h, libnds/include/nds/arm9/ndsmotion.h,
+ libnds/include/nds/arm9/videoGL.h, libnds/source/arm9/console.c,
+ libnds/source/arm9/gurumeditation.c, libnds/source/arm9/ndsmotion.c,
+ libnds/source/common/card.c, libnds/source/common/interrupts.c,
+ sound/sound.c, startup/start.c, touchscreen/reco.h, wifi/compat.c,
+ wifi/compat.h: Fix most warnings.
+
2008-08-19 Joel Sherrill <joel.sherrill@OARcorp.com>
* dswifi/arm7/makefile, dswifi/include/netinet/in.h,
diff --git a/c/src/lib/libbsp/arm/nds/block/block.c b/c/src/lib/libbsp/arm/nds/block/block.c
index 96b39f4256..a8c35fabac 100644
--- a/c/src/lib/libbsp/arm/nds/block/block.c
+++ b/c/src/lib/libbsp/arm/nds/block/block.c
@@ -77,6 +77,7 @@ int
nds_flash_control (int minor, uint32_t cmd, void *arg)
{
printk ("nds_flash_control\n");
+ return 0;
}
rtems_status_code
diff --git a/c/src/lib/libbsp/arm/nds/console/console.c b/c/src/lib/libbsp/arm/nds/console/console.c
index d59e94cdec..587c3d119d 100644
--- a/c/src/lib/libbsp/arm/nds/console/console.c
+++ b/c/src/lib/libbsp/arm/nds/console/console.c
@@ -32,6 +32,8 @@
* printk support.
*/
+/* from NDS support library */
+extern void consolePrintChar(char c);
void
nds_putch (char c)
{
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP.h b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP.h
index 911e9ff482..e9b1a29672 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP.h
@@ -44,7 +44,7 @@ extern unsigned long volatile sgIP_timems;
extern "C" {
#endif
- void sgIP_Init();
+ void sgIP_Init(void);
void sgIP_Timer(int num_ms);
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_ARP.h b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_ARP.h
index 0c56747527..9c9e9ffd55 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_ARP.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_ARP.h
@@ -58,8 +58,8 @@ typedef struct SGIP_HEADER_ARP {
extern "C" {
#endif
- extern void sgIP_ARP_Init();
- extern void sgIP_ARP_Timer100ms();
+ extern void sgIP_ARP_Init(void);
+ extern void sgIP_ARP_Timer100ms(void);
extern void sgIP_ARP_FlushInterface(sgIP_Hub_HWInterface * hw);
extern int sgIP_ARP_ProcessIPFrame(sgIP_Hub_HWInterface * hw, sgIP_memblock * mb);
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_Config.h b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_Config.h
index 5be7166890..cfcdcf7050 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_Config.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_Config.h
@@ -228,9 +228,9 @@ extern int sgIP_errno;
#ifdef __cplusplus
extern "C" {
#endif
- extern int sgIP_DisableInterrupts();
+ extern int sgIP_DisableInterrupts(void);
extern void sgIP_RestoreInterrupts(int);
- extern void sgIP_IntrWaitEvent();
+ extern void sgIP_IntrWaitEvent(void);
#ifdef __cplusplus
};
#endif
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_DHCP.h b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_DHCP.h
index 1f5f5f0b8b..505b700b23 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_DHCP.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_DHCP.h
@@ -69,14 +69,14 @@ enum SGIP_DHCP_STATUS {
extern "C" {
#endif
- void sgIP_DHCP_Init();
+ void sgIP_DHCP_Init(void);
void sgIP_DHCP_SetHostName(char * s); // just for the fun of it.
int sgIP_DHCP_IsDhcpIp(unsigned long ip); // check if the IP address was assigned via dhcp.
void sgIP_DHCP_Start(sgIP_Hub_HWInterface * interface, int getDNS); // begin dhcp transaction to get IP and maybe DNS data.
- void sgIP_DHCP_Release(); // call to dump our DHCP address and leave.
- int sgIP_DHCP_Update(); // MUST be called periodicly after _Start; returns status - call until it returns something other than SGIP_DHCP_STATUS_WORKING
- void sgIP_DHCP_Terminate(); // kill the process where it stands; deallocate all DHCP resources.
+ void sgIP_DHCP_Release(void); // call to dump our DHCP address and leave.
+ int sgIP_DHCP_Update(void); // MUST be called periodicly after _Start; returns status - call until it returns something other than SGIP_DHCP_STATUS_WORKING
+ void sgIP_DHCP_Terminate(void); // kill the process where it stands; deallocate all DHCP resources.
#ifdef __cplusplus
};
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_DNS.h b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_DNS.h
index 2922579a7f..3ccfed11ed 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_DNS.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_DNS.h
@@ -54,11 +54,11 @@ typedef struct SGIP_DNS_HOSTENT {
extern "C" {
#endif
-extern void sgIP_DNS_Init();
-extern void sgIP_DNS_Timer1000ms();
+extern void sgIP_DNS_Init(void);
+extern void sgIP_DNS_Timer1000ms(void);
extern sgIP_DNS_Hostent * sgIP_DNS_gethostbyname(const char * name);
-extern sgIP_DNS_Record * sgIP_DNS_GetUnusedRecord();
+extern sgIP_DNS_Record * sgIP_DNS_GetUnusedRecord(void);
extern sgIP_DNS_Record * sgIP_DNS_FindDNSRecord(const char * name);
#ifdef __cplusplus
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_Hub.h b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_Hub.h
index edfa4472db..fd1305524f 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_Hub.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_Hub.h
@@ -81,7 +81,7 @@ extern "C" {
#endif
-extern void sgIP_Hub_Init();
+extern void sgIP_Hub_Init(void);
extern sgIP_Hub_Protocol * sgIP_Hub_AddProtocolInterface(int protocolID, int (*ReceivePacket)(sgIP_memblock *), int (*InterfaceInit)(sgIP_Hub_Protocol *));
@@ -96,7 +96,7 @@ extern int sgIP_Hub_SendRawPacket(sgIP_Hub_HWInterface * hw, sgIP_memblock * pac
extern int sgIP_Hub_IPMaxMessageSize(unsigned long ipaddr);
unsigned long sgIP_Hub_GetCompatibleIP(unsigned long destIP);
-extern sgIP_Hub_HWInterface * sgIP_Hub_GetDefaultInterface();
+extern sgIP_Hub_HWInterface * sgIP_Hub_GetDefaultInterface(void);
unsigned short htons(unsigned short num);
unsigned long htonl(unsigned long num);
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_ICMP.h b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_ICMP.h
index 815b35ce5f..e934609510 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_ICMP.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_ICMP.h
@@ -38,7 +38,7 @@ typedef struct SGIP_HEADER_ICMP {
extern "C" {
#endif
- extern void sgIP_ICMP_Init();
+ extern void sgIP_ICMP_Init(void);
extern int sgIP_ICMP_ReceivePacket(sgIP_memblock * mb, unsigned long srcip, unsigned long destip);
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_IP.h b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_IP.h
index 4935acd846..4d579569cf 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_IP.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_IP.h
@@ -52,7 +52,7 @@ extern "C" {
extern int sgIP_IP_ReceivePacket(sgIP_memblock * mb);
extern int sgIP_IP_MaxContentsSize(unsigned long destip);
- extern int sgIP_IP_RequiredHeaderSize();
+ extern int sgIP_IP_RequiredHeaderSize(void);
extern int sgIP_IP_SendViaIP(sgIP_memblock * mb, int protocol, unsigned long srcip, unsigned long destip);
extern unsigned long sgIP_IP_GetLocalBindAddr(unsigned long srcip, unsigned long destip);
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_TCP.h b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_TCP.h
index 2c84551e2b..3c5f8ac8ff 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_TCP.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_TCP.h
@@ -109,14 +109,14 @@ typedef struct SGIP_TCP_SYNCOOKIE {
extern "C" {
#endif
- extern void sgIP_TCP_Init();
- extern void sgIP_TCP_Timer();
+ extern void sgIP_TCP_Init(void);
+ extern void sgIP_TCP_Timer(void);
extern int sgIP_TCP_ReceivePacket(sgIP_memblock * mb, unsigned long srcip, unsigned long destip);
extern int sgIP_TCP_SendPacket(sgIP_Record_TCP * rec, int flags, int datalength); // data sent is taken directly from the TX fifo.
extern int sgIP_TCP_SendSynReply(int flags,unsigned long seq, unsigned long ack, unsigned long srcip, unsigned long destip, int srcport, int destport, int windowlen);
- extern sgIP_Record_TCP * sgIP_TCP_AllocRecord();
+ extern sgIP_Record_TCP * sgIP_TCP_AllocRecord(void);
extern void sgIP_TCP_FreeRecord(sgIP_Record_TCP * rec);
extern int sgIP_TCP_Bind(sgIP_Record_TCP * rec, int srcport, unsigned long srcip);
extern int sgIP_TCP_Listen(sgIP_Record_TCP * rec, int maxlisten);
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_UDP.h b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_UDP.h
index 496cd0ada7..ea90adbca2 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_UDP.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_UDP.h
@@ -60,13 +60,13 @@ typedef struct SGIP_RECORD_UDP {
extern "C" {
#endif
- void sgIP_UDP_Init();
+ void sgIP_UDP_Init(void);
int sgIP_UDP_CalcChecksum(sgIP_memblock * mb, unsigned long srcip, unsigned long destip, int totallength);
int sgIP_UDP_ReceivePacket(sgIP_memblock * mb, unsigned long srcip, unsigned long destip);
int sgIP_UDP_SendPacket(sgIP_Record_UDP * rec, const char * data, int datalen, unsigned long destip, int destport);
- sgIP_Record_UDP * sgIP_UDP_AllocRecord();
+ sgIP_Record_UDP * sgIP_UDP_AllocRecord(void);
void sgIP_UDP_FreeRecord(sgIP_Record_UDP * rec);
int sgIP_UDP_Bind(sgIP_Record_UDP * rec, int srcport, unsigned long srcip);
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_memblock.h b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_memblock.h
index 3b262932a8..dfbf1bcbb5 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_memblock.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/sgIP_memblock.h
@@ -46,7 +46,7 @@ typedef struct SGIP_MEMBLOCK {
extern "C" {
#endif
- extern void sgIP_memblock_Init();
+ extern void sgIP_memblock_Init(void);
extern sgIP_memblock * sgIP_memblock_alloc(int packetsize);
extern sgIP_memblock * sgIP_memblock_allocHW(int headersize, int packetsize);
extern void sgIP_memblock_free(sgIP_memblock * mb);
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/wifi_arm9.c b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/wifi_arm9.c
index 4fc5de963e..5ec5a4a6af 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/wifi_arm9.c
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/wifi_arm9.c
@@ -280,7 +280,7 @@ int Wifi_CmpMacAddr(volatile void * mac1,volatile void * mac2) {
-u32 Wifi_TxBufferWordsAvailable() {
+u32 Wifi_TxBufferWordsAvailable(void) {
s32 size=WifiData->txbufIn-WifiData->txbufOut-1;
if(size<0) size += WIFI_TXBUFFER_SIZE/2;
return size;
@@ -482,7 +482,7 @@ int Wifi_ConnectAP(Wifi_AccessPoint * apdata, int wepmode, int wepkeyid, u8 * we
}
return 0;
}
-void Wifi_AutoConnect() {
+void Wifi_AutoConnect(void) {
if(!(WifiData->wfc_enable[0]&0x80)) {
wifi_connect_state=ASSOCSTATUS_CANNOTCONNECT;
} else {
@@ -492,7 +492,7 @@ void Wifi_AutoConnect() {
}
static
-void sgIP_DNS_Record_Localhost()
+void sgIP_DNS_Record_Localhost(void)
{
sgIP_DNS_Record *rec;
const unsigned char * resdata_c = (unsigned char *)&(wifi_hw->ipaddr);
@@ -955,7 +955,7 @@ void Wifi_SetIP(u32 IPaddr, u32 gateway, u32 subnetmask, u32 dns1, u32 dns2) {
}
}
-void Wifi_SetDHCP() {
+void Wifi_SetDHCP(void) {
}
@@ -989,7 +989,7 @@ u32 Wifi_GetStats(int statnum) {
//////////////////////////////////////////////////////////////////////////
// sync functions
-void Wifi_Sync() {
+void Wifi_Sync(void) {
Wifi_Update();
}
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/wifi_arm9.h b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/wifi_arm9.h
index d975a01813..e8f351d07c 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/wifi_arm9.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/arm9/source/wifi_arm9.h
@@ -69,7 +69,7 @@ typedef void (*WifiPacketHandler)(int, int);
// Wifi Sync Handler function: Callback function that is called when the arm7 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 arm7, which will call Wifi_Sync() on arm7.
-typedef void (*WifiSyncHandler)();
+typedef void (*WifiSyncHandler)(void);
#ifdef __cplusplus
@@ -80,37 +80,37 @@ extern void Wifi_CopyMacAddr(volatile void * dest, volatile void * src);
extern int Wifi_CmpMacAddr(volatile void * mac1, volatile void * mac2);
extern unsigned long Wifi_Init(int initflags);
-extern int Wifi_CheckInit();
+extern int Wifi_CheckInit(void);
extern int Wifi_RawTxFrame(u16 datalen, u16 rate, u16 * data);
extern void Wifi_SetSyncHandler(WifiSyncHandler wshfunc);
extern void Wifi_RawSetPacketHandler(WifiPacketHandler wphfunc);
extern int Wifi_RxRawReadPacket(s32 packetID, s32 readlength, u16 * data);
-extern void Wifi_DisableWifi();
-extern void Wifi_EnableWifi();
+extern void Wifi_DisableWifi(void);
+extern void Wifi_EnableWifi(void);
extern void Wifi_SetPromiscuousMode(int enable);
-extern void Wifi_ScanMode();
+extern void Wifi_ScanMode(void);
extern void Wifi_SetChannel(int channel);
-extern int Wifi_GetNumAP();
+extern int Wifi_GetNumAP(void);
extern int Wifi_GetAPData(int apnum, Wifi_AccessPoint * apdata);
extern int Wifi_FindMatchingAP(int numaps, Wifi_AccessPoint * apdata, Wifi_AccessPoint * match_dest);
extern int Wifi_ConnectAP(Wifi_AccessPoint * apdata, int wepmode, int wepkeyid, u8 * wepkey);
-extern void Wifi_AutoConnect();
+extern void Wifi_AutoConnect(void);
-extern int Wifi_AssocStatus();
-extern int Wifi_DisconnectAP();
+extern int Wifi_AssocStatus(void);
+extern int Wifi_DisconnectAP(void);
extern int Wifi_GetData(int datatype, int bufferlen, unsigned char * buffer);
-extern void Wifi_Update();
-extern void Wifi_Sync();
+extern void Wifi_Update(void);
+extern void Wifi_Sync(void);
#ifdef WIFI_USE_TCP_SGIP
extern void Wifi_Timer(int num_ms);
extern void Wifi_SetIP(u32 IPaddr, u32 gateway, u32 subnetmask, u32 dns1, u32 dns2);
-extern u32 Wifi_GetIP();
+extern u32 Wifi_GetIP(void);
#endif
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/include/dswifi7.h b/c/src/lib/libbsp/arm/nds/dswifi/include/dswifi7.h
index 2f784ccf48..0c9e711495 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/include/dswifi7.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/include/dswifi7.h
@@ -30,7 +30,7 @@ SOFTWARE.
// 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.
-typedef void (*WifiSyncHandler)();
+typedef void (*WifiSyncHandler)(void);
#ifdef __cplusplus
@@ -51,11 +51,11 @@ extern int PowerChip_ReadWrite(int cmd, int data);
// Wifi_Interrupt: Handler for the arm7 wifi interrupt. Should be called by the
// interrupt handler on arm7, and should *not* have multiple interrupts enabled.
-extern void Wifi_Interrupt();
+extern void Wifi_Interrupt(void);
// Wifi_Update: Sync function to ensure data continues to flow between the two
// CPUs smoothly. Should be called at a periodic interval, such as in vblank.
-extern void Wifi_Update();
+extern void Wifi_Update(void);
// Wifi_Init: Requires the data returned by the arm9 wifi init call. The arm9
// init call's returned data must be passed to the arm7 and then given to this
@@ -69,11 +69,11 @@ extern void Wifi_Init(unsigned long WifiData);
// Wifi_Deinit: In the case that it is necessary, this function cuts power to
// the wifi system. After this the wifi will be unusable until Wifi_Init is
// called again.
-extern void Wifi_Deinit();
+extern void Wifi_Deinit(void);
// Wifi_Sync: Call this function when requested to sync by the arm9 side of the
// wifi lib
-extern void Wifi_Sync();
+extern void Wifi_Sync(void);
// Wifi_SetSyncHandler: Call this function to request notification of when the
// ARM9-side Wifi_Sync function should be called.
diff --git a/c/src/lib/libbsp/arm/nds/dswifi/include/dswifi9.h b/c/src/lib/libbsp/arm/nds/dswifi/include/dswifi9.h
index 532169d39d..4b019d3783 100644
--- a/c/src/lib/libbsp/arm/nds/dswifi/include/dswifi9.h
+++ b/c/src/lib/libbsp/arm/nds/dswifi/include/dswifi9.h
@@ -175,7 +175,7 @@ typedef void (*WifiPacketHandler)(int, int);
// Wifi Sync Handler function: Callback function that is called when the arm7 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 arm7, which will call Wifi_Sync() on arm7.
-typedef void (*WifiSyncHandler)();
+typedef void (*WifiSyncHandler)(void);
#ifdef __cplusplus
@@ -192,15 +192,15 @@ extern unsigned long Wifi_Init(int initflags);
// Wifi_CheckInit: Verifies when the ARM7 has been successfully initialized
// Returns: 1 if the arm7 is ready for wifi, 0 otherwise
-extern int Wifi_CheckInit();
+extern int Wifi_CheckInit(void);
// Wifi_DisableWifi: Instructs the ARM7 to disengage wireless and stop receiving or
// transmitting.
-extern void Wifi_DisableWifi();
+extern void Wifi_DisableWifi(void);
// Wifi_EnableWifi: Instructs the ARM7 to go into a basic "active" mode, not actually
// associated to an AP, but actively receiving and potentially transmitting
-extern void Wifi_EnableWifi();
+extern void Wifi_EnableWifi(void);
// Wifi_SetPromiscuousMode: Allows the DS to enter or leave a "promsicuous" mode, in which
// all data that can be received is forwarded to the arm9 for user processing.
@@ -211,7 +211,7 @@ extern void Wifi_SetPromiscuousMode(int enable);
// Wifi_ScanMode: Instructs the ARM7 to periodically rotate through the channels to
// pick up and record information from beacons given off by APs
-extern void Wifi_ScanMode();
+extern void Wifi_ScanMode(void);
// Wifi_SetChannel: If the wifi system is not connected or connecting to an access point, instruct
// the chipset to change channel
@@ -220,7 +220,7 @@ extern void Wifi_SetChannel(int channel);
// Wifi_GetNumAP:
// Returns: the current number of APs that are known about and tracked internally
-extern int Wifi_GetNumAP();
+extern int Wifi_GetNumAP(void);
// Wifi_GetAPData: Grabs data from internal structures for user code (always succeeds)
// int apnum: the 0-based index of the access point record to fetch
@@ -245,15 +245,15 @@ extern int Wifi_FindMatchingAP(int numaps, Wifi_AccessPoint * apdata, Wifi_Acces
extern int Wifi_ConnectAP(Wifi_AccessPoint * apdata, int wepmode, int wepkeyid, unsigned char * wepkey);
// Wifi_AutoConnect: Connect to an access point specified by the WFC data in the firmware
-extern void Wifi_AutoConnect();
+extern void Wifi_AutoConnect(void);
// Wifi_AssocStatus: Returns information about the status of connection to an AP
// Returns: a value from the WIFI_ASSOCSTATUS enum, continue polling until you
// receive ASSOCSTATUS_CONNECTED or ASSOCSTATUS_CANNOTCONNECT
-extern int Wifi_AssocStatus();
+extern int Wifi_AssocStatus(void);
// Wifi_DisconnectAP: Disassociate from the Access Point
-extern int Wifi_DisconnectAP();
+extern int Wifi_DisconnectAP(void);
// Wifi_Timer: This function should be called in a periodic interrupt. It serves as the basis
// for all updating in the sgIP library, all retransmits, timeouts, and etc are based on this
@@ -263,7 +263,7 @@ extern void Wifi_Timer(int num_ms);
// Wifi_GetIP:
// Returns: The current IP address of the DS (may not be valid before connecting to an AP, or setting the IP manually.)
-extern unsigned long Wifi_GetIP(); // get local ip
+extern unsigned long Wifi_GetIP(void); // get local ip
// Wifi_GetIPInfo: (values may not be valid before connecting to an AP, or setting the IP manually.)
// unsigned long * pGateway: pointer to receive the currently configured gateway IP
@@ -317,11 +317,11 @@ extern int Wifi_RxRawReadPacket(long packetID, long readlength, unsigned short *
// Wifi_Update: Checks for new data from the arm7 and initiates routing if data
// is available.
-extern void Wifi_Update();
+extern void Wifi_Update(void);
// Wifi_Sync: Call this function when requested to sync by the arm7 side of the
// wifi lib
-extern void Wifi_Sync();
+extern void Wifi_Sync(void);
// Wifi_SetSyncHandler: Call this function to request notification of when the
// ARM7-side Wifi_Sync function should be called.
diff --git a/c/src/lib/libbsp/arm/nds/fb/fb.c b/c/src/lib/libbsp/arm/nds/fb/fb.c
index 9d5d26f5e9..c2e5c6def7 100644
--- a/c/src/lib/libbsp/arm/nds/fb/fb.c
+++ b/c/src/lib/libbsp/arm/nds/fb/fb.c
@@ -166,11 +166,11 @@ fbds_control (rtems_device_major_number major,
if (!minor) {
videoSetMode (MODE_FB0);
vramSetBankA (VRAM_A_LCD);
- memset (fb_info.smem_start, 0, fb_info.smem_len);
+ memset ((void *)fb_info.smem_start, 0, fb_info.smem_len);
} else {
videoSetModeSub (MODE_FB0);
vramSetBankB (VRAM_B_LCD);
- memset (fb_info2.smem_start, 0, fb_info2.smem_len);
+ memset ((void *)fb_info2.smem_start, 0, fb_info2.smem_len);
}
break;
@@ -178,9 +178,9 @@ fbds_control (rtems_device_major_number major,
/* leave graphics mode, in fact we only clear screen */
printk ("[#] leaving graphic mode on fb%d\n", minor);
if (!minor) {
- memset (fb_info.smem_start, 0, fb_info.smem_len);
+ memset ((void *)fb_info.smem_start, 0, fb_info.smem_len);
} else {
- memset (fb_info2.smem_start, 0, fb_info2.smem_len);
+ memset ((void *)fb_info2.smem_start, 0, fb_info2.smem_len);
/* back to console */
videoSetModeSub (MODE_0_2D | DISPLAY_BG0_ACTIVE);
vramSetBankC (VRAM_C_SUB_BG);
diff --git a/c/src/lib/libbsp/arm/nds/include/my_ipc.h b/c/src/lib/libbsp/arm/nds/include/my_ipc.h
index 038c2e148e..f786b88575 100644
--- a/c/src/lib/libbsp/arm/nds/include/my_ipc.h
+++ b/c/src/lib/libbsp/arm/nds/include/my_ipc.h
@@ -25,7 +25,7 @@ typedef struct
} my_TransferRegion;
static inline my_TransferRegion volatile *
-getmy_IPC ()
+getmy_IPC (void)
{
return (my_TransferRegion volatile *) (0x027FF000 +
sizeof (TransferRegion));
diff --git a/c/src/lib/libbsp/arm/nds/libfat/source/disc_io/disc_io.h b/c/src/lib/libbsp/arm/nds/libfat/source/disc_io/disc_io.h
index 1c369f2cf5..c79036451d 100644
--- a/c/src/lib/libbsp/arm/nds/libfat/source/disc_io/disc_io.h
+++ b/c/src/lib/libbsp/arm/nds/libfat/source/disc_io/disc_io.h
@@ -50,7 +50,7 @@
#define _IO_ALLOW_UNALIGNED
#if defined _IO_USE_DMA && defined _IO_ALLOW_UNALIGNED
- #error You can't use both DMA and unaligned memory
+ #error "You cannot use both DMA and unaligned memory"
#endif
#define FEATURE_MEDIUM_CANREAD 0x00000001
diff --git a/c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_nmmc.c b/c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_nmmc.c
index 19283ebf67..913594bf83 100644
--- a/c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_nmmc.c
+++ b/c/src/lib/libbsp/arm/nds/libfat/source/disc_io/io_nmmc.c
@@ -60,7 +60,7 @@ static inline void _Neo_CloseSPI ( void )
CARD_CR1 = 0;
}
-static inline void _Neo_MK2GameMode() {
+static inline void _Neo_MK2GameMode(void) {
_Neo_OpenSPI(_NMMC_spi_freq); // Enable DS Card's SPI port
_Neo_SPI(0xF1); // Switch to game mode
_Neo_CloseSPI(); // Disable DS Card's SPI port
@@ -147,7 +147,7 @@ static bool _Neo_CheckMMCResponse( u8 response, u8 mask ) {
// Neo MMC functions
-static bool _Neo_InitMMC() {
+static bool _Neo_InitMMC(void) {
_Neo_MK2GameMode();
_Neo_WriteMK2Config( MK2_CONFIG_ZIP_RAM_CLOSE | MK2_CONFIG_GAME_FLASH_CLOSE);
diff --git a/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/exceptions.h b/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/exceptions.h
index e9bfd74285..09bc16e3f7 100644
--- a/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/exceptions.h
+++ b/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/exceptions.h
@@ -22,6 +22,144 @@
distribution.
$Log$
+ Revision 1.1 2008/04/16 18:37:32 joel
+ 2008-04-16 Matthieu Bucchianeri <mbucchia@gmail.com>
+
+ * ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
+ mk_libnds.sh, patch.libnds, preinstall.am, block/block.c,
+ clock/clock.c, console/console.c, coproc/coproc.S, coproc/coproc.c,
+ coproc/coproc.ld, dswifi/dswifi_license.txt, dswifi/makefile,
+ dswifi/arm7/makefile, dswifi/arm7/source/wifi_arm7.c,
+ dswifi/arm7/source/wifi_arm7.h, dswifi/arm9/makefile,
+ dswifi/arm9/source/sgIP.c, dswifi/arm9/source/sgIP.h,
+ dswifi/arm9/source/sgIP_ARP.c, dswifi/arm9/source/sgIP_ARP.h,
+ dswifi/arm9/source/sgIP_Config.h, dswifi/arm9/source/sgIP_DHCP.c,
+ dswifi/arm9/source/sgIP_DHCP.h, dswifi/arm9/source/sgIP_DNS.c,
+ dswifi/arm9/source/sgIP_DNS.h, dswifi/arm9/source/sgIP_Hub.c,
+ dswifi/arm9/source/sgIP_Hub.h, dswifi/arm9/source/sgIP_ICMP.c,
+ dswifi/arm9/source/sgIP_ICMP.h, dswifi/arm9/source/sgIP_IP.c,
+ dswifi/arm9/source/sgIP_IP.h, dswifi/arm9/source/sgIP_TCP.c,
+ dswifi/arm9/source/sgIP_TCP.h, dswifi/arm9/source/sgIP_UDP.c,
+ dswifi/arm9/source/sgIP_UDP.h, dswifi/arm9/source/sgIP_memblock.c,
+ dswifi/arm9/source/sgIP_memblock.h,
+ dswifi/arm9/source/sgIP_sockets.c, dswifi/arm9/source/sgIP_sockets.h,
+ dswifi/arm9/source/wifi_arm9.c, dswifi/arm9/source/wifi_arm9.h,
+ dswifi/common/source/dsregs.h, dswifi/common/source/spinlock.h,
+ dswifi/common/source/spinlock.s, dswifi/common/source/wifi_shared.h,
+ dswifi/include/dswifi7.h, dswifi/include/dswifi9.h,
+ dswifi/include/dswifi_version.h, dswifi/include/netdb.h,
+ dswifi/include/sgIP_errno.h, dswifi/include/netinet/in.h, fb/fb.c,
+ fb/fb.h, include/bsp.h, include/my_ipc.h, include/tm27.h,
+ include/types.h, include/sys/iosupport.h, irq/irq.c, irq/irq.h,
+ libfat/gba/include/fat.h, libfat/include/fat.h,
+ libfat/nds/include/fat.h, libfat/source/bit_ops.h,
+ libfat/source/cache.c, libfat/source/cache.h, libfat/source/common.h,
+ libfat/source/directory.c, libfat/source/directory.h,
+ libfat/source/fatdir.c, libfat/source/fatdir.h,
+ libfat/source/fatfile.c, libfat/source/fatfile.h,
+ libfat/source/file_allocation_table.c,
+ libfat/source/file_allocation_table.h, libfat/source/filetime.c,
+ libfat/source/filetime.h, libfat/source/libfat.c,
+ libfat/source/mem_allocate.h, libfat/source/partition.c,
+ libfat/source/partition.h, libfat/source/disc_io/disc.c,
+ libfat/source/disc_io/disc.h, libfat/source/disc_io/disc_io.h,
+ libfat/source/disc_io/io_cf_common.c,
+ libfat/source/disc_io/io_cf_common.h,
+ libfat/source/disc_io/io_dldi.h, libfat/source/disc_io/io_dldi.s,
+ libfat/source/disc_io/io_efa2.c, libfat/source/disc_io/io_efa2.h,
+ libfat/source/disc_io/io_fcsr.c, libfat/source/disc_io/io_fcsr.h,
+ libfat/source/disc_io/io_m3_common.c,
+ libfat/source/disc_io/io_m3_common.h,
+ libfat/source/disc_io/io_m3cf.c, libfat/source/disc_io/io_m3cf.h,
+ libfat/source/disc_io/io_m3sd.c, libfat/source/disc_io/io_m3sd.h,
+ libfat/source/disc_io/io_mpcf.c, libfat/source/disc_io/io_mpcf.h,
+ libfat/source/disc_io/io_njsd.c, libfat/source/disc_io/io_njsd.h,
+ libfat/source/disc_io/io_nmmc.c, libfat/source/disc_io/io_nmmc.h,
+ libfat/source/disc_io/io_sc_common.c,
+ libfat/source/disc_io/io_sc_common.h,
+ libfat/source/disc_io/io_sccf.c, libfat/source/disc_io/io_sccf.h,
+ libfat/source/disc_io/io_scsd.c, libfat/source/disc_io/io_scsd.h,
+ libfat/source/disc_io/io_scsd_s.s,
+ libfat/source/disc_io/io_sd_common.c,
+ libfat/source/disc_io/io_sd_common.h, libnds/Makefile.arm7,
+ libnds/Makefile.arm9, libnds/libnds_license.txt,
+ libnds/basicARM7/source/defaultARM7.c,
+ libnds/include/default_font_bin.h, libnds/include/gbfs.h,
+ libnds/include/nds.h, libnds/include/nds/bios.h,
+ libnds/include/nds/card.h, libnds/include/nds/dma.h,
+ libnds/include/nds/interrupts.h, libnds/include/nds/ipc.h,
+ libnds/include/nds/jtypes.h, libnds/include/nds/memory.h,
+ libnds/include/nds/registers_alt.h, libnds/include/nds/reload.h,
+ libnds/include/nds/system.h, libnds/include/nds/timers.h,
+ libnds/include/nds/arm7/audio.h, libnds/include/nds/arm7/clock.h,
+ libnds/include/nds/arm7/serial.h, libnds/include/nds/arm7/touch.h,
+ libnds/include/nds/arm9/background.h,
+ libnds/include/nds/arm9/boxtest.h, libnds/include/nds/arm9/cache.h,
+ libnds/include/nds/arm9/console.h,
+ libnds/include/nds/arm9/exceptions.h,
+ libnds/include/nds/arm9/image.h, libnds/include/nds/arm9/input.h,
+ libnds/include/nds/arm9/math.h, libnds/include/nds/arm9/ndsmotion.h,
+ libnds/include/nds/arm9/pcx.h, libnds/include/nds/arm9/postest.h,
+ libnds/include/nds/arm9/rumble.h, libnds/include/nds/arm9/sound.h,
+ libnds/include/nds/arm9/sprite.h, libnds/include/nds/arm9/trig_lut.h,
+ libnds/include/nds/arm9/video.h, libnds/include/nds/arm9/videoGL.h,
+ libnds/source/arm7/audio.c, libnds/source/arm7/clock.c,
+ libnds/source/arm7/microphone.c, libnds/source/arm7/spi.c,
+ libnds/source/arm7/touch.c, libnds/source/arm7/userSettings.c,
+ libnds/source/arm9/COS.bin, libnds/source/arm9/COS.s,
+ libnds/source/arm9/SIN.bin, libnds/source/arm9/SIN.s,
+ libnds/source/arm9/TAN.bin, libnds/source/arm9/TAN.s,
+ libnds/source/arm9/boxtest.c, libnds/source/arm9/console.c,
+ libnds/source/arm9/dcache.s, libnds/source/arm9/default_font.bin,
+ libnds/source/arm9/default_font.s,
+ libnds/source/arm9/exceptionHandler.S,
+ libnds/source/arm9/exceptionHandler.s,
+ libnds/source/arm9/exceptions.c, libnds/source/arm9/gurumeditation.c,
+ libnds/source/arm9/icache.s, libnds/source/arm9/image.c,
+ libnds/source/arm9/initSystem.c, libnds/source/arm9/keys.c,
+ libnds/source/arm9/ndsmotion.c, libnds/source/arm9/pcx.c,
+ libnds/source/arm9/rumble.c, libnds/source/arm9/sound.c,
+ libnds/source/arm9/system.c, libnds/source/arm9/touch.c,
+ libnds/source/arm9/video.c, libnds/source/arm9/videoGL.c,
+ libnds/source/common/biosCalls.s, libnds/source/common/card.c,
+ libnds/source/common/gbfs.c,
+ libnds/source/common/interruptDispatcher.s,
+ libnds/source/common/interrupts.c, rtc/rtc.c, sound/sound.c,
+ sound/sound.h, start/start.S, startup/linkcmds, startup/start.c,
+ timer/timer.c, tools/Makefile.am, tools/bin2s, tools/bin2s.c,
+ tools/configure.ac, tools/runtest,
+ tools/ndstool/include/arm7_sha1_homebrew.h,
+ tools/ndstool/include/arm7_sha1_nintendo.h,
+ tools/ndstool/include/banner.h, tools/ndstool/include/bigint.h,
+ tools/ndstool/include/crc.h, tools/ndstool/include/default_icon.h,
+ tools/ndstool/include/encryption.h, tools/ndstool/include/header.h,
+ tools/ndstool/include/hook.h, tools/ndstool/include/little.h,
+ tools/ndstool/include/loadme.h, tools/ndstool/include/logo.h,
+ tools/ndstool/include/ndscreate.h,
+ tools/ndstool/include/ndsextract.h, tools/ndstool/include/ndstool.h,
+ tools/ndstool/include/ndstree.h, tools/ndstool/include/overlay.h,
+ tools/ndstool/include/passme.h, tools/ndstool/include/passme_sram.h,
+ tools/ndstool/include/passme_vhd1.h,
+ tools/ndstool/include/passme_vhd2.h, tools/ndstool/include/raster.h,
+ tools/ndstool/include/sha1.h, tools/ndstool/include/types.h,
+ tools/ndstool/source/arm7_sha1_homebrew.c,
+ tools/ndstool/source/arm7_sha1_nintendo.c,
+ tools/ndstool/source/banner.cpp, tools/ndstool/source/bigint.cpp,
+ tools/ndstool/source/compile_date.c, tools/ndstool/source/crc.cpp,
+ tools/ndstool/source/default_icon.c,
+ tools/ndstool/source/encryption.cpp, tools/ndstool/source/header.cpp,
+ tools/ndstool/source/hook.cpp, tools/ndstool/source/loadme.c,
+ tools/ndstool/source/logo.cpp, tools/ndstool/source/ndscodes.cpp,
+ tools/ndstool/source/ndscreate.cpp,
+ tools/ndstool/source/ndsextract.cpp,
+ tools/ndstool/source/ndstool.cpp, tools/ndstool/source/ndstree.cpp,
+ tools/ndstool/source/passme.cpp, tools/ndstool/source/passme_sram.c,
+ tools/ndstool/source/raster.cpp, tools/ndstool/source/sha1.cpp,
+ touchscreen/README.reco, touchscreen/parser.c, touchscreen/reco.c,
+ touchscreen/reco.h, touchscreen/touchscreen.c,
+ touchscreen/touchscreen.h, wifi/compat.c, wifi/compat.h, wifi/wifi.c:
+ New files.
+
Revision 1.6 2006/06/26 02:04:27 wntrmute
correct header guard
@@ -57,9 +195,9 @@ extern signed long exceptionRegisters[];
void enterException(void);
void setExceptionHandler(VoidFunctionPointer handler);
-void defaultExceptionHandler();
+void defaultExceptionHandler(void);
-u32 getCPSR();
+u32 getCPSR(void);
//---------------------------------------------------------------------------------
#endif // _exceptions_h_
diff --git a/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/input.h b/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/input.h
index 1d5751744a..450ec80bd8 100644
--- a/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/input.h
+++ b/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/input.h
@@ -27,6 +27,144 @@
distribution.
$Log$
+ Revision 1.1 2008/04/16 18:37:32 joel
+ 2008-04-16 Matthieu Bucchianeri <mbucchia@gmail.com>
+
+ * ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
+ mk_libnds.sh, patch.libnds, preinstall.am, block/block.c,
+ clock/clock.c, console/console.c, coproc/coproc.S, coproc/coproc.c,
+ coproc/coproc.ld, dswifi/dswifi_license.txt, dswifi/makefile,
+ dswifi/arm7/makefile, dswifi/arm7/source/wifi_arm7.c,
+ dswifi/arm7/source/wifi_arm7.h, dswifi/arm9/makefile,
+ dswifi/arm9/source/sgIP.c, dswifi/arm9/source/sgIP.h,
+ dswifi/arm9/source/sgIP_ARP.c, dswifi/arm9/source/sgIP_ARP.h,
+ dswifi/arm9/source/sgIP_Config.h, dswifi/arm9/source/sgIP_DHCP.c,
+ dswifi/arm9/source/sgIP_DHCP.h, dswifi/arm9/source/sgIP_DNS.c,
+ dswifi/arm9/source/sgIP_DNS.h, dswifi/arm9/source/sgIP_Hub.c,
+ dswifi/arm9/source/sgIP_Hub.h, dswifi/arm9/source/sgIP_ICMP.c,
+ dswifi/arm9/source/sgIP_ICMP.h, dswifi/arm9/source/sgIP_IP.c,
+ dswifi/arm9/source/sgIP_IP.h, dswifi/arm9/source/sgIP_TCP.c,
+ dswifi/arm9/source/sgIP_TCP.h, dswifi/arm9/source/sgIP_UDP.c,
+ dswifi/arm9/source/sgIP_UDP.h, dswifi/arm9/source/sgIP_memblock.c,
+ dswifi/arm9/source/sgIP_memblock.h,
+ dswifi/arm9/source/sgIP_sockets.c, dswifi/arm9/source/sgIP_sockets.h,
+ dswifi/arm9/source/wifi_arm9.c, dswifi/arm9/source/wifi_arm9.h,
+ dswifi/common/source/dsregs.h, dswifi/common/source/spinlock.h,
+ dswifi/common/source/spinlock.s, dswifi/common/source/wifi_shared.h,
+ dswifi/include/dswifi7.h, dswifi/include/dswifi9.h,
+ dswifi/include/dswifi_version.h, dswifi/include/netdb.h,
+ dswifi/include/sgIP_errno.h, dswifi/include/netinet/in.h, fb/fb.c,
+ fb/fb.h, include/bsp.h, include/my_ipc.h, include/tm27.h,
+ include/types.h, include/sys/iosupport.h, irq/irq.c, irq/irq.h,
+ libfat/gba/include/fat.h, libfat/include/fat.h,
+ libfat/nds/include/fat.h, libfat/source/bit_ops.h,
+ libfat/source/cache.c, libfat/source/cache.h, libfat/source/common.h,
+ libfat/source/directory.c, libfat/source/directory.h,
+ libfat/source/fatdir.c, libfat/source/fatdir.h,
+ libfat/source/fatfile.c, libfat/source/fatfile.h,
+ libfat/source/file_allocation_table.c,
+ libfat/source/file_allocation_table.h, libfat/source/filetime.c,
+ libfat/source/filetime.h, libfat/source/libfat.c,
+ libfat/source/mem_allocate.h, libfat/source/partition.c,
+ libfat/source/partition.h, libfat/source/disc_io/disc.c,
+ libfat/source/disc_io/disc.h, libfat/source/disc_io/disc_io.h,
+ libfat/source/disc_io/io_cf_common.c,
+ libfat/source/disc_io/io_cf_common.h,
+ libfat/source/disc_io/io_dldi.h, libfat/source/disc_io/io_dldi.s,
+ libfat/source/disc_io/io_efa2.c, libfat/source/disc_io/io_efa2.h,
+ libfat/source/disc_io/io_fcsr.c, libfat/source/disc_io/io_fcsr.h,
+ libfat/source/disc_io/io_m3_common.c,
+ libfat/source/disc_io/io_m3_common.h,
+ libfat/source/disc_io/io_m3cf.c, libfat/source/disc_io/io_m3cf.h,
+ libfat/source/disc_io/io_m3sd.c, libfat/source/disc_io/io_m3sd.h,
+ libfat/source/disc_io/io_mpcf.c, libfat/source/disc_io/io_mpcf.h,
+ libfat/source/disc_io/io_njsd.c, libfat/source/disc_io/io_njsd.h,
+ libfat/source/disc_io/io_nmmc.c, libfat/source/disc_io/io_nmmc.h,
+ libfat/source/disc_io/io_sc_common.c,
+ libfat/source/disc_io/io_sc_common.h,
+ libfat/source/disc_io/io_sccf.c, libfat/source/disc_io/io_sccf.h,
+ libfat/source/disc_io/io_scsd.c, libfat/source/disc_io/io_scsd.h,
+ libfat/source/disc_io/io_scsd_s.s,
+ libfat/source/disc_io/io_sd_common.c,
+ libfat/source/disc_io/io_sd_common.h, libnds/Makefile.arm7,
+ libnds/Makefile.arm9, libnds/libnds_license.txt,
+ libnds/basicARM7/source/defaultARM7.c,
+ libnds/include/default_font_bin.h, libnds/include/gbfs.h,
+ libnds/include/nds.h, libnds/include/nds/bios.h,
+ libnds/include/nds/card.h, libnds/include/nds/dma.h,
+ libnds/include/nds/interrupts.h, libnds/include/nds/ipc.h,
+ libnds/include/nds/jtypes.h, libnds/include/nds/memory.h,
+ libnds/include/nds/registers_alt.h, libnds/include/nds/reload.h,
+ libnds/include/nds/system.h, libnds/include/nds/timers.h,
+ libnds/include/nds/arm7/audio.h, libnds/include/nds/arm7/clock.h,
+ libnds/include/nds/arm7/serial.h, libnds/include/nds/arm7/touch.h,
+ libnds/include/nds/arm9/background.h,
+ libnds/include/nds/arm9/boxtest.h, libnds/include/nds/arm9/cache.h,
+ libnds/include/nds/arm9/console.h,
+ libnds/include/nds/arm9/exceptions.h,
+ libnds/include/nds/arm9/image.h, libnds/include/nds/arm9/input.h,
+ libnds/include/nds/arm9/math.h, libnds/include/nds/arm9/ndsmotion.h,
+ libnds/include/nds/arm9/pcx.h, libnds/include/nds/arm9/postest.h,
+ libnds/include/nds/arm9/rumble.h, libnds/include/nds/arm9/sound.h,
+ libnds/include/nds/arm9/sprite.h, libnds/include/nds/arm9/trig_lut.h,
+ libnds/include/nds/arm9/video.h, libnds/include/nds/arm9/videoGL.h,
+ libnds/source/arm7/audio.c, libnds/source/arm7/clock.c,
+ libnds/source/arm7/microphone.c, libnds/source/arm7/spi.c,
+ libnds/source/arm7/touch.c, libnds/source/arm7/userSettings.c,
+ libnds/source/arm9/COS.bin, libnds/source/arm9/COS.s,
+ libnds/source/arm9/SIN.bin, libnds/source/arm9/SIN.s,
+ libnds/source/arm9/TAN.bin, libnds/source/arm9/TAN.s,
+ libnds/source/arm9/boxtest.c, libnds/source/arm9/console.c,
+ libnds/source/arm9/dcache.s, libnds/source/arm9/default_font.bin,
+ libnds/source/arm9/default_font.s,
+ libnds/source/arm9/exceptionHandler.S,
+ libnds/source/arm9/exceptionHandler.s,
+ libnds/source/arm9/exceptions.c, libnds/source/arm9/gurumeditation.c,
+ libnds/source/arm9/icache.s, libnds/source/arm9/image.c,
+ libnds/source/arm9/initSystem.c, libnds/source/arm9/keys.c,
+ libnds/source/arm9/ndsmotion.c, libnds/source/arm9/pcx.c,
+ libnds/source/arm9/rumble.c, libnds/source/arm9/sound.c,
+ libnds/source/arm9/system.c, libnds/source/arm9/touch.c,
+ libnds/source/arm9/video.c, libnds/source/arm9/videoGL.c,
+ libnds/source/common/biosCalls.s, libnds/source/common/card.c,
+ libnds/source/common/gbfs.c,
+ libnds/source/common/interruptDispatcher.s,
+ libnds/source/common/interrupts.c, rtc/rtc.c, sound/sound.c,
+ sound/sound.h, start/start.S, startup/linkcmds, startup/start.c,
+ timer/timer.c, tools/Makefile.am, tools/bin2s, tools/bin2s.c,
+ tools/configure.ac, tools/runtest,
+ tools/ndstool/include/arm7_sha1_homebrew.h,
+ tools/ndstool/include/arm7_sha1_nintendo.h,
+ tools/ndstool/include/banner.h, tools/ndstool/include/bigint.h,
+ tools/ndstool/include/crc.h, tools/ndstool/include/default_icon.h,
+ tools/ndstool/include/encryption.h, tools/ndstool/include/header.h,
+ tools/ndstool/include/hook.h, tools/ndstool/include/little.h,
+ tools/ndstool/include/loadme.h, tools/ndstool/include/logo.h,
+ tools/ndstool/include/ndscreate.h,
+ tools/ndstool/include/ndsextract.h, tools/ndstool/include/ndstool.h,
+ tools/ndstool/include/ndstree.h, tools/ndstool/include/overlay.h,
+ tools/ndstool/include/passme.h, tools/ndstool/include/passme_sram.h,
+ tools/ndstool/include/passme_vhd1.h,
+ tools/ndstool/include/passme_vhd2.h, tools/ndstool/include/raster.h,
+ tools/ndstool/include/sha1.h, tools/ndstool/include/types.h,
+ tools/ndstool/source/arm7_sha1_homebrew.c,
+ tools/ndstool/source/arm7_sha1_nintendo.c,
+ tools/ndstool/source/banner.cpp, tools/ndstool/source/bigint.cpp,
+ tools/ndstool/source/compile_date.c, tools/ndstool/source/crc.cpp,
+ tools/ndstool/source/default_icon.c,
+ tools/ndstool/source/encryption.cpp, tools/ndstool/source/header.cpp,
+ tools/ndstool/source/hook.cpp, tools/ndstool/source/loadme.c,
+ tools/ndstool/source/logo.cpp, tools/ndstool/source/ndscodes.cpp,
+ tools/ndstool/source/ndscreate.cpp,
+ tools/ndstool/source/ndsextract.cpp,
+ tools/ndstool/source/ndstool.cpp, tools/ndstool/source/ndstree.cpp,
+ tools/ndstool/source/passme.cpp, tools/ndstool/source/passme_sram.c,
+ tools/ndstool/source/raster.cpp, tools/ndstool/source/sha1.cpp,
+ touchscreen/README.reco, touchscreen/parser.c, touchscreen/reco.c,
+ touchscreen/reco.h, touchscreen/touchscreen.c,
+ touchscreen/touchscreen.h, wifi/compat.c, wifi/compat.h, wifi/wifi.c:
+ New files.
+
Revision 1.14 2006/02/25 02:18:53 wntrmute
doxygenation updates
@@ -125,7 +263,7 @@ extern "C" {
//! Obtains the current keypad state.
/*! Call this function once per main loop in order to use the keypad functions.
*/
-void scanKeys();
+void scanKeys(void);
//! Obtains the current keypad held state.
uint32 keysHeld(void);
@@ -146,7 +284,7 @@ void keysSetRepeat( u8 setDelay, u8 setRepeat );
uint32 keysUp(void);
//! Obtains the current touchscreen co-ordinates.
-touchPosition touchReadXY();
+touchPosition touchReadXY(void);
#ifdef __cplusplus
}
diff --git a/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/ndsmotion.h b/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/ndsmotion.h
index e1ab018b5a..6335cadf35 100644
--- a/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/ndsmotion.h
+++ b/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/ndsmotion.h
@@ -47,52 +47,52 @@ typedef struct
extern "C" {
#endif
-/*! \fn int motion_init()
+/*! \fn int motion_init(void)
\brief Initializes the DS Motion Sensor.
Run this before using any of the DS Motion Sensor functions
save the return value and pass it to the other motion_ functions
*/
-int motion_init();
+int motion_init(void);
-/*! \fn int motion_deinit()
+/*! \fn int motion_deinit(void)
\brief Deinitializes the DS Motion Sensor
*/
-void motion_deinit();
+void motion_deinit(void);
-/*! \fn signed int motion_read_x()
+/*! \fn signed int motion_read_x(void)
\brief read the X acceleration
*/
-signed int motion_read_x();
+signed int motion_read_x(void);
-/*! \fn signed int motion_read_y()
+/*! \fn signed int motion_read_y(void)
\brief read the Y acceleration
*/
-signed int motion_read_y();
+signed int motion_read_y(void);
-/*! \fn signed int motion_read_z()
+/*! \fn signed int motion_read_z(void)
\brief read the Z acceleration
*/
-signed int motion_read_z();
+signed int motion_read_z(void);
-/*! \fn signed int motion_read_gyro()
+/*! \fn signed int motion_read_gyro(void)
\brief read the Z rotational speed
*/
-signed int motion_read_gyro();
+signed int motion_read_gyro(void);
-/*! \fn int motion_acceleration_x()
+/*! \fn int motion_acceleration_x(void)
\brief gets acceleration value to mili G (where g is 9.8 m/s*s)
*/
-int motion_acceleration_x();
+int motion_acceleration_x(void);
-/*! \fn int motion_acceleration_y()
+/*! \fn int motion_acceleration_y(void)
\brief gets acceleration value to mili G (where g is 9.8 m/s*s)
*/
-int motion_acceleration_y();
+int motion_acceleration_y(void);
-/*! \fn int motion_acceleration_z()
+/*! \fn int motion_acceleration_z(void)
\brief gets acceleration value to mili G (where g is 9.8 m/s*s)
*/
-int motion_acceleration_z();
+int motion_acceleration_z(void);
/*! \fn void motion_set_sens_x(int sens)
\brief this should be passed the raw reading at 1g for accurate
@@ -118,39 +118,39 @@ acceleration calculations. Default is 825
*/
void motion_set_sens_gyro(int sens);
-/*! \fn void motion_set_offs_x()
+/*! \fn void motion_set_offs_x(void)
\brief this should be called when the axis is under no acceleration
default is 2048
*/
-void motion_set_offs_x();
+void motion_set_offs_x(void);
-/*! \fn void motion_set_offs_y()
+/*! \fn void motion_set_offs_y(void)
\brief this should be called when the axis is under no acceleration
default is 2048
*/
-void motion_set_offs_y();
+void motion_set_offs_y(void);
-/*! \fn void motion_set_offs_z()
+/*! \fn void motion_set_offs_z(void)
\brief this should be called when the axis is under no acceleration
default is 2048
*/
-void motion_set_offs_z();
+void motion_set_offs_z(void);
-/*! \fn void motion_set_offs_gyro()
+/*! \fn void motion_set_offs_gyro(void)
\brief this should be called when the axis is under no rotation
default is 1680
*/
-void motion_set_offs_gyro();
+void motion_set_offs_gyro(void);
-/*! \fn int motion_rotation()
+/*! \fn int motion_rotation(void)
\brief converts raw rotation value to degrees per second
*/
-int motion_rotation();
+int motion_rotation(void);
-/*! \fn MotionCalibration* motion_get_calibration()
+/*! \fn MotionCalibration* motion_get_calibration(void)void
\brief This returns the current calibration settings for saving
*/
-MotionCalibration* motion_get_calibration();
+MotionCalibration* motion_get_calibration(void);
/*! \fn void motion_set_calibration(MotionCalibration* cal)
\brief This sets the calibration settings. Intended
@@ -158,29 +158,29 @@ to restore saved calibration settings
*/
void motion_set_calibration(MotionCalibration* cal);
-/*! \fn MotionCalibration* motion_enable_ain_1()
+/*! \fn MotionCalibration* motion_enable_ain_1(void)
\brief This enables the analog input number 1.
Required before reading analog input number 1.
*/
-void motion_enable_ain_1();
+void motion_enable_ain_1(void);
-/*! \fn MotionCalibration* motion_enable_ain_2()
+/*! \fn MotionCalibration* motion_enable_ain_2(void)
\brief This enables the analog input number 2.
Required before reading analog input number 2.
*/
-void motion_enable_ain_2();
+void motion_enable_ain_2(void);
-/*! \fn MotionCalibration* motion_read_ain_1()
+/*! \fn MotionCalibration* motion_read_ain_1(void)
\brief This reads the analog input number 1.
analog input number 1 needs to be enabled before reading.
*/
-int motion_read_ain_1();
+int motion_read_ain_1(void);
-/*! \fn MotionCalibration* motion_read_ain_2()
+/*! \fn MotionCalibration* motion_read_ain_2(void)
\brief This reads the analog input number 2.
analog input number 2 needs to be enabled before reading.
*/
-int motion_read_ain_2();
+int motion_read_ain_2(void);
#ifdef __cplusplus
}
diff --git a/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/videoGL.h b/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/videoGL.h
index 84f16c30b6..2e75729759 100644
--- a/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/videoGL.h
+++ b/c/src/lib/libbsp/arm/nds/libnds/include/nds/arm9/videoGL.h
@@ -378,7 +378,7 @@ void glTexParameter( uint8 sizeX, uint8 sizeY,
uint32 param) ;
/*! \brief Returns the active texture parameter (constructed from internal call to glTexParameter) */
-u32 glGetTexParameter();
+u32 glGetTexParameter(void);
/*! \brief returns the address alocated to the texure named by name
\param name the name of the texture to get a pointer to */
@@ -415,7 +415,7 @@ void glMaterialf(GL_MATERIALS_ENUM mode, rgb color);
void glInit_C(void);
// This returns a pointer to the globals for videoGL
-gl_hidden_globals* glGetGlobals();
+gl_hidden_globals* glGetGlobals(void);
#ifdef __cplusplus
@@ -1085,7 +1085,7 @@ GL_STATIC_INL void glAlphaFunc(int alphaThreshold) { GFX_ALPHA_TEST = alphaThres
GL_STATIC_INL void glCutoffDepth(fixed12d3 wVal) { GFX_CUTOFF_DEPTH = wVal; }
/*! \brief Initializes the gl state machine (must be called once before using gl calls) */
-GL_STATIC_INL void glInit() {
+GL_STATIC_INL void glInit(void) {
glGlob = glGetGlobals(); // make sure globals are synced between compilation units
glInit_C(); // actually does the initialization
}
diff --git a/c/src/lib/libbsp/arm/nds/libnds/source/arm9/console.c b/c/src/lib/libbsp/arm/nds/libnds/source/arm9/console.c
index 47ff72df27..f9ae38de45 100644
--- a/c/src/lib/libbsp/arm/nds/libnds/source/arm9/console.c
+++ b/c/src/lib/libbsp/arm/nds/libnds/source/arm9/console.c
@@ -278,7 +278,6 @@ int con_write(struct _reent *r,int fd,const char *ptr,int len) {
const devoptab_t dotab_stdout = {
"con",
- 0,
NULL,
NULL,
con_write,
@@ -401,7 +400,7 @@ void consoleInitDefault(u16* map, u16* charBase, u8 bitDepth) {
//}
//---------------------------------------------------------------------------------
-static void newRow() {
+static void newRow(void) {
//---------------------------------------------------------------------------------
int i;
row++;
diff --git a/c/src/lib/libbsp/arm/nds/libnds/source/arm9/gurumeditation.c b/c/src/lib/libbsp/arm/nds/libnds/source/arm9/gurumeditation.c
index 8209be6fa1..5f0bc15786 100644
--- a/c/src/lib/libbsp/arm/nds/libnds/source/arm9/gurumeditation.c
+++ b/c/src/lib/libbsp/arm/nds/libnds/source/arm9/gurumeditation.c
@@ -32,6 +32,7 @@
#include <nds/arm9/background.h>
#include <stdio.h>
+#include <inttypes.h>
//---------------------------------------------------------------------------------
unsigned long ARMShift(unsigned long value,unsigned char shift) {
@@ -206,7 +207,7 @@ static const char *registerNames[] =
extern const char __itcm_start[];
//---------------------------------------------------------------------------------
-static void defaultHandler() {
+static void defaultHandler(void) {
//---------------------------------------------------------------------------------
videoSetMode(0);
videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE);
@@ -246,18 +247,18 @@ static void defaultHandler() {
exceptionAddress = codeAddress;
}
- iprintf(" pc: %08X addr: %08X\n\n",codeAddress,exceptionAddress);
+ iprintf(" pc: %08" PRIX32 " addr: %08" PRIX32 "\n\n",codeAddress,exceptionAddress);
int i;
for ( i=0; i < 8; i++ ) {
- iprintf( " %s: %08X %s: %08X\n",
+ iprintf( " %s: %08" PRIX32 " %s: %08" PRIX32 "\n",
registerNames[i], exceptionRegisters[i],
registerNames[i+8],exceptionRegisters[i+8]);
}
iprintf("\n");
u32 *stack = (u32 *)exceptionRegisters[13];
for ( i=0; i<10; i++ ) {
- iprintf( "\x1b[%d;2H%08X: %08X %08X", i + 14, (u32)&stack[i*2],stack[i*2], stack[(i*2)+1] );
+ iprintf( "\x1b[%d;2H%08" PRIX32 ": %08" PRIX32 " %08" PRIX32 "", i + 14, (u32)&stack[i*2],stack[i*2], stack[(i*2)+1] );
}
while(1);
diff --git a/c/src/lib/libbsp/arm/nds/libnds/source/arm9/ndsmotion.c b/c/src/lib/libbsp/arm/nds/libnds/source/arm9/ndsmotion.c
index 830329fe11..bd41e7cf5f 100644
--- a/c/src/lib/libbsp/arm/nds/libnds/source/arm9/ndsmotion.c
+++ b/c/src/lib/libbsp/arm/nds/libnds/source/arm9/ndsmotion.c
@@ -64,7 +64,7 @@ unsigned char motion_spi(unsigned char in_byte){
}
-void motion_MK6_sensor_mode() {
+void motion_MK6_sensor_mode(void) {
// send some commands on the SPI bus
SPI_On()
motion_spi(0xFE);
@@ -80,7 +80,7 @@ void motion_MK6_sensor_mode() {
SPI_Off()
}
-void motion_MK6_EEPROM_mode() {
+void motion_MK6_EEPROM_mode(void) {
// send some commands on the SPI bus
SPI_On()
motion_spi(0xFE);
@@ -97,7 +97,7 @@ void motion_MK6_EEPROM_mode() {
}
// checks whether a DS Motion Pak is plugged in
-int motion_pak_is_inserted(){
+int motion_pak_is_inserted(void){
int motion_pak = 0;
unsigned char return_byte = V_SRAM[10]; // read first byte of DS Motion Pak check
swiDelay(WAIT_CYCLES);
@@ -116,7 +116,7 @@ int motion_pak_is_inserted(){
// checks whether a DS Motion Card is plugged in
// this only works after motion_init()
// it will return false if it is run before motion_init()
-int motion_card_is_inserted(){
+int motion_card_is_inserted(void){
// send 0x03 to read from DS Motion Card control register
SPI_On()
motion_spi(0x03); // command to read from control register
@@ -167,7 +167,7 @@ int motion_enable(int card_type) {
// Determines which DS Motion Sensor is present
// Turns it on
// Does not require knowing which type is present
-int motion_init() {
+int motion_init(void) {
sysSetBusOwners(true, true);
// first, check for the DS Motion Pak - type 1
if( motion_pak_is_inserted() == 1 )
@@ -195,7 +195,7 @@ int motion_init() {
// In the case of a DS Motion Pak, do nothing - there is nothing to de-init
// In the case of a DS Motion Card, turns off the accelerometer
// In the case of an MK6, turns off accelerometer and switches out of sensor mode into EEPROM mode
-void motion_deinit() {
+void motion_deinit(void) {
// DS Motion Card - turn off accelerometer
SPI_On()
motion_spi(0x04); // command to write to control register
@@ -245,7 +245,7 @@ signed int motion_read_x(void) {
}
// read the Y acceleration
-signed int motion_read_y() {
+signed int motion_read_y(void) {
unsigned char High_byte = 0;
unsigned char Low_byte = 0;
signed int output = 0;
@@ -432,7 +432,7 @@ void motion_set_offs_gyro(void){
calibration.goff = motion_read_gyro();
}
-MotionCalibration* motion_get_calibration(){
+MotionCalibration* motion_get_calibration(void){
return &calibration;
}
@@ -448,21 +448,21 @@ void motion_set_calibration(MotionCalibration* cal){
}
// enable analog input number 1 (ain_1)
-void motion_enable_ain_1(){
+void motion_enable_ain_1(void){
unsigned char return_byte;
return_byte = V_SRAM[16];
swiDelay(WAIT_CYCLES);
}
// enable analog input number 2 (ain_2)
-void motion_enable_ain_2(){
+void motion_enable_ain_2(void){
unsigned char return_byte;
return_byte = V_SRAM[18];
swiDelay(WAIT_CYCLES);
}
// read from the analog input number 1 - requires enabling ain_1 first
-int motion_read_ain_1(){
+int motion_read_ain_1(void){
unsigned char High_byte = V_SRAM[12]; // Command to load AIN_1 High onto bus
swiDelay(WAIT_CYCLES); // wait for data ready
High_byte = V_SRAM[0]; // get the high byte
@@ -474,7 +474,7 @@ int motion_read_ain_1(){
}
// read from the analog input number 2 - requires enabling ain_2 first
-int motion_read_ain_2(){
+int motion_read_ain_2(void){
unsigned char High_byte = V_SRAM[14]; // Command to load AIN_1 High onto bus
swiDelay(WAIT_CYCLES); // wait for data ready
High_byte = V_SRAM[0]; // get the high byte
diff --git a/c/src/lib/libbsp/arm/nds/libnds/source/common/card.c b/c/src/lib/libbsp/arm/nds/libnds/source/common/card.c
index 6990380471..a0932a3a4e 100644
--- a/c/src/lib/libbsp/arm/nds/libnds/source/common/card.c
+++ b/c/src/lib/libbsp/arm/nds/libnds/source/common/card.c
@@ -118,7 +118,7 @@ int cardReadID(uint32 flags) {
//---------------------------------------------------------------------------------
-static inline void EepromWaitBusy() {
+static inline void EepromWaitBusy(void) {
//---------------------------------------------------------------------------------
while (CARD_CR1 & /*BUSY*/0x80);
}
diff --git a/c/src/lib/libbsp/arm/nds/libnds/source/common/interrupts.c b/c/src/lib/libbsp/arm/nds/libnds/source/common/interrupts.c
index 6d49e6f89f..2c30b91bac 100644
--- a/c/src/lib/libbsp/arm/nds/libnds/source/common/interrupts.c
+++ b/c/src/lib/libbsp/arm/nds/libnds/source/common/interrupts.c
@@ -22,6 +22,144 @@
distribution.
$Log$
+ Revision 1.1 2008/04/16 18:37:33 joel
+ 2008-04-16 Matthieu Bucchianeri <mbucchia@gmail.com>
+
+ * ChangeLog, Makefile.am, README, bsp_specs, configure.ac,
+ mk_libnds.sh, patch.libnds, preinstall.am, block/block.c,
+ clock/clock.c, console/console.c, coproc/coproc.S, coproc/coproc.c,
+ coproc/coproc.ld, dswifi/dswifi_license.txt, dswifi/makefile,
+ dswifi/arm7/makefile, dswifi/arm7/source/wifi_arm7.c,
+ dswifi/arm7/source/wifi_arm7.h, dswifi/arm9/makefile,
+ dswifi/arm9/source/sgIP.c, dswifi/arm9/source/sgIP.h,
+ dswifi/arm9/source/sgIP_ARP.c, dswifi/arm9/source/sgIP_ARP.h,
+ dswifi/arm9/source/sgIP_Config.h, dswifi/arm9/source/sgIP_DHCP.c,
+ dswifi/arm9/source/sgIP_DHCP.h, dswifi/arm9/source/sgIP_DNS.c,
+ dswifi/arm9/source/sgIP_DNS.h, dswifi/arm9/source/sgIP_Hub.c,
+ dswifi/arm9/source/sgIP_Hub.h, dswifi/arm9/source/sgIP_ICMP.c,
+ dswifi/arm9/source/sgIP_ICMP.h, dswifi/arm9/source/sgIP_IP.c,
+ dswifi/arm9/source/sgIP_IP.h, dswifi/arm9/source/sgIP_TCP.c,
+ dswifi/arm9/source/sgIP_TCP.h, dswifi/arm9/source/sgIP_UDP.c,
+ dswifi/arm9/source/sgIP_UDP.h, dswifi/arm9/source/sgIP_memblock.c,
+ dswifi/arm9/source/sgIP_memblock.h,
+ dswifi/arm9/source/sgIP_sockets.c, dswifi/arm9/source/sgIP_sockets.h,
+ dswifi/arm9/source/wifi_arm9.c, dswifi/arm9/source/wifi_arm9.h,
+ dswifi/common/source/dsregs.h, dswifi/common/source/spinlock.h,
+ dswifi/common/source/spinlock.s, dswifi/common/source/wifi_shared.h,
+ dswifi/include/dswifi7.h, dswifi/include/dswifi9.h,
+ dswifi/include/dswifi_version.h, dswifi/include/netdb.h,
+ dswifi/include/sgIP_errno.h, dswifi/include/netinet/in.h, fb/fb.c,
+ fb/fb.h, include/bsp.h, include/my_ipc.h, include/tm27.h,
+ include/types.h, include/sys/iosupport.h, irq/irq.c, irq/irq.h,
+ libfat/gba/include/fat.h, libfat/include/fat.h,
+ libfat/nds/include/fat.h, libfat/source/bit_ops.h,
+ libfat/source/cache.c, libfat/source/cache.h, libfat/source/common.h,
+ libfat/source/directory.c, libfat/source/directory.h,
+ libfat/source/fatdir.c, libfat/source/fatdir.h,
+ libfat/source/fatfile.c, libfat/source/fatfile.h,
+ libfat/source/file_allocation_table.c,
+ libfat/source/file_allocation_table.h, libfat/source/filetime.c,
+ libfat/source/filetime.h, libfat/source/libfat.c,
+ libfat/source/mem_allocate.h, libfat/source/partition.c,
+ libfat/source/partition.h, libfat/source/disc_io/disc.c,
+ libfat/source/disc_io/disc.h, libfat/source/disc_io/disc_io.h,
+ libfat/source/disc_io/io_cf_common.c,
+ libfat/source/disc_io/io_cf_common.h,
+ libfat/source/disc_io/io_dldi.h, libfat/source/disc_io/io_dldi.s,
+ libfat/source/disc_io/io_efa2.c, libfat/source/disc_io/io_efa2.h,
+ libfat/source/disc_io/io_fcsr.c, libfat/source/disc_io/io_fcsr.h,
+ libfat/source/disc_io/io_m3_common.c,
+ libfat/source/disc_io/io_m3_common.h,
+ libfat/source/disc_io/io_m3cf.c, libfat/source/disc_io/io_m3cf.h,
+ libfat/source/disc_io/io_m3sd.c, libfat/source/disc_io/io_m3sd.h,
+ libfat/source/disc_io/io_mpcf.c, libfat/source/disc_io/io_mpcf.h,
+ libfat/source/disc_io/io_njsd.c, libfat/source/disc_io/io_njsd.h,
+ libfat/source/disc_io/io_nmmc.c, libfat/source/disc_io/io_nmmc.h,
+ libfat/source/disc_io/io_sc_common.c,
+ libfat/source/disc_io/io_sc_common.h,
+ libfat/source/disc_io/io_sccf.c, libfat/source/disc_io/io_sccf.h,
+ libfat/source/disc_io/io_scsd.c, libfat/source/disc_io/io_scsd.h,
+ libfat/source/disc_io/io_scsd_s.s,
+ libfat/source/disc_io/io_sd_common.c,
+ libfat/source/disc_io/io_sd_common.h, libnds/Makefile.arm7,
+ libnds/Makefile.arm9, libnds/libnds_license.txt,
+ libnds/basicARM7/source/defaultARM7.c,
+ libnds/include/default_font_bin.h, libnds/include/gbfs.h,
+ libnds/include/nds.h, libnds/include/nds/bios.h,
+ libnds/include/nds/card.h, libnds/include/nds/dma.h,
+ libnds/include/nds/interrupts.h, libnds/include/nds/ipc.h,
+ libnds/include/nds/jtypes.h, libnds/include/nds/memory.h,
+ libnds/include/nds/registers_alt.h, libnds/include/nds/reload.h,
+ libnds/include/nds/system.h, libnds/include/nds/timers.h,
+ libnds/include/nds/arm7/audio.h, libnds/include/nds/arm7/clock.h,
+ libnds/include/nds/arm7/serial.h, libnds/include/nds/arm7/touch.h,
+ libnds/include/nds/arm9/background.h,
+ libnds/include/nds/arm9/boxtest.h, libnds/include/nds/arm9/cache.h,
+ libnds/include/nds/arm9/console.h,
+ libnds/include/nds/arm9/exceptions.h,
+ libnds/include/nds/arm9/image.h, libnds/include/nds/arm9/input.h,
+ libnds/include/nds/arm9/math.h, libnds/include/nds/arm9/ndsmotion.h,
+ libnds/include/nds/arm9/pcx.h, libnds/include/nds/arm9/postest.h,
+ libnds/include/nds/arm9/rumble.h, libnds/include/nds/arm9/sound.h,
+ libnds/include/nds/arm9/sprite.h, libnds/include/nds/arm9/trig_lut.h,
+ libnds/include/nds/arm9/video.h, libnds/include/nds/arm9/videoGL.h,
+ libnds/source/arm7/audio.c, libnds/source/arm7/clock.c,
+ libnds/source/arm7/microphone.c, libnds/source/arm7/spi.c,
+ libnds/source/arm7/touch.c, libnds/source/arm7/userSettings.c,
+ libnds/source/arm9/COS.bin, libnds/source/arm9/COS.s,
+ libnds/source/arm9/SIN.bin, libnds/source/arm9/SIN.s,
+ libnds/source/arm9/TAN.bin, libnds/source/arm9/TAN.s,
+ libnds/source/arm9/boxtest.c, libnds/source/arm9/console.c,
+ libnds/source/arm9/dcache.s, libnds/source/arm9/default_font.bin,
+ libnds/source/arm9/default_font.s,
+ libnds/source/arm9/exceptionHandler.S,
+ libnds/source/arm9/exceptionHandler.s,
+ libnds/source/arm9/exceptions.c, libnds/source/arm9/gurumeditation.c,
+ libnds/source/arm9/icache.s, libnds/source/arm9/image.c,
+ libnds/source/arm9/initSystem.c, libnds/source/arm9/keys.c,
+ libnds/source/arm9/ndsmotion.c, libnds/source/arm9/pcx.c,
+ libnds/source/arm9/rumble.c, libnds/source/arm9/sound.c,
+ libnds/source/arm9/system.c, libnds/source/arm9/touch.c,
+ libnds/source/arm9/video.c, libnds/source/arm9/videoGL.c,
+ libnds/source/common/biosCalls.s, libnds/source/common/card.c,
+ libnds/source/common/gbfs.c,
+ libnds/source/common/interruptDispatcher.s,
+ libnds/source/common/interrupts.c, rtc/rtc.c, sound/sound.c,
+ sound/sound.h, start/start.S, startup/linkcmds, startup/start.c,
+ timer/timer.c, tools/Makefile.am, tools/bin2s, tools/bin2s.c,
+ tools/configure.ac, tools/runtest,
+ tools/ndstool/include/arm7_sha1_homebrew.h,
+ tools/ndstool/include/arm7_sha1_nintendo.h,
+ tools/ndstool/include/banner.h, tools/ndstool/include/bigint.h,
+ tools/ndstool/include/crc.h, tools/ndstool/include/default_icon.h,
+ tools/ndstool/include/encryption.h, tools/ndstool/include/header.h,
+ tools/ndstool/include/hook.h, tools/ndstool/include/little.h,
+ tools/ndstool/include/loadme.h, tools/ndstool/include/logo.h,
+ tools/ndstool/include/ndscreate.h,
+ tools/ndstool/include/ndsextract.h, tools/ndstool/include/ndstool.h,
+ tools/ndstool/include/ndstree.h, tools/ndstool/include/overlay.h,
+ tools/ndstool/include/passme.h, tools/ndstool/include/passme_sram.h,
+ tools/ndstool/include/passme_vhd1.h,
+ tools/ndstool/include/passme_vhd2.h, tools/ndstool/include/raster.h,
+ tools/ndstool/include/sha1.h, tools/ndstool/include/types.h,
+ tools/ndstool/source/arm7_sha1_homebrew.c,
+ tools/ndstool/source/arm7_sha1_nintendo.c,
+ tools/ndstool/source/banner.cpp, tools/ndstool/source/bigint.cpp,
+ tools/ndstool/source/compile_date.c, tools/ndstool/source/crc.cpp,
+ tools/ndstool/source/default_icon.c,
+ tools/ndstool/source/encryption.cpp, tools/ndstool/source/header.cpp,
+ tools/ndstool/source/hook.cpp, tools/ndstool/source/loadme.c,
+ tools/ndstool/source/logo.cpp, tools/ndstool/source/ndscodes.cpp,
+ tools/ndstool/source/ndscreate.cpp,
+ tools/ndstool/source/ndsextract.cpp,
+ tools/ndstool/source/ndstool.cpp, tools/ndstool/source/ndstree.cpp,
+ tools/ndstool/source/passme.cpp, tools/ndstool/source/passme_sram.c,
+ tools/ndstool/source/raster.cpp, tools/ndstool/source/sha1.cpp,
+ touchscreen/README.reco, touchscreen/parser.c, touchscreen/reco.c,
+ touchscreen/reco.h, touchscreen/touchscreen.c,
+ touchscreen/touchscreen.h, wifi/compat.c, wifi/compat.h, wifi/wifi.c:
+ New files.
+
Revision 1.10 2007/02/06 12:00:32 wntrmute
use uint32 for irqEnable
@@ -55,7 +193,7 @@
#include <nds/interrupts.h>
#include <nds/system.h>
-void IntrMain(); // Prototype for assembly interrupt dispatcher
+void IntrMain(void); // Prototype for assembly interrupt dispatcher
//---------------------------------------------------------------------------------
void irqDummy(void) {}
diff --git a/c/src/lib/libbsp/arm/nds/sound/sound.c b/c/src/lib/libbsp/arm/nds/sound/sound.c
index da8392e536..9278926f89 100644
--- a/c/src/lib/libbsp/arm/nds/sound/sound.c
+++ b/c/src/lib/libbsp/arm/nds/sound/sound.c
@@ -55,7 +55,7 @@ sound_initialize (rtems_device_major_number major,
/* reset IPCs structs */
IPC->soundData = NULL;
- memset (my_IPC, 0, sizeof (*my_IPC));
+ memset ((void *)my_IPC, 0, sizeof (*my_IPC));
DC_FlushAll ();
return RTEMS_SUCCESSFUL;
@@ -102,7 +102,7 @@ sound_read (rtems_device_major_number major,
}
/* read buffer */
- memcpy (rw_args->buffer, my_IPC->record_buffer + offset, rw_args->count);
+ memcpy ((void *)rw_args->buffer, (void *)my_IPC->record_buffer + offset, rw_args->count);
offset += rw_args->count;
rw_args->bytes_moved = rw_args->count;
return RTEMS_SUCCESSFUL;
diff --git a/c/src/lib/libbsp/arm/nds/startup/start.c b/c/src/lib/libbsp/arm/nds/startup/start.c
index 935d32739a..2bfe0bab19 100644
--- a/c/src/lib/libbsp/arm/nds/startup/start.c
+++ b/c/src/lib/libbsp/arm/nds/startup/start.c
@@ -21,6 +21,12 @@
extern unsigned int arm_cpu_mode;
/*
+ * These are from the linker script.
+ */
+extern uint8_t _end;
+extern uint8_t __ewram_end;
+
+/*
* This method returns the base address and size of the area which
* is to be allocated between the RTEMS Workspace and the C Program
* Heap.
@@ -32,9 +38,6 @@ void bsp_get_work_area(
size_t *heap_size
)
{
- extern uint8_t _end;
- extern uint8_t __ewram_end;
-
*work_area_start = &_end;
*work_area_size = (void *)&__ewram_end - (void *)&_end;
*heap_start = BSP_BOOTCARD_HEAP_USES_WORK_AREA;
diff --git a/c/src/lib/libbsp/arm/nds/touchscreen/reco.h b/c/src/lib/libbsp/arm/nds/touchscreen/reco.h
index ea680f19ca..d9c00cd6e7 100644
--- a/c/src/lib/libbsp/arm/nds/touchscreen/reco.h
+++ b/c/src/lib/libbsp/arm/nds/touchscreen/reco.h
@@ -134,4 +134,4 @@ return angle;
}
-#endif RECO_H
+#endif /* RECO_H */
diff --git a/c/src/lib/libbsp/arm/nds/wifi/compat.c b/c/src/lib/libbsp/arm/nds/wifi/compat.c
index 956ddff481..1b6f4e0621 100644
--- a/c/src/lib/libbsp/arm/nds/wifi/compat.c
+++ b/c/src/lib/libbsp/arm/nds/wifi/compat.c
@@ -44,7 +44,7 @@ sgIP_free (void *ptr)
*/
void
-sgIP_Init ()
+sgIP_Init (void)
{
}
@@ -80,13 +80,13 @@ sgIP_Hub_AddHardwareInterface (int (*TransmitFunction)
* translate memblock to mbuf
*/
+extern void wifi_signal (struct mbuf *);
int
sgIP_Hub_ReceiveHardwarePacket (sgIP_Hub_HWInterface * hw,
sgIP_memblock * packet)
{
struct mbuf *m;
unsigned char *p;
- extern void wifi_signal (struct mbuf *);
/* reserve the mbuf */
MGETHDR (m, M_WAIT, MT_DATA);
@@ -114,7 +114,6 @@ void
compat_wifi_output (struct mbuf *m)
{
sgIP_memblock *packet;
- unsigned char *p;
size_t size = 0;
struct mbuf *l;
@@ -191,7 +190,7 @@ sgIP_DHCP_Start (sgIP_Hub_HWInterface * interface, int getDNS)
*/
int
-sgIP_DHCP_Update ()
+sgIP_DHCP_Update (void)
{
return SGIP_DHCP_STATUS_SUCCESS;
}
@@ -214,7 +213,7 @@ sgIP_ARP_SendGratARP (sgIP_Hub_HWInterface * hw)
/* ----------------- unused things ------------------------ */
sgIP_DNS_Record *
-sgIP_DNS_GetUnusedRecord ()
+sgIP_DNS_GetUnusedRecord (void)
{
static sgIP_DNS_Record rec;
diff --git a/c/src/lib/libbsp/arm/nds/wifi/compat.h b/c/src/lib/libbsp/arm/nds/wifi/compat.h
index 0f52bca1e2..bea3012506 100644
--- a/c/src/lib/libbsp/arm/nds/wifi/compat.h
+++ b/c/src/lib/libbsp/arm/nds/wifi/compat.h
@@ -93,11 +93,11 @@ extern sgIP_Hub_HWInterface *wifi_hw;
/* prototypes */
-sgIP_DNS_Record *sgIP_DNS_GetUnusedRecord ();
+sgIP_DNS_Record *sgIP_DNS_GetUnusedRecord (void);
void sgIP_DHCP_Start (sgIP_Hub_HWInterface * interface, int getDNS);
-int sgIP_DHCP_Update ();
+int sgIP_DHCP_Update (void);
int sgIP_ARP_SendGratARP (sgIP_Hub_HWInterface * hw);
-void sgIP_Init ();
+void sgIP_Init (void);
void sgIP_Timer (int num_ms);
sgIP_Hub_HWInterface
*sgIP_Hub_AddHardwareInterface (int (*TransmitFunction)