Low level bus data can be accessed from code running on the aDSP, using a POSIX-like API called DSPAL. The header files for this API are maintained on github and are commented with Doxygen formatted documentation in each header file. A description of the API's supported and links to the applicable header files is provided below.
- Serial:
- I2C:
- SPI:
- GPIO:
- Timers: qurt_timer.h
- Power Control: HAP_power.h
The unit test code to verify each DSPAL function also represent good examples for how to call the functions.
This code is also on github
The serial API does not conform to the termios convention for setting data rate through the tcsetattr() function. IOCTL codes are used instead and are described in the header file linked above.
Additional functions for more advanced aDSP operations are available with the prefix qurt_. Timer functions, for example, are available with the qurt_timer prefix and are documented in the qurt_timer.h header file included with the Hexagon SDK.
Using the HAP functions provided by the Hexagon SDK, it is possible to set the power level of the aDSP. This will often lead to reduced I/O latencies. More information on these API's is available in the HAP_power.h header file available in the Hexagon SDK.