![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
ライブラリ化を行った後
Dependencies: QEI accelerator bit_test cyclic_io cyclic_var cylinder event_var limit mbed mecanum motor_drive pid pid_encoder rs422_put sbdbt servo
Fork of 17robo_Practice1 by
Diff: bit_test.h
- Revision:
- 0:bf96e953cdb8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bit_test.h Mon Jun 26 09:59:14 2017 +0000 @@ -0,0 +1,10 @@ +/* +int bit_test(int data, int bit_number); +データのビットが1なら1を返す +*/ + +int bit_test(int data_byte, int bit_number) { + data_byte = data_byte >> bit_number; + data_byte = data_byte & 0b00000001; + return data_byte; +} \ No newline at end of file