2 * Analog Input RPP API header file.
6 * @copyright Copyright (C) 2013 Czech Technical University in Prague
8 * @author Carlos Jenkins <carlos@jenkins.co.cr>
16 * AIN module initialization.
18 * Call this method before using this module.
20 * @return SUCCESS if initialization successful.\n
21 * FAILURE if module already initialized.
23 int8_t rpp_ain_init();
27 * Get the current analog value on the given pin.
29 * @param[in] pin The pin number to read [1-12].
31 * @return [0-4095] Value representing the analog value on given pin
32 * (ADC is 12bit resolution).\n
33 * -1 if pin number is out of range.
35 int16_t rpp_ain_get(uint8_t pin);
39 * Read and update analog cached values.
41 * @return SUCCESS when transaction was successful.\n
42 * FAILURE if transaction could not be confirmed.
44 int8_t rpp_ain_update();
47 #endif /* __RPP_AIN_H */