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 \typedef ARM_POWER_STATE 12 \details 13 The access structure of each CMSIS-Driver provides the function \b PowerControl, which handles the power 14 profile for a peripheral using the parameter \ref ARM_POWER_STATE. Depending on this parameter, 15 the peripheral will operate at full speed, detect just events, or is completely un-powered. 16 17 Refer to \ref CallSequence for more information. 18 */ 19 20 /** 21 \struct ARM_DRIVER_VERSION 22 \details 23 The access structure of each CMSIS-Driver provides the function \b GetVersion, which returns in the struct ARM_DRIVER_VERSION: 24 - API version, which is the version of the CMSIS-Driver specification used to implement this driver. 25 - Driver version, which is the source code version of the actual driver implementation. 26 27 The version is encoded as 16-bit unsigned value (uint16_t) with: 28 - high-byte: major version. 29 - low-byte: minor version. 30 31 For example, version 1.12 is encoded as 0x10C. 32 33 34 \defgroup execution_status Status Error Codes 35 \ingroup common_drv_gr 36 \brief Negative return values of functions indicate errors occurred during execution. 37 \details 38 Most functions return a status information using negative return values. 39 The following list provides the status error codes that are common in all drivers. 40 The drivers may return also status error codes that are specific to the peripheral. 41 \sa 42 \ref spi_execution_status for SPI driver; 43 \ref usart_execution_status for USART driver; 44 \ref nand_execution_status for NAND driver; 45 @{ 46 \def ARM_DRIVER_OK 47 The value 0 or positive values indicate that the function execution is completed without any errors. 48 Note that positive values are used to provide for example the number of data items. 49 50 \def ARM_DRIVER_ERROR 51 The function did not execute correct and an unspecified error occurred during execution. 52 53 \def ARM_DRIVER_ERROR_BUSY 54 The function cannot be executed because the driver is busy with the execution of a conflicting operation. 55 56 \def ARM_DRIVER_ERROR_TIMEOUT 57 The function execution is terminated because a peripheral did not react within a specific timeout limit. 58 59 \def ARM_DRIVER_ERROR_UNSUPPORTED 60 The function requested an operation (for example by using an illegal control code) that is not supported. 61 62 \def ARM_DRIVER_ERROR_PARAMETER 63 A function parameter is incorrect. 64 65 \def ARM_DRIVER_ERROR_SPECIFIC 66 This value indicates the start of status error codes that are specific to the peripheral driver. 67 \sa 68 \ref spi_execution_status for SPI driver; 69 \ref usart_execution_status for USART driver; 70 @} 71 */ 72 73 /** 74 @} 75 */ 76