PS3の移動ライブラリ(バグあり動作不可)です。 誠意製作中です。

Dependents:   NHK2018_BM

Committer:
tektomo
Date:
Thu Sep 27 09:24:36 2018 +0000
Revision:
2:9b3aeecc67d9
Parent:
0:1e79ec3fb922
PID????????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tektomo 0:1e79ec3fb922 1 #ifndef PS3S_h
tektomo 0:1e79ec3fb922 2 #define PS3S_h
tektomo 0:1e79ec3fb922 3 /*PS3 button Code(8 byte) And Array number
tektomo 0:1e79ec3fb922 4 First bit value of all code is 0x80(128)
tektomo 0:1e79ec3fb922 5 0 Up: 0x00,0x01,0x40,0x40,0x40,0x40,0x01(0,1,64,64,64,64,1)
tektomo 0:1e79ec3fb922 6 1 Down: 0x00,0x02,0x40,0x40,0x40,0x40,0x02(0,2,64,64,64,64,2)
tektomo 0:1e79ec3fb922 7 2 Right: 0x00,0x04,0x40,0x40,0x40,0x40,0x04(0,4,64,64,64,64,4)
tektomo 0:1e79ec3fb922 8 3 Left: 0x00,0x08,0x40,0x40,0x40,0x40,0x08(0,8,64,64,64,64,8)
tektomo 0:1e79ec3fb922 9 4 Triangle:0x00,0x10,0x40,0x40,0x40,0x40,0x10(0,10,64,64,64,64,10)
tektomo 0:1e79ec3fb922 10 5 X: 0x00,0x20,0x40,0x40,0x40,0x40,0x20(0,32,64,64,64,64,32)
tektomo 0:1e79ec3fb922 11 6 Circle: 0x00,0x40,0x40,0x40,0x40,0x40,0x40(0,64,64,64,64,64,64)
tektomo 0:1e79ec3fb922 12 7 Box: 0x01,0x00,0x40,0x40,0x40,0x40,0x01(1,0,64,64,64,64,1)
tektomo 0:1e79ec3fb922 13 8 L1: 0x02,0x00,0x40,0x40,0x40,0x40,0x02(2,0,64,64,64,64,2)
tektomo 0:1e79ec3fb922 14 9 L2: 0x04,0x00,0x40,0x40,0x40,0x40,0x04(4,0,64,64,64,64,4)
tektomo 0:1e79ec3fb922 15 10 R1: 0x08,0x00,0x40,0x40,0x40,0x40,0x08(8,0,64,64,64,64,8)
tektomo 0:1e79ec3fb922 16 11 R2: 0x10,0x00,0x40,0x40,0x40,0x40,0x10(16,0,64,64,64,64,16)
tektomo 0:1e79ec3fb922 17 12 Select: 0x00,0x0C,0x40,0x40,0x40,0x40,0x0C(0,12,64,64,64,64,12)
tektomo 0:1e79ec3fb922 18 13 Start: 0x00,0x03,0x40,0x40,0x40,0x40,0x03(0,3,64,64,64,64,3)
tektomo 0:1e79ec3fb922 19 14 LX 0 - 127 1byte
tektomo 0:1e79ec3fb922 20 15 LY 0 - 53 Up and Left
tektomo 0:1e79ec3fb922 21 16 RX 75 - 127 Down and Right
tektomo 0:1e79ec3fb922 22 17 RY 54 - 64 - 74 Neutral
tektomo 0:1e79ec3fb922 23 End comment*/
tektomo 0:1e79ec3fb922 24
tektomo 0:1e79ec3fb922 25 #include "mbed.h"
tektomo 0:1e79ec3fb922 26 class PS3s : public Serial{
tektomo 0:1e79ec3fb922 27 public:
tektomo 0:1e79ec3fb922 28 PS3s(PinName TX, PinName RX); /*: Serial(TX, RX){*/
tektomo 0:1e79ec3fb922 29 int condata[18];
tektomo 0:1e79ec3fb922 30 int Rdata[8];
tektomo 0:1e79ec3fb922 31 int button1_buffer;
tektomo 0:1e79ec3fb922 32 int button2_buffer;
tektomo 0:1e79ec3fb922 33 int dataval;
tektomo 0:1e79ec3fb922 34
tektomo 0:1e79ec3fb922 35 void getdata();
tektomo 0:1e79ec3fb922 36 void checkdata();
tektomo 0:1e79ec3fb922 37 };
tektomo 0:1e79ec3fb922 38 #endif