Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
DualShock.h
00001 #ifndef DUALSHOCK_H_ 00002 #define DUALSHOCK_H_ 00003 00004 typedef struct { 00005 union{ 00006 uint16_t ButtonData; 00007 struct{ 00008 union{ 00009 uint8_t ButtonData_left :8; 00010 struct{ 00011 uint8_t L2 :1; 00012 uint8_t R2 :1; 00013 uint8_t L1 :1; 00014 uint8_t R1 :1; 00015 uint8_t TRIANGLE :1; 00016 uint8_t CIRCLE :1; 00017 uint8_t CROSS :1; 00018 uint8_t SQUARE :1; 00019 }; 00020 }; 00021 union{ 00022 uint8_t ButtonData_right :8; 00023 struct{ 00024 uint8_t SELECT :1; 00025 uint8_t L3 :1; 00026 uint8_t R3 :1; 00027 uint8_t START :1; 00028 uint8_t UP :1; 00029 uint8_t RIGHT :1; 00030 uint8_t DOWN :1; 00031 uint8_t LEFT :1; 00032 00033 }; 00034 }; 00035 }; 00036 }BUTTON; 00037 /* struct{ 00038 float LY; 00039 float LX; 00040 float RY; 00041 float RX; 00042 }ANALOG; 00043 */ 00044 }tDSParm; 00045 00046 extern tDSParm hDS; 00047 00048 extern uint8_t InitDS(UART_HandleTypeDef *huart); 00049 extern void ReStartDS(void); 00050 00051 extern void getDSdata(void); 00052 #endif
Generated on Wed Jul 13 2022 04:06:48 by
1.7.2