raspikeyer/pico_keyer.cpp

33 lines
541 B
C++
Raw Normal View History

2024-02-06 15:50:50 +01:00
#include <stdio.h>
2024-02-07 09:32:11 +01:00
#include <pico/stdlib.h>
2024-02-06 15:50:50 +01:00
2024-02-06 22:11:58 +01:00
#include "settings.h"
namespace
{
2024-02-06 16:16:18 +01:00
}
2024-02-06 15:50:50 +01:00
int main()
{
stdio_init_all();
2024-02-06 22:11:58 +01:00
sleep_ms(1000);
2024-02-06 15:50:50 +01:00
puts("Hello, world!");
2024-02-07 09:32:11 +01:00
Settings settings;
settings.mode = Mode::IAMBIC_A;
store_settings(settings);
2024-02-07 09:34:03 +01:00
printf("Iambic mode (stored): %d\n", static_cast<int>(settings.mode));
2024-02-07 09:32:11 +01:00
sleep_ms(1000);
Settings newSettings = read_settings();
2024-02-07 09:34:03 +01:00
printf("Iambic mode (loaded): %d\n", static_cast<int>(newSettings.mode));
2024-02-07 09:32:11 +01:00
while(true) {
sleep_ms(1000);
}
2024-02-06 15:50:50 +01:00
return 0;
}