blob: 5a06290b5cbb47b8c50acba2004d80355d6cbdea [file] [log] [blame]
brians0ab60bb2013-01-31 02:21:51 +00001#ifndef __ANALOG_H__
2#define __ANALOG_H__
3
Brian Silvermanf92396c2013-09-12 20:13:13 -07004#include <stdint.h>
5
Brian Silverman74acd622013-10-26 14:47:14 -07006// Starts the hardware constantly doing conversions on all 4 of our analog
7// inputs.
Brian Silverman6ad00b82013-03-27 19:02:38 -07008void analog_init(void);
Brian Silverman74acd622013-10-26 14:47:14 -07009
10// Retrieves the most recent reading on channel (0-3).
11// Returns 0xFFFF for invalid channel.
12// 0 means 0V and 0x3FF means 3.3V.
13uint16_t analog(int channel);
Austin Schuh63d0e9b2013-03-27 04:43:14 +000014
Brian Silverman6ad00b82013-03-27 19:02:38 -070015#endif // __ANALOG_H__