54 throw std::invalid_argument(
"Invalid AIO pin specified - do you have an ADC?");
65 Aio(
void* aio_context)
69 throw std::invalid_argument(
"Invalid AIO context");
91 throw std::invalid_argument(
"Unknown error in Aio::read()");
93 return (
unsigned int) x;
106 throw std::invalid_argument(
"Unknown error in Aio::readFloat()");
Result
Definition: types.hpp:204
mraa_result_t mraa_aio_close(mraa_aio_context dev)
int getBit()
Definition: aio.hpp:127
Aio(void *aio_context)
Definition: aio.hpp:65
API to Analog IO.
Definition: aio.hpp:41
int mraa_aio_get_bit(mraa_aio_context dev)
unsigned int read()
Definition: aio.hpp:87
struct _aio * mraa_aio_context
Definition: aio.h:51
float readFloat()
Definition: aio.hpp:102
Aio(int pin)
Definition: aio.hpp:50
float mraa_aio_read_float(mraa_aio_context dev)
mraa_result_t mraa_aio_set_bit(mraa_aio_context dev, int bits)
mraa_aio_context mraa_aio_init(unsigned int pin)
Result setBit(int bits)
Definition: aio.hpp:117
~Aio()
Definition: aio.hpp:75
int mraa_aio_read(mraa_aio_context dev)