From b5e4df11a5e177827879813c4bdf47b3cbe34928 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 25 Jun 2016 00:00:31 +0200 Subject: Add code to read SWR analog voltages --- src/common/includes/GPIO/analog.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/common/includes/GPIO') 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 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 */ -- cgit v1.2.3