diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-06-25 00:00:31 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-06-25 00:00:31 +0200 |
commit | b5e4df11a5e177827879813c4bdf47b3cbe34928 (patch) | |
tree | 7bad9dbaa542e2646ab9d845e82fe46e0d221fe6 /src/common/includes/GPIO | |
parent | 04cf37f8b416b13484823bb4761928964dcc8b30 (diff) | |
download | glutte-o-matic-b5e4df11a5e177827879813c4bdf47b3cbe34928.tar.gz glutte-o-matic-b5e4df11a5e177827879813c4bdf47b3cbe34928.tar.bz2 glutte-o-matic-b5e4df11a5e177827879813c4bdf47b3cbe34928.zip |
Add code to read SWR analog voltages
Diffstat (limited to 'src/common/includes/GPIO')
-rw-r--r-- | src/common/includes/GPIO/analog.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/common/includes/GPIO/analog.h b/src/common/includes/GPIO/analog.h index 54dfb5d..0c45f0c 100644 --- a/src/common/includes/GPIO/analog.h +++ b/src/common/includes/GPIO/analog.h @@ -23,13 +23,20 @@ */ #pragma once +#include <stdint.h> void analog_init(void); /* Measure the 12V supply voltage, in 0.5V increments. - * Returns 0.0f in case of error */ + * Returns 0.0f in case of error + */ float analog_measure_12v(void); +/* Measure SWR, and return raw values. + * Returns 0 in case of error, 1 in case of success + */ +int analog_measure_swr(uint16_t *forward, uint16_t* reflected); + /* Keep an average of measurements, and decide if the repeater should enter * QRP. Returns 1 if low power must be activated */ |