method
PS2_Init(void)
PS2 receiver module initialization
| Return value | type |
| none | void |
PS2_Cmd(u8 CMD)
Send command to the handle
| parameter | type | Annotation |
| CMD | u8 | Order to be sent |
| Return value | type |
| noneone | void |
PS2_RedLight(void)
Determine whether it is a red light mode
| Return value | type |
| 0 | u8 | Red light mode |
| 1 | u8 | Other modes |
PS2_ReadData(void)
Read the handle data
| Return value | type |
| none | void |
PS2_DataKey(void)
Read the key value
| Return value | type |
| Key value | u8 |
PS2_ClearData(void)
Clear data buffer
| Return value | type |
| none | void |
PS2_Vibration(u8 motor1, u8 motor2)
Set the handle vibration
| parameter | type | Annotation |
| motor1 | u8 | Small vibration motor on the right (0x00 level, other opening) |
| motor2 | u8 | The left large vibration motor (0x40 ~ 0xff opened, the larger the value, the larger the vibration) |
| Return value | type |
| none | void |
PS2_ShortPoll(void)
Inquiry
| Return value | type |
| none | void |
PS2_EnterConfing(void)
Enter the configuration mode
| Return value | type |
| none | void |
PS2_TurnOnAnalogMode(void)
Send analog mode settings
| Return value | type |
| none | void |
PS2_VibrationMode(void)
Set up vibration mode
| Return value | type |
| none | void |
PS2_ExitConfing(void)
Complete and save configuration
| Return value | type |
| none | void |
PS2_SetInit(void)
Controller configuration initialization
| Return value | type |
| none | void |
PS2_Data_Show(void)
Key value test and output function
| Return value | type |
| none | void |