|
mraa
0.6.0
Low Level Skeleton Library for Communication on GNU/Linux platforms
|
AIO is the anlog input & output interface to libmraa. It is used to read or set the voltage applied to an AIO pin.
Go to the source code of this file.
Functions | |
| mraa_aio_context | mraa_aio_init (unsigned int pin) |
| unsigned int | mraa_aio_read (mraa_aio_context dev) |
| mraa_result_t | mraa_aio_close (mraa_aio_context dev) |
| mraa_result_t | mraa_aio_set_bit (mraa_aio_context dev, int bits) |
| int | mraa_aio_get_bit (mraa_aio_context dev) |
Typedefs | |
| typedef struct _aio * | mraa_aio_context |
| mraa_aio_context mraa_aio_init | ( | unsigned int | pin | ) |
Initialise an Analog input device, connected to the specified pin
| pin | Channel number to read ADC inputs |

| unsigned int mraa_aio_read | ( | mraa_aio_context | dev | ) |
Read the input voltage. By default mraa will shift the raw value up or down to a 10 bit value.
| dev | The AIO context |

| mraa_result_t mraa_aio_close | ( | mraa_aio_context | dev | ) |
Close the analog input context, this will free the memory for the context
| dev | The AIO context |

| mraa_result_t mraa_aio_set_bit | ( | mraa_aio_context | dev, |
| int | bits | ||
| ) |
Set the bit value which mraa will shift the raw reading from the ADC to. I.e. 10bits
| dev | the analog input context |
| bits | the bits the return from read should be i.e 10 |

| int mraa_aio_get_bit | ( | mraa_aio_context | dev | ) |
Gets the bit value mraa is shifting the analog read to.
| dev | the analog input context |

| typedef struct _aio* mraa_aio_context |
Opaque pointer definition to the internal struct _aio. This context refers to one single AIO pin on the board.

1.8.7