Title |
Function |
Function Name |
No |
Format Uint32 PER_Init (PerKind kind, PerNum num, PerId id, PerSize size, ( Uint32 work [n], Uint8 v_blank) Input kind: Intback type num: Number of required peripherals id id: Peripheral ID size size: peripheral size : work: Work area (Used for acquiring peripheral data. Be sure to declare it as a global variable.) VBblank: V-BLANK skip count-Work area calculation method
n = (num × data A) / 4 + data B Round up
Data B> Data A and Data B vary depending on the peripheral.
Peripherals
Data A
Data B
Digital devices
12
1
Analog Devices
36
2
Pointing device
36
2
Keyboard device
20
1
MegaDrive 3 Button Pad
6
1
Megadrive 6 button pad
12
1
Output None Function value Execution state
constant |
|---|
Function Initializes the intback and issues an intback command. Be sure to follow the execution rules. Set NULL or 0 for parameters that are not required. Please execute at least once before executing PER_GetPer (), PER_GetTim (), PER_GetSys (). Remarks Generally, please execute immediately after V-BLANK processing. Other interrupts are prohibited during SMPC interrupts. Caution This function should be Do not do in the interrupt processing. Be sure to do it in the main process.