Private
Public Access
2
0

aio: added configuration within platform data.

* Allows for different bit shifting for each platform.
* New functions added for obtaining this information
* mraa_adc_raw_bits
* mraa_adc_supported_bits

* Update board information to include this. AIO module changed to allow
* use of the new board data

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
Thomas Ingleby
2014-06-25 17:32:41 +01:00
parent 9a81b043be
commit e5c7e64cf3
6 changed files with 57 additions and 9 deletions

View File

@@ -419,3 +419,27 @@ mraa_platform_t mraa_get_platform_type()
{
return platform_type;
}
unsigned int
mraa_adc_raw_bits()
{
if (plat == NULL)
return 0;
if (plat->aio_count == 0)
return 0;
return plat->adc_raw;
}
unsigned int
mraa_adc_supported_bits()
{
if (plat == NULL)
return 0;
if (plat->aio_count == 0)
return 0;
return plat->adc_supported;
}