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: max32630fthr mbed
main.cpp
- Committer:
- j3
- Date:
- 2017-08-19
- Revision:
- 1:b8fe3f7c11e4
- Parent:
- 0:06c0d19792d3
File content as of revision 1:b8fe3f7c11e4:
#include "mbed.h"
#include "max32630fthr.h"
const uint32_t BLINK_DELAY = 250;
void blink_led(DigitalOut &led, const uint32_t delay);
int main()
{
MAX32630FTHR pegasus(MAX32630FTHR::VIO_3V3);
DigitalOut rLed(LED_RED, 1);
DigitalOut gLed(LED_GREEN, 1);
DigitalOut bLed(LED_BLUE, 1);
DigitalOut led_array[] = {rLed, gLed, bLed};
while(1)
{
for(int8_t idx = 2; idx >= 0; idx--)
{
blink_led(led_array[idx], BLINK_DELAY);
}
}
}
void blink_led(DigitalOut &led, const uint32_t delay)
{
led = !led;
wait_ms(delay);
led = !led;
}