ARM7 Processor Peripheral Device API Function List

# ARM7 Processor Peripheral Device (SPI) API Function List

### This interface is used so that ARM9 can operate peripheral devices that are connected on the ARM7 side. Access to the Touch Screen, microphone, and the power management IC is performed using mutexes, so errors may be returned in response to requests. Note this when you access simultaneously.

### Touch Screen (TP)

#### Initialization

TP_Init |  | Initializes the Touch Screen API.
TP_SetCallback |  | Sets the callback function that will be used when a request instruction to ARM7 completes.
TP_SetCalibrateParam |  | Sets the parameters that are used for calibration.
TP_RequestSetStability |  | Requests ARM7 to set parameters for counteracting chattering.

#### Sampling Caused by a Request

TP_RequestRawSampling |  | Requests ARM7 for one cycle of Touch Screen values, and acquires coordinate values as unconverted, raw touch panel values.
TP_RequestCalibratedSampling |  | Requests ARM7 for one cycle of Touch Screen values. It converts coordinate values to screen coordinates and acquires them.
TP_RequestSamplingAsync |  | Asynchronously requests ARM7 for one cycle of Touch Screen values.
TP_WaitRawResult |  | Acquires one cycle of coordinate values as unconverted, raw Touch Screen values.
TP_WaitCalibratedResult |  | Converts one cycle of coordinate values to screen coordinates and acquires it.
TP_GetCalibratedResult |  | Converts and gets coordinate values that have arrived to screen coordinates.

#### Auto-Sampling

TP_RequestAutoSamplingStart |  | Requests ARM7 to begin auto-sampling.
TP_RequestAutoSamplingStartAsync |  | Asynchronously requests ARM7 to begin auto-sampling.
TP_RequestAutoSamplingStop |  | Requests ARM7 to stop auto-sampling.
TP_RequestAutoSamplingStopAsync |  | Asynchronously requests ARM7 to stop auto-sampling.
TP_GetLatestRawPointInAuto |  | Acquires the most recent valid values that were obtained by auto-sampling, as raw unconverted Touch Screen values.
TP_GetLatestCalibratedPointInAuto |  | Acquires the most recent valid values that were obtained by auto-sampling, as converted screen coordinates.
TP_GetLatestIndexInAuto |  | Acquires the index of the most recent data that was stored by auto-sampling.

#### Calibration

TP_GetUserInfo |  | Gets parameters for calibration from the system flash memory.
TP_CalcCalibrateParam |  | Calibrates parameters for calibration from 2 coordinate points.
TP_GetCalibratedPoint |  | Converts raw Touch Screen values and acquires screen coordinates.
TP_GetUnCalibratedPoint |  | Back-converts screen coordinates, and acquires Touch Screen values.

#### Success/Failure Determination

TP_WaitBusy |  | Waits for the return from ARM7 of a termination acknowledgement for a particular request.
TP_WaitAllBusy |  | Waits for the return from ARM7 of termination acknowledgements for all requests.
TP_CheckBusy |  | Asynchronously checks termination acknowledgements from ARM7.
TP_CheckError |  | Checks whether a process on ARM7 ended without error.

#### Types and Structures

TPData |  | Structure that points to the coordinates of the Touch Screen.
TPRecvCallback |  | Sets the callback function that will be used when a request instruction to ARM7 completes.
TPRequestResult |  | Enumerated type of process results for the Touch Screen API functions.

### Microphone (MIC)

#### Initialization

MIC_Init |  | Initializes the microphone API.

#### Sampling

MIC_DoSampling |  | Samples the microphone one time.
MIC_DoSamplingAsync |  | Asynchronously samples the microphone one time.

#### Auto-Sampling

MIC_StartAutoSampling |  | Starts microphone auto-sampling.
MIC_StartAutoSamplingAsync |  | Asynchronously starts microphone auto-sampling.
MIC_StopAutoSampling |  | Stops microphone auto-sampling.
MIC_StopAutoSamplingAsync |  | Asynchronously stops microphone auto-sampling.
MIC_AdjustAutoSampling |  | Changes sampling rate in microphone auto-sampling.
MIC_AdjustAutoSamplingAsync |  | Asynchronously changes sampling rate in microphone auto-sampling.
MIC_StartLimitedSampling |  | Starts frequency-limited microphone auto-sampling.
MIC_StartLimitedSamplingAsync |  | Asynchronously starts frequency-limited microphone auto-sampling.
MIC_StopLimitedSampling |  | Stops frequency-limited microphone auto-sampling.
MIC_StopLimitedSamplingAsync |  | Asynchronously stops frequency-limited microphone auto-sampling.
MIC_AdjustLimitedSampling |  | Changes the sampling rate for frequency-limited microphone auto-sampling.
MIC_AdjustLimitedSamplingAsync |  | Asynchronously changes the sampling rate for frequency-limited microphone auto-sampling.
MIC_GetLastSamplingAddress |  | Gets the address at which the most recent microphone sampling results are stored.

