| CMSIS-Driver Version 2.02 Peripheral Interface for Middleware and Application Code

- CMSIS
- CORE
- Driver
- DSP
- RTOS API
- Pack
- SVD

- Main Page
- Usage and Description
- Reference

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
Status Error Codes
Common Driver Definitions

Negative return values of functions indicate errors occurred during execution. More...

## Macros

#define | ARM_DRIVER_OK 0
| Operation succeeded.
#define | ARM_DRIVER_ERROR -1
| Unspecified error.
#define | ARM_DRIVER_ERROR_BUSY -2
| Driver is busy.
#define | ARM_DRIVER_ERROR_TIMEOUT -3
| Timeout occurred.
#define | ARM_DRIVER_ERROR_UNSUPPORTED -4
| Operation not supported.
#define | ARM_DRIVER_ERROR_PARAMETER -5
| Parameter error.
#define | ARM_DRIVER_ERROR_SPECIFIC -6
| Start of driver specific errors.

## Description

Negative return values of functions indicate errors occurred during execution.

Most functions return a status information using negative return values. The following list provides the status error codes that are common in all drivers. The drivers may return also status error codes that are specific to the peripheral.

See Also
  Status Error Codes for SPI driver; Status Error Codes for USART driver; Status Error Codes for NAND driver;

## Macro Definition Documentation

#define ARM_DRIVER_ERROR -1

Unspecified error.

The function did not execute correct and an unspecified error occurred during execution.

#define ARM_DRIVER_ERROR_BUSY -2

Driver is busy.

The function cannot be executed because the driver is busy with the execution of a conflicting operation.

#define ARM_DRIVER_ERROR_PARAMETER -5

Parameter error.

A function parameter is incorrect.

#define ARM_DRIVER_ERROR_SPECIFIC -6

Start of driver specific errors.

This value indicates the start of status error codes that are specific to the peripheral driver.

See Also
  Status Error Codes for SPI driver; Status Error Codes for USART driver;

#define ARM_DRIVER_ERROR_TIMEOUT -3

Timeout occurred.

The function execution is terminated because a peripheral did not react within a specific timeout limit.

#define ARM_DRIVER_ERROR_UNSUPPORTED -4

Operation not supported.

The function requested an operation (for example by using an illegal control code) that is not supported.

#define ARM_DRIVER_OK 0

Operation succeeded.

The value 0 or positive values indicate that the function execution is completed without any errors. Note that positive values are used to provide for example the number of data items.

Referenced by ARM_I2C_Control(), ARM_I2C_Initialize(), ARM_I2C_MasterReceive(), ARM_I2C_MasterTransmit(), ARM_I2C_PowerControl(), ARM_I2C_SlaveReceive(), ARM_I2C_SlaveTransmit(), ARM_I2C_Uninitialize(), ARM_MCI_AbortTransfer(), ARM_MCI_CardPower(), ARM_MCI_Control(), ARM_MCI_GetStatus(), ARM_MCI_Initialize(), ARM_MCI_PowerControl(), ARM_MCI_SendCommand(), ARM_MCI_SetupTransfer(), ARM_MCI_Uninitialize(), ARM_SPI_Control(), ARM_SPI_Initialize(), ARM_SPI_PowerControl(), ARM_SPI_Receive(), ARM_SPI_Send(), ARM_SPI_Transfer(), ARM_SPI_Uninitialize(), ARM_USART_Control(), ARM_USART_Initialize(), ARM_USART_PowerControl(), ARM_USART_Receive(), ARM_USART_Send(), ARM_USART_SetModemControl(), ARM_USART_Transfer(), ARM_USART_Uninitialize(), ARM_USBD_DeviceConnect(), ARM_USBD_DeviceDisconnect(), ARM_USBD_DeviceGetState(), ARM_USBD_DeviceRemoteWakeup(), ARM_USBD_DeviceSetAddress(), ARM_USBD_EndpointConfigure(), ARM_USBD_EndpointStall(), ARM_USBD_EndpointTransfer(), ARM_USBD_EndpointTransferAbort(), ARM_USBD_EndpointUnconfigure(), ARM_USBD_Initialize(), ARM_USBD_PowerControl(), ARM_USBD_ReadSetupPacket(), ARM_USBD_Uninitialize(), ARM_USBH_HCI_Initialize(), ARM_USBH_HCI_PortVbusOnOff(), ARM_USBH_HCI_PowerControl(), ARM_USBH_HCI_Uninitialize(), ARM_USBH_Initialize(), ARM_USBH_PipeDelete(), ARM_USBH_PipeModify(), ARM_USBH_PipeReset(), ARM_USBH_PipeTransfer(), ARM_USBH_PipeTransferAbort(), ARM_USBH_PortReset(), ARM_USBH_PortResume(), ARM_USBH_PortSuspend(), ARM_USBH_PortVbusOnOff(), ARM_USBH_PowerControl(), and ARM_USBH_Uninitialize().