summaryrefslogtreecommitdiff
path: root/include/arch/arduino-nano/driver/adc.h
blob: c89f915d6a418cedea85aa0a59f28f4f98dd4e94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright 2020 Daniel Friesel
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */
#ifndef ADC_H
#define ADC_H

#include <stdint.h>

class AVRADC {
	private:
		AVRADC(AVRADC const &copy);

	public:
		AVRADC() {}

		int16_t getTemp_mdegC(int16_t offset = 205);
		uint16_t getVCC_mV();
		uint16_t getPin_mV(uint8_t pin, uint16_t avcc = 0);
};

extern AVRADC adc;

#endif