qclk/mcu/main.c

27 lines
474 B
C
Raw Normal View History

2024-05-09 20:29:14 +01:00
#include <stdio.h>
2024-05-11 00:57:43 +01:00
2024-05-09 20:29:14 +01:00
#include "hardware/gpio.h"
2024-05-11 00:57:43 +01:00
#include "pico/stdlib.h"
2024-05-09 20:29:14 +01:00
#include "pico/binary_info.h"
2024-05-11 00:57:43 +01:00
const uint PIN_DIGIT_BASE = 18;
const uint PIN_SEGMENT_BASE = 2;
const uint DIGITS = 4;
2024-05-09 20:29:14 +01:00
int main() {
2024-05-11 00:57:43 +01:00
bi_decl(bi_program_description("qCLK driver."));
2024-05-09 20:29:14 +01:00
stdio_init_all();
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
while (1) {
gpio_put(LED_PIN, 0);
sleep_ms(250);
gpio_put(LED_PIN, 1);
puts("Hello World\n");
sleep_ms(1000);
}
}