Basic blinky demo for MAX32630FTHR
Dependencies: USBDevice pegasus_dev max32630fthr
main.cpp@2:6c7d3a687d35, 2016-12-13 (annotated)
- Committer:
- switches
- Date:
- Tue Dec 13 21:57:08 2016 +0000
- Revision:
- 2:6c7d3a687d35
- Parent:
- 1:707376a2b1bc
Updated pegasus_dev and max32630fthr libraries
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
switches | 0:60a522ae2e35 | 1 | #include "mbed.h" |
switches | 1:707376a2b1bc | 2 | #include "max32630fthr.h" |
switches | 0:60a522ae2e35 | 3 | |
switches | 0:60a522ae2e35 | 4 | DigitalOut led1(LED1); |
switches | 2:6c7d3a687d35 | 5 | MAX32630FTHR pegasus; |
switches | 0:60a522ae2e35 | 6 | |
switches | 0:60a522ae2e35 | 7 | // main() runs in its own thread in the OS |
switches | 0:60a522ae2e35 | 8 | // (note the calls to Thread::wait below for delays) |
switches | 0:60a522ae2e35 | 9 | int main() |
switches | 0:60a522ae2e35 | 10 | { |
switches | 1:707376a2b1bc | 11 | // initialize power and I/O on MAX32630FTHR board |
switches | 2:6c7d3a687d35 | 12 | pegasus.init(MAX32630FTHR::VIO_3V3); |
switches | 1:707376a2b1bc | 13 | |
switches | 0:60a522ae2e35 | 14 | while (true) { |
switches | 0:60a522ae2e35 | 15 | led1 = !led1; |
switches | 0:60a522ae2e35 | 16 | Thread::wait(500); |
switches | 0:60a522ae2e35 | 17 | } |
switches | 0:60a522ae2e35 | 18 | } |
switches | 0:60a522ae2e35 | 19 |