3. Interfaces
This section covers basic information on how to access the device hardware. Most of the hardware is accessed using the default Linux interfaces but some specific interfaces may require additional functions to be accessed.
Table 1 lists the API used to access each interface. These interfaces can be grouped into two categories; Standard operating system libraries (Std. API) and CCAux Library (CCAux API).
See also the operating system specific sections and additional documentation describing the software API.
Functionality |
Std. API |
CCAux API |
Comment |
---|---|---|---|
CAN |
√ |
SocketCAN available through Linux. |
|
Ethernet |
√ |
Standard Linux kernel drivers. |
|
USB |
√ |
Standard Linux kernel drivers. |
|
RS232 |
√ |
Standard Linux kernel drivers. |
|
RS485 |
√ |
Standard Linux kernel drivers. |
|
Digital video |
√ |
QtMultimedia, gstreamer |
|
Digital output |
√ |
||
PWM output |
√ |
||
Configurable input |
√ |
||
Analog input |
√ |
||
Status indicator |
√ |
||
Backlight |
√ |
||
Ambient light sensor |
√ |
||
Buzzer |
√ |
||
Power management |
√ |
Your device might not support all interfaces stated here. See the Product Leaflet or Technical Manual of your device for a complete list of available interfaces.
3.1 Standard libraries
Most interfaces are accessed using standard libraries and access methods. Various access methods are possible to be used depending on the development environment and additional installed frameworks.
The standard libraries used for Linux are described in their respective documentation sources, such as MAN pages.
3.2 CCAux library
The CCAux API gives access to several hardware specific interfaces. The API functions of this library are documented in the CCAux API documentation.
Table 2 gives a brief introduction on the API’s found therein and their functions. Most API functions can be used from the pre-installed CCSettingsConsole application as well.
API |
Description |
V700 |
V1x00 |
Vx10 |
Yukon |
X1200 |
---|---|---|---|---|---|---|
About |
Hardware information API related to the hardware configurations. |
Yes |
Yes |
Yes |
Yes |
Yes |
Adc |
Read built in ADC voltage information. |
Yes |
Yes |
Yes |
Yes |
Yes |
AuxVersion |
Read firmware version information. |
Yes |
Yes |
Yes |
Yes |
Yes |
Backlight |
Control display backlight settings and configure automatic backlight functionality. |
Yes |
Yes |
Yes |
Yes |
Yes |
Buzzer |
Control the built-in buzzer. |
Yes |
Yes |
Yes |
Yes |
Yes |
CfgIn |
Get/set state of configurable input signals. |
No |
No |
Yes |
Yes |
No |
Config |
Control internal and external power up and power down settings and time configurations, including power button and on/off signal configurations. |
Yes |
Yes |
Yes |
Yes |
Yes |
Diagnostic |
Get run time information about the device. |
Yes |
Yes |
Yes |
Yes |
Yes |
Firmware-Update |
Update/verify System Supervisor (SS) and other firmware. |
Yes |
Yes |
Yes |
Yes |
Yes |
FrontLED |
Override the default LED behavior. |
Yes |
Yes |
Yes |
Yes |
Yes |
LightSensor |
Read the light sensor values and get raw and/or calculated values. |
Yes |
Yes |
Yes |
Yes |
Yes |
Power |
Read power status and control functions for advanced shut down behavior. |
Yes |
Yes |
Yes |
Yes |
Yes |
PWMOut |
Get/set state and settings of PWM Output signals. |
No |
No |
Yes |
Yes |
No |
Button |
Configure the buttons on the side of the display and their LEDs |
No |
No |
Yes |
Yes |
Yes |
1 Consider careful usage for these functions, erroneous usage can result in a non-functional device.
3.3 CCAux API calling convention
The standard way to call CCAux API functions is shown below. Please adhere to this calling convention. Example code snippets for each function are available in the CCAux API documentation. Moreover, chapter 6.1 gives an example on how to call the CCAux API in order to set the front LED color.
/* Usage in CCAux API 2.x */
#include “Module.h”
MODULEHANDLE pModule = CrossControl::GetModule();
eErr err = Module_function_1(pModule, arg, …);
Module_release(pModule);