aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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);
}
}