41 lines
747 B
C++
41 lines
747 B
C++
#include <stdio.h>
|
|
#include <pico/stdlib.h>
|
|
|
|
#include "settings.h"
|
|
|
|
namespace
|
|
{
|
|
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
stdio_init_all();
|
|
sleep_ms(1000);
|
|
gpio_init(LED_PIN);
|
|
gpio_set_dir(LED_PIN, GPIO_OUT);
|
|
gpio_put(LED_PIN, 0);
|
|
|
|
Settings settings;
|
|
settings.mode = Mode::IAMBIC_A;
|
|
settings.wpm = 25;
|
|
|
|
//store_settings(settings);
|
|
|
|
Settings newSettings{read_settings()};
|
|
|
|
printf("Iambic mode (loaded): %d\n", static_cast<int>(newSettings.mode));
|
|
printf("WPM (loaded): %d\n", newSettings.wpm);
|
|
|
|
if (settings.mode == Mode::IAMBIC_A && settings.wpm == 25)
|
|
{
|
|
gpio_put(LED_PIN, 1);
|
|
}
|
|
|
|
while (true)
|
|
{
|
|
sleep_ms(1000);
|
|
}
|
|
|
|
return 0;
|
|
}
|