AsDevices
From ArmadeusWiki
Page under construction...
Informations on this page are not guaranteed !!
AsDevices is an ARMadeus specific library that simplify apf-board devices usages for developer. This library is written to be use with C, C++ and Python languages.
Install AsDevices on target
The library is included in buildroot menu, to use it just select it in «make menuconfig» :
Package Selection for the target --->
*** Armadeus specific packages ***
[*] as_devices
[*] wrapper C++
[*] wrapper Python
The base library is in C, to use it with C++ or Python, select the wrapper you want.
Use library in an application
In C
In C++
In Python
To use AsDevices library in python, select the Python wrapper in menuconfig then, on platform, import the module :
>>> import AsDevicesAll python classes available in the module can be found with dir() function :
>>> dir(AsDevices)
['Apf27Pwm', 'Apf27PwmError', 'NUMBER_OF_PWM', '__author__', '__builtins__', '__doc__', '__file__', '__name__', '__path__', '__versionTime__', '__version__', 'wrappers']Devices supported by library
PWM
Development planning
AsDevices is not finished, following tabular indicate the remaining work:
| Name | C functions | C++ wrapper | Python wrapper | Python class |
description |
|---|---|---|---|---|---|
| apf27_pwm | OK | OK | OK | OK | Drive imx27 pwm |
| i2c | NOK | NOK | NOK | NOK | Drive I2C |
| apf27_gpio | NOK | NOK | NOK | NOK | Drive imx27 GPIO |
| ad5258 | NOK | NOK | NOK | NOK | Drive Digital potentiometer AD5258 |
| ds1374 | NOK | NOK | NOK | NOK | Drive RTC chip DS1374 |
| max1027 | NOK | NOK | NOK | NOK | Drive Analog to Digital chip MAX1027 |
| max5821 | NOK | NOK | NOK | NOK | Drive Digital to Analog chip MAX5821 |