diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-04-13 15:46:03 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2019-04-13 15:46:03 +0200 |
commit | eab1a72287410908349edca76702faed7ac0e348 (patch) | |
tree | a9e75b5dd576434494d33cf3463519f4dcd0f4c5 /src/glutt-o-logique | |
parent | 74f34510c6f51b5510a80431369fe61c384c72c1 (diff) | |
download | glutte-o-matic-eab1a72287410908349edca76702faed7ac0e348.tar.gz glutte-o-matic-eab1a72287410908349edca76702faed7ac0e348.tar.bz2 glutte-o-matic-eab1a72287410908349edca76702faed7ac0e348.zip |
Enable FAX mode when DTMF sequence detected
Diffstat (limited to 'src/glutt-o-logique')
-rw-r--r-- | src/glutt-o-logique/pio.c | 34 |
1 files changed, 33 insertions, 1 deletions
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" |