2 \defgroup common_drv_gr Common Driver Definitions
3 \brief Definitions common in all driver interfaces (%Driver_Common.h)
5 The following definitions are common in all CMSIS-Driver interfaces. Refer to \ref DriverFunctions
6 for a general overview.
14 The access structure of each CMSIS-Driver provides the function \b PowerControl, which handles the power
15 profile for a peripheral using the parameter \ref ARM_POWER_STATE. Depending on this parameter,
16 the peripheral will operate at full speed, detect just events, or is completely un-powered.
18 Refer to \ref CallSequence for more information.
22 \struct ARM_DRIVER_VERSION
24 The access structure of each CMSIS-Driver provides the function \b GetVersion, which returns in the struct ARM_DRIVER_VERSION:
25 - API version, which is the version of the CMSIS-Driver specification used to implement this driver.
26 - Driver version, which is the source code version of the actual driver implementation.
28 The version is encoded as 16-bit unsigned value (uint16_t) with:
29 - high-byte: major version.
30 - low-byte: minor version.
32 For example, version 1.12 is encoded as 0x10C.
35 \defgroup execution_status Status Error Codes
36 \ingroup common_drv_gr
37 \brief Negative return values of functions indicate errors occurred during execution.
39 Most functions return a status information using negative return values.
40 The following list provides the status error codes that are common in all drivers.
41 The drivers may return also status error codes that are specific to the peripheral.
43 \ref spi_execution_status for SPI driver;
44 \ref usart_execution_status for USART driver;
45 \ref nand_execution_status for NAND driver;
48 The value 0 or positive values indicate that the function execution is completed without any errors.
49 Note that positive values are used to provide for example the number of data items.
52 The function did not execute correct and an unspecified error occurred during execution.
54 \def ARM_DRIVER_ERROR_BUSY
55 The function cannot be executed because the driver is busy with the execution of a conflicting operation.
57 \def ARM_DRIVER_ERROR_TIMEOUT
58 The function execution is terminated because a peripheral did not react within a specific timeout limit.
60 \def ARM_DRIVER_ERROR_UNSUPPORTED
61 The function requested an operation (for example by using an illegal control code) that is not supported.
63 \def ARM_DRIVER_ERROR_PARAMETER
64 A function parameter is incorrect.
66 \def ARM_DRIVER_ERROR_SPECIFIC
67 This value indicates the start of status error codes that are specific to the peripheral driver.
69 \ref spi_execution_status for SPI driver;
70 \ref usart_execution_status for USART driver;