MDテスト用プログラム
Dependencies: FastPWM GMD_template_lib mbed
Fork of NewMD2 by
Diff: main.cpp
- Revision:
- 5:9d1b1948a9b6
- Parent:
- 4:894559ccce05
- Child:
- 6:004e6174445a
--- a/main.cpp Sun Jul 03 02:33:31 2016 +0000 +++ b/main.cpp Sun Jul 03 03:15:31 2016 +0000 @@ -11,11 +11,11 @@ }; char address = 0; - size_t address_offset = 4; + size_t address_offset = 0x08 << 1; for (size_t i = 0; i < din_num; ++i) { - address |= din[i].read() << (i + address_offset); + address |= din[i].read() << (i + 1); } - return address; + return address + address_offset; } int main(){