Common Driver Definitions

Definitions common in all driver interfaces (Driver_Common.h)


Status Error Codes
Negative return values of functions indicate errors occurred during execution.

Data Structures

 Driver Version.


 General power states.


Definitions common in all driver interfaces (Driver_Common.h)

The following definitions are common in all CMSIS-Driver interfaces. Refer to Common Driver Functions for a general overview.

Data Structure Documentation


Driver Version.

The access structure of each CMSIS-Driver provides the function GetVersion, which returns in the struct ARM_DRIVER_VERSION:

  • API version, which is the version of the CMSIS-Driver specification used to implement this driver.
  • Driver version, which is the source code version of the actual driver implementation.

The version is encoded as 16-bit unsigned value (uint16_t) with:

  • high-byte: major version.
  • low-byte: minor version.

For example, version 1.12 is encoded as 0x10C.

Data Fields
uint16_t api API version.
uint16_t drv Driver version.

Enumeration Type Documentation

General power states.

The access structure of each CMSIS-Driver provides the function PowerControl, which handles the power profile for a peripheral using the parameter ARM_POWER_STATE. Depending on this parameter, the peripheral will operate at full speed, detect just events, or is completely un-powered.

Refer to Function Call Sequence for more information.


Power off: no operation possible.


Low Power mode: retain state, detect and signal wake-up events.


Power on: full operation at maximum performance.