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:
24
src/mraa.c
24
src/mraa.c
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user