Somebody on this forum helped me put together this code, and I was happy, but then it didn't compile.... and the compiler says the issue is that the 'sceWlanDevIsPowerOn' part. Anybody know why? Please and thank you!
Seems like you need to include something (a .h file form the PSPSDK) so the compiler finds the functions(s) you're trying to use.
Hint: Learn general C/C++ before attempting to program for the PSP. At least to grasp basic concepts like headers, functions, libraries, local/global variables, if, for, do and such.
Let's see what the PSP reserves... well, I'd say anything is better than Palm OS.
main.o: In function 'main':
main.c:(.text+0xd8): undefined reference to 'sceWlanDevIsPowerOn'
main.c:(.text+0xf4): undefined reference to 'sceUmdCheckMedium'
collect2: ld returned 1 exit status
make: *** [Project10.elf] Error 1
and if I change
if(sceWlanDevIsPowerOn()) printf("WLAN switch is on\n");
else printf("WLAN switch is off\n");
to
if(sceWlanDevIsPowerOn(1)) printf("WLAN switch is on\n");
else printf("WLAN switch is off\n");
main.c: In function 'main':
main.c:32: error: too many arguments to function 'sceWlanDevIsPowerOn'
make: *** [main.o] Error 1
and if I change
if(sceWlanDevIsPowerOn(1)) printf("WLAN switch is on\n");
else printf("WLAN switch is off\n");
to
if(sceWlanDevIsPowerOn(0)) printf("WLAN switch is on\n");
else printf("WLAN switch is off\n");
main.c: In function 'main':
main.c:32: error: too few arguments to function 'sceWlanDevIsPowerOn'
make: *** [main.o] Error 1
I have the correct files in the header, which are pspumd.h and pspwlan.h, so I don't think I'm missing a file there...