pspos:
This module provides information about the psp, and some other functions like changing cpu/bus speed:
Code: Select all
pspos.setclocks(333,166) # To set both CPU and Bus clock
pspos.setclock(333) # To set the CPU clock only
pspos.setbus(166) # To set the bus speed only
pspos.getclocks() # To get the current clockApart from messing around with clock speed, the pspos module provides information about various aspects of the psp system:
Code: Select all
pspos.freemem() # Return amount of free memory
pspos.battery() # Returns a list containing different values about the battery
pspos.battery()[3] # Returns battery charge percentage
pspos.getnickname() # Returns the current users nicknameCode: Select all
pspos.getsystemparam(param)Code: Select all
PSP_SYSTEMPARAM_ID_STRING_NICKNAME = 1
PSP_SYSTEMPARAM_ID_INT_ADHOC_CHANNEL = 2
PSP_SYSTEMPARAM_ID_INT_WLAN_POWERSAVE = 3
PSP_SYSTEMPARAM_ID_INT_DATE_FORMAT = 4
PSP_SYSTEMPARAM_ID_INT_TIME_FORMAT = 5
PSP_SYSTEMPARAM_ID_INT_TIMEZONE = 6
PSP_SYSTEMPARAM_ID_INT_DAYLIGHTSAVINGS = 7
PSP_SYSTEMPARAM_ID_INT_LANGUAGE = 8
PSP_SYSTEMPARAM_ID_INT_UNKNOWN = 9Code: Select all
pspos.getsystemparam(8)Code: Select all
PSP_SYSTEMPARAM_LANGUAGE_JAPANESE = 0
PSP_SYSTEMPARAM_LANGUAGE_ENGLISH = 1
PSP_SYSTEMPARAM_LANGUAGE_FRENCH = 2
PSP_SYSTEMPARAM_LANGUAGE_SPANISH = 3
PSP_SYSTEMPARAM_LANGUAGE_GERMAN = 4
PSP_SYSTEMPARAM_LANGUAGE_ITALIAN = 5
PSP_SYSTEMPARAM_LANGUAGE_DUTCH = 6
PSP_SYSTEMPARAM_LANGUAGE_PORTUGUESE = 7
PSP_SYSTEMPARAM_LANGUAGE_RUSSIAN = 8
PSP_SYSTEMPARAM_LANGUAGE_KOREAN = 9
PSP_SYSTEMPARAM_LANGUAGE_CHINESE_TRADITIONAL = 10
PSP_SYSTEMPARAM_LANGUAGE_CHINESE_SIMPLIFIED = 11That's basically it for this module, take a look at it since it's very easy to understand.
pspsnd:
This module provides functions about sound such as music playback and volume control.
Setting the volume:
Code: Select all
pspsnd.setMusicVolume(vol)Code: Select all
pspsnd.setSndFxVolume(vol)Play a file:
Code: Select all
music = pspsnd.Music("path_to_file")
music.start()
music.stop()pspnet:
To be honest, I haven't used this module myself, but looking at the source code and other examples it isn't that big a deal:
Code: Select all
pspnet.connectToAPCTL(n) # Connect to AP, n has to be a number depending on the AP (see bellow)
pspnet.disconnectAPCTL() # Disconnect from AP
pspnet.wlanSwitchState() # Return the wlan switch state
pspnet.wlanEtherAddr() # Return Ethernet Address
pspnet.getAPCTLState() # Return state of connection
pspnet.getIP() # Return IP address
pspnet.enumConfigs() # Enumerate the different AP configurationsWell that's basically it. On the next lesson we'll start seeing some real examples.
Previous: viewtopic.php?f=5&t=13112
Next: viewtopic.php?f=5&t=13374
Advertising
