...
Dependencies: mbed EthernetInterface mbed-rtos
Fork of FOTA_K64F by
main.cpp
- Committer:
- wmmihaa
- Date:
- 2017-03-14
- Revision:
- 11:0f4df7636ef7
- Parent:
- 9:56ed3a56ecc3
File content as of revision 11:0f4df7636ef7:
#include "mbed.h" #include "EthernetInterface.h" #include "bootloader.h" DigitalIn sw(PTA4); DigitalOut LED(LED_BLUE); int main() { EthernetInterface eth; eth.init(); //Use DHCP eth.connect(); printf("Welcome to microServiceBus Start up\r\n"); while (1) { printf("Entering bootloader\r\n"); write_flash(); } /* //Blink LED, and when SW3 is pressed go to bootloader //I don't know atm if the bootloader would work from interrupt context while (1) { LED = !LED; wait(0.25); if (sw == 0) { printf("Entering bootloader\r\n"); write_flash(); } }*/ }