small code enhancements

This commit is contained in:
Martin Brodbeck 2024-03-05 09:45:58 +01:00
parent 0089729753
commit 933355e2c5
2 changed files with 10 additions and 11 deletions

View file

@ -7,9 +7,9 @@
#include "morse.h"
#include "sidetone.h"
extern const uint LED_PIN;
extern const uint DIT_PADDLE_PIN;
extern const uint DAH_PADDLE_PIN;
extern const uint LED_PIN;
extern const uint BUZZER_PIN;
extern const uint CW_OUT_PIN;
// extern const uint AUDIO_OUT_PIN;

View file

@ -17,15 +17,15 @@
#include "winkeyer.h"
#include <config.h>
extern const uint LED_PIN = PICO_DEFAULT_LED_PIN;
extern const uint DIT_PADDLE_PIN = 14;
extern const uint DAH_PADDLE_PIN = 15;
extern const uint BUZZER_PIN = 18;
extern const uint CW_OUT_PIN = 17;
extern constexpr uint LED_PIN = PICO_DEFAULT_LED_PIN;
extern constexpr uint DIT_PADDLE_PIN = 14;
extern constexpr uint DAH_PADDLE_PIN = 15;
// extern const uint AUDIO_OUT_PIN = 16;
extern const uint ADC_PIN = 26;
const uint DISPLAY_DIO_PIN = 20;
const uint DISPLAY_CLK_PIN = 21;
extern constexpr uint CW_OUT_PIN = 17;
extern constexpr uint BUZZER_PIN = 18;
constexpr uint DISPLAY_DIO_PIN = 20;
constexpr uint DISPLAY_CLK_PIN = 21;
extern constexpr uint ADC_PIN = 26;
queue_t keyerQueue;
@ -129,7 +129,7 @@ int main()
bi_decl(bi_1pin_with_name(DISPLAY_DIO_PIN, "[DIO] LED segments data pin"));
bi_decl(bi_1pin_with_name(DISPLAY_CLK_PIN, "[CLK] LED segments clock pin"));
display.displayIambicMode(settings.mode);
//display.displaySpeed(11);
// display.displaySpeed(11);
while (true) {
currentWpm = calcWPM(potiRead(), settings.wpmPotiMin, settings.wpmPotiMax);
@ -141,7 +141,6 @@ int main()
printf("WPM has changed to: %d\n", currentWpm);
lastWpm = currentWpm;
display.displaySpeed(currentWpm);
}
tud_task(); // Internal PICO purposes