first lib
Dependents: 17robo_fuzi 17robo_tokyo_kaede
bit_test.cpp@0:81eadcca6267, 2017-09-24 (annotated)
- Committer:
- echo_piyo
- Date:
- Sun Sep 24 05:24:41 2017 +0000
- Revision:
- 0:81eadcca6267
????2??
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
echo_piyo | 0:81eadcca6267 | 1 | #include "bit_test.h" |
echo_piyo | 0:81eadcca6267 | 2 | #include "mbed.h" |
echo_piyo | 0:81eadcca6267 | 3 | |
echo_piyo | 0:81eadcca6267 | 4 | int bitTest(int dataByte, int bitNumber) { |
echo_piyo | 0:81eadcca6267 | 5 | dataByte = dataByte >> bitNumber; |
echo_piyo | 0:81eadcca6267 | 6 | dataByte = dataByte & 1; |
echo_piyo | 0:81eadcca6267 | 7 | return dataByte; |
echo_piyo | 0:81eadcca6267 | 8 | } |