sandbox/blue-pill/draugr/blink.cc

23 lines
444 B
C++
Raw Normal View History

2018-03-07 16:06:25 +00:00
#include "bluepill.h"
#define LED_PIN 13
// void __attribute__ ((weak, naked)) reset_handler(void) {
int
main() {
GPIO_C->enable_clock();
GPIO_C->pin_mode(LED_PIN, true, OUTPUT_GPP, OUTPUT_MAX_2MHZ);
2018-03-07 16:06:25 +00:00
while(1) {
GPIO_C->pin_clear(LED_PIN);
2018-03-07 16:06:25 +00:00
delay(1000000);
GPIO_C->pin_set(LED_PIN);
2018-03-07 16:06:25 +00:00
delay(100000);
GPIO_C->pin_clear(LED_PIN);
2018-03-07 16:06:25 +00:00
delay(100000);
GPIO_C->pin_set(LED_PIN);
2018-03-07 16:06:25 +00:00
delay(100000);
}
}