![](/media/cache/profiles/8631e5b91354a846f00dbbf16ad94259.jpg.50x50_q85.jpg)
Lab 3 example 2, no debugging
Fork of DACandticker_sample_with_debug by
DAC Ticker
- Sample code for part 2 of lab 3 using the DAC, called from a Ticker.
- Note that to use AnalogOut from the Ticker (an ISR), we create a version without locking.
Revision 5:5161dd5f273e, committed 2020-02-06
- Comitter:
- WilliamMarshQMUL
- Date:
- Thu Feb 06 09:03:54 2020 +0000
- Parent:
- 4:75ad475aff41
- Commit message:
- Update mbed. Repace wait with sleep for
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed-os.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Feb 04 16:12:23 2019 +0000 +++ b/main.cpp Thu Feb 06 09:03:54 2020 +0000 @@ -44,10 +44,10 @@ int update_us = 1000 ; // 1ms while (true) { tick.attach_us(callback(&writeAout), update_us); // setup ticker to write to AnalogOut - wait(30.0) ; // wait 30 sec + ThisThread::sleep_for(30000) ; // wait 30 sec update_us = 2000 ; // 2ms tick.attach_us(callback(&writeAout), update_us); // setup ticker to write to AnalogOut - wait(30.0) ; // wait 30 sec + ThisThread::sleep_for(30000) ; // wait 30 sec update_us = 1000 ; // 1ms } }
--- a/mbed-os.lib Mon Feb 04 16:12:23 2019 +0000 +++ b/mbed-os.lib Thu Feb 06 09:03:54 2020 +0000 @@ -1,1 +1,1 @@ -https://github.com/ARMmbed/mbed-os/#949cb49ab0a144da0e3b04b6af46db0cd2a20d75 +https://github.com/ARMmbed/mbed-os/#430e64fce8098fd5e54f6de32f3f029f35dc705f