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.
main.cpp
00001 #include "mbed.h" 00002 00003 #define USR_POWERDOWN (0x104) 00004 int semihost_powerdown() { 00005 uint32_t arg; 00006 return __semihost(USR_POWERDOWN, &arg); 00007 } 00008 00009 DigitalOut myled(LED1); 00010 DigitalOut result(LED2); 00011 00012 int main() { 00013 for(int i=0; i<10; i++) { 00014 myled = !myled; 00015 wait(0.2); 00016 } 00017 00018 result = semihost_powerdown(); 00019 00020 while(1) { 00021 myled = !myled; 00022 wait(0.2); 00023 } 00024 }
Generated on Fri Jul 15 2022 13:44:58 by
1.7.2