]> begriffs open source - cmsis/blob - CMSIS/DoxyGen/Driver/src/Driver_Common.c
Aligned develop branch with master after release.
[cmsis] / CMSIS / DoxyGen / Driver / src / Driver_Common.c
1 /**
2 \defgroup common_drv_gr Common Driver Definitions
3 \brief Definitions common in all driver interfaces (%Driver_Common.h)
4 \details
5 The following definitions are common in all CMSIS-Driver interfaces. Refer to \ref DriverFunctions
6 for a general overview.
7 @{
8 */
9
10
11 /**
12 \enum ARM_POWER_STATE
13 \details 
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.
17
18 \if TODO_later
19 The return value of the driver control functions typical returns no just 'status codes'. However this is not reflected yet in the header files - hence the documentation can be confusing.
20 \endif
21
22
23 Refer to \ref CallSequence for more information.
24 */
25
26 /**
27 \struct ARM_DRIVER_VERSION
28 \details
29 The access structure of each CMSIS-Driver provides the function \b GetVersion, which returns in the struct ARM_DRIVER_VERSION:
30  - API version, which is the version of the CMSIS-Driver specification used to implement this driver.
31  - Driver version, which is the source code version of the actual driver implementation.
32
33 The version is encoded as 16-bit unsigned value (uint16_t) with:
34  - high-byte: major version.
35  - low-byte: minor version.
36
37 For example, version 1.12 is encoded as 0x10C.
38
39
40 \defgroup execution_status Status Error Codes
41 \ingroup common_drv_gr
42 \brief Negative return values of functions indicate errors occurred during execution. 
43 \details 
44 Most functions return a status information using negative return values.
45 The following list provides the status error codes that are common in all drivers.
46 The drivers may return also status error codes that are specific to the peripheral.
47 \sa
48 \ref spi_execution_status for SPI driver;
49 \ref usart_execution_status for USART driver;
50 \ref nand_execution_status for NAND driver;
51 @{
52 \def ARM_DRIVER_OK
53 The value 0 or positive values indicate that the function execution is completed without any errors.
54 Note that positive values are used to provide for example the number of data items.
55
56 \def ARM_DRIVER_ERROR
57 The function did not execute correct and an unspecified error occurred during execution.
58
59 \def ARM_DRIVER_ERROR_BUSY
60 The function cannot be executed because the driver is busy with the execution of a conflicting operation.
61
62 \def ARM_DRIVER_ERROR_TIMEOUT
63 The function execution is terminated because a peripheral did not react within a specific timeout limit.
64
65 \def ARM_DRIVER_ERROR_UNSUPPORTED
66 The function requested an operation (for example by using an illegal control code) that is not supported.
67
68 \def ARM_DRIVER_ERROR_PARAMETER
69 A function parameter is incorrect.
70
71 \def ARM_DRIVER_ERROR_SPECIFIC
72 This value indicates the start of status error codes that are specific to the peripheral driver.
73 \sa
74 \ref spi_execution_status for SPI driver;
75 \ref usart_execution_status for USART driver;
76 @}
77 */
78
79 /**
80 @}
81 */