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.
Dependencies: mbed
Fork of PS3_BlueUSB_user_ver_circlewar by
Diff: User.cpp
- Revision:
- 12:d35077f98a08
- Parent:
- 11:8288386dc376
- Child:
- 13:0d6ad1fb03b5
- Child:
- 14:639d019dfee8
--- a/User.cpp Mon Feb 15 02:31:24 2016 +0000 +++ b/User.cpp Mon Feb 15 08:36:10 2016 +0000 @@ -16,8 +16,11 @@ PwmOut led2(LED2); DigitalOut led3(LED3); DigitalOut led4(LED4); -DigitalOut LDB(p21); -DigitalOut RDB(p22); +DigitalOut LA(p21); +DigitalOut RA(p23); +DigitalOut LH(p22); +DigitalOut RH(p24); +DigitalOut CH(p25); SPI m(p5, p6, p7); DigitalOut cs(p8); void UserLoopSetting(){ @@ -56,14 +59,23 @@ //○が押されたとき } if((ButtonState >> BUTTONL2)&1){ - LDB=1; + LA=1; } else if((ButtonState >> BUTTONR2)&1){ - RDB=1; + RA=1; + } + else if((ButtonState >> BUTTONCROSS)&1){ + RA=1; + LA=1; } - else if((ButtonState >> BUTTONDOWN)&1){ - RDB=1; - LDB=1; + else if((ButtonState >> BUTTONCIRCLE)&1){ + RH=1; + } + else if((ButtonState >> BUTTONTRIANGEL)&1){ + CH=1; + } + else if((ButtonState >> BUTTONSQUARE)&1){ + LH=1; } if((ButtonState >> BUTTONR1)&1){ M=+32768; @@ -86,7 +98,7 @@ M=+((-1)*(LSY-128)); } m.write(M); - + led1=LSX/256.0f; led2=LSY/256.0f; led3=ButtonState & 0x0400; //L1の状態