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: max32630fthr USBDevice
Revision 1:6915bb808b58, committed 2020-02-17
- Comitter:
- mikevanderploeg
- Date:
- Mon Feb 17 19:41:41 2020 +0000
- Parent:
- 0:d4d0421bd4e2
- Commit message:
- checkpoint for help with compiler;
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Oct 24 23:50:33 2019 +0000
+++ b/main.cpp Mon Feb 17 19:41:41 2020 +0000
@@ -137,9 +137,30 @@
microUSB.printf("ack.%i\r\n",val);
}
+ else if (strncmp(buf, "scan",4)==0) {
+ // send 1000 clocks with a 1100 pattern on data
+ // csb=1 since that is SCAN_EN
+ // SEL1/NC=SCAN_RESET is not controlled via feather
+ int val;
+ int i;
+ csb = 1;
+ for(i = 0; i<500; i++) {
+ clk = 0;
+ data = (data==0)?1:0;
+ wait_us(1);
+ clk = 1;
+ wait_us(1);
+ clk = 0;
+ wait_us(1);
+ clk = 1;
+ wait_us(1);
+ }
+ microUSB.printf("scan ack.%i\r\n",val);
+ }
// set ldo voltage
else if (strncmp(buf,"ldo",3)==0) {
int setting = ldo((int)buf[4],(int)buf[5]);
+ //microUSB.printf("Setting:%i\r\n",setting);
pegasus.max14690.ldo3SetVoltage(setting*100);
pegasus.max14690.ldo2SetVoltage(setting*100);
wait(0.01);