From eab1a72287410908349edca76702faed7ac0e348 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 13 Apr 2019 15:46:03 +0200 Subject: Enable FAX mode when DTMF sequence detected --- src/glutt-o-logique/pio.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'src/glutt-o-logique') diff --git a/src/glutt-o-logique/pio.c b/src/glutt-o-logique/pio.c index 1069886..ba52282 100644 --- a/src/glutt-o-logique/pio.c +++ b/src/glutt-o-logique/pio.c @@ -317,5 +317,37 @@ void pio_set_gps_epps(int on) } } -#warning "TODO: add output functions for SQ2, DET 1750 and FAX" +void pio_set_fax(int on) +{ + if (on) { + GPIO_SetBits(GPIOC, GPIOC_PIN_FAX); + } + else { + GPIO_ResetBits(GPIOC, GPIOC_PIN_FAX); + } +} + +void pio_set_det_1750(int on) +{ + if (on) { + GPIO_ResetBits(GPIOA, GPIOA_PIN_DET_1750); + } + else { + GPIO_SetBits(GPIOA, GPIOA_PIN_DET_1750); + } +} + +void pio_set_sq2(int on) +{ + if (on) { + GPIO_SetBits(GPIOC, GPIOC_PIN_SQ2); + } + else { + GPIO_ResetBits(GPIOC, GPIOC_PIN_SQ2); + } +} + +#warning "TODO Test SQ2 out" +#warning "TODO Test 1750 out" +#warning "TODO Test FAX out" -- cgit v1.2.3