#### Types and Structures

MICAutoParam |  | Structure for microphone auto-sampling parameters
MICSamplingType |  | Enumerator type for microphone sampling types
MICSamplingRate |  | Enumerator type for microphone sampling rates
MICCallback |  | Callback function type for asynchronous microphone functions
MICResult |  | Enumerator type for the process results that are shared by the microphone API function group

### Power Management (PM)

#### Initialization

PM_Init |  | Initializes the power management API

#### PMIC Operation

PM_SetBackLight* |  | Sets the backlight status.
PM_SetAmp* |  | Toggles the output of the programmable gain amp.
PM_SetAmpGain* |  | Sets the gain of the programmable gain amp.
PM_SetAmpGainLevel* |  | Sets the gain of the programmable gain amp.
PM_SetLCDPower |  | Toggles the LCD switch.

#### PMIC Status

PM_GetBackLight |  | Gets the backlight status.
PM_GetAmp |  | Gets the output switch setting of the programmable gain amp.
PM_GetAmpGain |  | Gets the gain setting of the programmable gain amp.
PM_GetAmpGainLevel |  | Gets the gain setting of the programmable gain amp.
PM_GetLCDPower |  | Gets the LCD switch status.
PM_GetLEDPattern* |  | Gets the LCD status.

#### Battery

PM_GetBattery |  | Checks the remaining battery capacity of the battery pack. (2 levels)
PM_GetBatteryLevel |  | Checks the remaining battery capacity of the battery pack. (5 levels)
PM_SetBatteryLowCallback |  | Sets the callback that is invoked when a drop in the remaining battery life is detected.
PM_GetACAdapter |  | Determines if an AC adapter is plugged into the DC connector.

#### Sleep

PM_GoSleepMode |  | Changes to the sleep mode.
PM_SetSleepCallbackInfo |  | Sets sleep mode callback information.
PM_AppendPreSleepCallback |  | Adds a callback function for changing to sleep mode at the end of the list.
PM_PrependPreSleepCallback |  | Adds a callback function for changing to sleep mode at the beginning of the list.
PM_InsertPreSleepCallback |  | Adds a callback function called when entering sleep mode to the list, giving the callback the specified priority.
PM_AppendPostSleepCallback |  | Adds a callback function for awakening from sleep mode at the end of the list.
PM_PrependPostSleepCallback |  | Adds a callback function for awakening from sleep mode at the beginning of the list.
PM_InsertPostSleepCallback |  | Adds a callback function for recovering from sleep mode to the list, giving the callback the specified priority.
PM_DeletePreSleepCallback |  | Deletes a registered callback function for entering sleep mode.
PM_DeletePostSleepCallback |  | Deletes a registered callback function for awakening from sleep mode.
PM_DumpSleepCallback |  | Displays the registered callback functions for entering and recovering from sleep mode, respectively. (Used in debugging)

#### Hardware Reset and Shutdown

PM_ForceToPowerOff* |  | Forcibly turns off the power.
PM_ForceToResetHardware |  | Forcibly resets the hardware.
PM_SetExitCallbackInfo |  | Sets exit callback information.
PM_AppendPreExitCallback |  | Adds an exit callback function to the end of the pre-processing list.
PM_PrependPreExitCallback |  | Adds an exit callback function to the start of the pre-processing list.
PM_InsertPreExitCallback |  | Adds an exit callback function to the pre-processing list, giving the callback the specified priority.
PM_AppendPostExitCallback |  | Adds an exit callback function to the end of the post-processing list.
PM_PrependPostExitCallback |  | Adds an exit callback function to the start of the post-processing list.
PM_InsertPostExitCallback |  | Adds an exit callback function to the post-processing list, giving the callback the specified priority.
PM_DeletePreExitCallback |  | Removes an exit callback function that was registered with the pre-processing list.
PM_DeletePostExitCallback |  | Removes an exit callback function that was registered with the post-processing list.
PM_DumpExitCallback |  | Displays the registered pre- and post-processing callbacks. (Used in debugging)
PM_SetAutoExit |  | Configures whether exit processing will finish automatically after the callbacks have been invoked.
PM_GetAutoExit |  | Gets the setting value indicating whether exit processing will finish automatically after the callbacks have been invoked.
PM_GetExitFactor |  | Gets the cause that led to exit processing.
PM_ReadyToExit |  | After finishing exit processing, explicitly tells the ARM7 to exit.

CONFIDENTIAL