2 Copyright 2018 Massdrop Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #define ADC_5V_START_LEVEL 2365
23 #define ADC_5V ADC_INPUTCTRL_MUXPOS_AIN12_Val
24 #define ADC_CON1 ADC_INPUTCTRL_MUXPOS_AIN14_Val
25 #define ADC_CON2 ADC_INPUTCTRL_MUXPOS_AIN13_Val
28 extern uint16_t v_5v_avg;
29 extern uint16_t v_con_1;
30 extern uint16_t v_con_2;
31 extern uint16_t v_con_1_boot;
32 extern uint16_t v_con_2_boot;
34 void ADC0_clock_init(void);