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: ADXL362 mbed MPL3115A2
Diff: main.cpp
- Revision:
- 1:b8716571ecac
- Parent:
- 0:0f663d16e8a2
- Child:
- 2:496a662be854
--- a/main.cpp Tue Feb 20 15:24:50 2018 +0000 +++ b/main.cpp Tue Feb 20 15:43:51 2018 +0000 @@ -25,10 +25,11 @@ int adxl362_reg_print(int s, int l){ //check s is 0x00 and 0x2E if(s > 0x2E || s < 0x00){ - printf("adx: requires start between 0x00 and 0x2E; given %d\n", s); + printf("adx: requires start between 0x00 and 0x2E; given %d (0x%01x)\n", s,s); return 1; }else if(l < 0){ - printf("adx: requires length > 0, given %d\n", l); + //check length >0 + printf("adx: requires length >= 0, given %d\n", l); return 1; }else{ // start sending stuff @@ -38,9 +39,11 @@ return 1; }else{ //now do stuff + //if length == 0, send everything from s to end of registers + if(l == 0){ + + } } } - //check length >0 - //if length == 0, send everything from s to end of registers - } +}