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: mbed
Diff: src/main.cpp
- Revision:
- 47:d10bf65cb7dc
- Parent:
- 45:bd8da8d90dbb
- Child:
- 48:8e9de9ff1f22
--- a/src/main.cpp Sun Mar 10 18:03:46 2019 +0000 +++ b/src/main.cpp Sun Mar 10 21:39:14 2019 +0000 @@ -67,31 +67,22 @@ double CURRENT_24_OFFSET = 33580; double CURRENT_12_OFFSET = 33256; -volatile bool dosFlip = FALSE; -volatile bool dofFlip = FALSE; -void slowFlip() { - dosFlip = TRUE; -} - -void fastFlip() { - dofFlip = TRUE; -} -void fastFlip(unsigned short numFast){ - if(numFast >= 1){ec0 = ~ec0;} - if(numFast >= 2){ec1 = ~ec1;} - ... - if(numFast >= 36){ec35 = ~ec35;} -} +//void fastFlip(unsigned short numFast){ +// if(numFast >= 1){ec0 = ~ec0;} +// if(numFast >= 2){ec1 = ~ec1;} +// ... +// if(numFast >= 36){ec35 = ~ec35;} +//} -void slowFlip(unsigned short numFast){ - numSlow = MAX_CHIPS - numFast; - if( numSlow >= 36){ec35 = ~ec35;}else{return;} - if( numSlow >= 35){ec34 = ~ec34;}else{return;} - ... - if( numSlow >= 1){ec0 = ~ec0;} -} +//void slowFlip(unsigned short numFast){ +// numSlow = MAX_CHIPS - numFast; +// if( numSlow >= 36){ec35 = ~ec35;}else{return;} +// if( numSlow >= 35){ec34 = ~ec34;}else{return;} +// ... +// if( numSlow >= 1){ec0 = ~ec0;} +//} @@ -105,8 +96,8 @@ initOut(); - slowClk.attach(&slowFlip, 0.0003); - fastClk.attach(&fastFlip, 0.00001); + slowClk.attach(&slowFlip, 3.0); + fastClk.attach(&fastFlip, 1.5); running = FALSE;