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.
Diff: DualShock.h
- Revision:
- 0:2a0c62e53e9c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/DualShock.h Wed Sep 12 09:07:30 2018 +0000
@@ -0,0 +1,52 @@
+#ifndef DUALSHOCK_H_
+#define DUALSHOCK_H_
+
+typedef struct {
+ union{
+ uint16_t ButtonData;
+ struct{
+ union{
+ uint8_t ButtonData_left :8;
+ struct{
+ uint8_t L2 :1;
+ uint8_t R2 :1;
+ uint8_t L1 :1;
+ uint8_t R1 :1;
+ uint8_t TRIANGLE :1;
+ uint8_t CIRCLE :1;
+ uint8_t CROSS :1;
+ uint8_t SQUARE :1;
+ };
+ };
+ union{
+ uint8_t ButtonData_right :8;
+ struct{
+ uint8_t SELECT :1;
+ uint8_t L3 :1;
+ uint8_t R3 :1;
+ uint8_t START :1;
+ uint8_t UP :1;
+ uint8_t RIGHT :1;
+ uint8_t DOWN :1;
+ uint8_t LEFT :1;
+
+ };
+ };
+ };
+ }BUTTON;
+ /* struct{
+ float LY;
+ float LX;
+ float RY;
+ float RX;
+ }ANALOG;
+ */
+}tDSParm;
+
+extern tDSParm hDS;
+
+extern uint8_t InitDS(UART_HandleTypeDef *huart);
+extern void ReStartDS(void);
+
+extern void getDSdata(void);
+#endif
\ No newline at end of file