diff options
author | Maximilien Cuony <maximilien@theglu.org> | 2016-06-25 15:56:38 +0200 |
---|---|---|
committer | Maximilien Cuony <maximilien@theglu.org> | 2016-06-25 15:56:38 +0200 |
commit | 59875f3db29e9e52c0258e7543cf7c7c5ee36076 (patch) | |
tree | 63dd770bf97a4d7f39978309cb419fe0a4f70099 /src/common/includes/GPIO/analog.h | |
parent | ddb3a6dafbe47335575e7dc2244c4c783f3b854f (diff) | |
parent | b5e4df11a5e177827879813c4bdf47b3cbe34928 (diff) | |
download | glutte-o-matic-59875f3db29e9e52c0258e7543cf7c7c5ee36076.tar.gz glutte-o-matic-59875f3db29e9e52c0258e7543cf7c7c5ee36076.tar.bz2 glutte-o-matic-59875f3db29e9e52c0258e7543cf7c7c5ee36076.zip |
Merge branch 'master' of github.com:Glutte/glutt-o-matique
Diffstat (limited to 'src/common/includes/GPIO/analog.h')
-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 */ |