SBDBTを用いてDS3(PS3コントローラ)を扱うライブラリ
Dependents: PIDcontrol_4 go_robo2022kaisyu_no 2022_Ateam_MOTORprogram tape_LED ... more
Diff: sbdbt.cpp
- Revision:
- 2:9fd7393a3023
- Parent:
- 0:d10107920170
--- a/sbdbt.cpp Wed Nov 10 14:11:27 2021 +0000 +++ b/sbdbt.cpp Thu Nov 11 09:07:47 2021 +0000 @@ -11,7 +11,7 @@ pc = new Serial(USBTX, USBRX); dev = new Serial(TX, RX); dev -> baud(9600); - dev -> attach(this,&sbdbt::get,Serial::RxIrq); + dev -> attach(callback(this,&sbdbt::get),Serial::RxIrq); } sbdbt::sbdbt(PinName TX, PinName RX, int baud){ @@ -25,7 +25,7 @@ dev = new Serial(TX, RX); dev -> baud(9600); pc -> baud(baud); - dev -> attach(this,&sbdbt::get,Serial::RxIrq); + dev -> attach(callback(this,&sbdbt::get),Serial::RxIrq); } void sbdbt::get(){