2018-03-07 16:06:25 +00:00
|
|
|
#include "bluepill.h"
|
|
|
|
|
|
|
|
#define LED_PIN 13
|
|
|
|
|
|
|
|
// void __attribute__ ((weak, naked)) reset_handler(void) {
|
2018-03-07 23:01:27 +00:00
|
|
|
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) {
|
2018-03-07 23:01:27 +00:00
|
|
|
GPIO_C->pin_clear(LED_PIN);
|
2018-03-07 16:06:25 +00:00
|
|
|
delay(1000000);
|
2018-03-07 23:01:27 +00:00
|
|
|
GPIO_C->pin_set(LED_PIN);
|
2018-03-07 16:06:25 +00:00
|
|
|
delay(100000);
|
2018-03-07 23:01:27 +00:00
|
|
|
GPIO_C->pin_clear(LED_PIN);
|
2018-03-07 16:06:25 +00:00
|
|
|
delay(100000);
|
2018-03-07 23:01:27 +00:00
|
|
|
GPIO_C->pin_set(LED_PIN);
|
2018-03-07 16:06:25 +00:00
|
|
|
delay(100000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|