aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-05-10 10:26:44 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-05-10 10:27:07 +0200
commitcc7b71816bb5cf379cff8e46c691cc5965ba3b82 (patch)
tree7adf97f22095cb070e903a2ba4cd28c64cee52bf /src
parent94da3281b5e2767699db0de76816f836a6770943 (diff)
downloadglutte-o-matic-cc7b71816bb5cf379cff8e46c691cc5965ba3b82.tar.gz
glutte-o-matic-cc7b71816bb5cf379cff8e46c691cc5965ba3b82.tar.bz2
glutte-o-matic-cc7b71816bb5cf379cff8e46c691cc5965ba3b82.zip
Fix tone LED in code and schematics
Diffstat (limited to 'src')
-rw-r--r--src/common/src/Core/main.c8
-rw-r--r--src/glutt-o-logique/pio.c4
2 files changed, 7 insertions, 5 deletions
diff --git a/src/common/src/Core/main.c b/src/common/src/Core/main.c
index f1cf0e7..fc04536 100644
--- a/src/common/src/Core/main.c
+++ b/src/common/src/Core/main.c
@@ -579,16 +579,18 @@ static void exercise_fsm(void __attribute__ ((unused))*pvParameters)
}
+ const int current_tone_1750_status = tone_1750_status();
#ifdef SIMULATOR
- gui_in_tone_1750 =
+ gui_in_tone_1750 = current_tone_1750_status;
#endif
- fsm_input.det_1750 = tone_1750_status();
+ fsm_input.det_1750 = current_tone_1750_status;
+ pio_set_det_1750(current_tone_1750_status);
+
fsm_input.long_1750 = tone_1750_for_5_seconds();
// TODO implement a DTMF controlled state machine for setting SQ2
pio_set_sq2(0);
- pio_set_det_1750(fsm_input.det_1750);
fsm_input.fax_mode = tone_fax_status();
fsm_input.swr_high = swr_error_flag;
fsm_input.hour_is_even = hour_is_even;
diff --git a/src/glutt-o-logique/pio.c b/src/glutt-o-logique/pio.c
index 5e5baf2..08a5905 100644
--- a/src/glutt-o-logique/pio.c
+++ b/src/glutt-o-logique/pio.c
@@ -329,10 +329,10 @@ void pio_set_fax(int on)
void pio_set_det_1750(int on)
{
if (on) {
- GPIO_ResetBits(GPIOA, GPIOA_PIN_DET_1750);
+ GPIO_SetBits(GPIOA, GPIOA_PIN_DET_1750);
}
else {
- GPIO_SetBits(GPIOA, GPIOA_PIN_DET_1750);
+ GPIO_ResetBits(GPIOA, GPIOA_PIN_DET_1750);
}
}