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

Loading...
Searching...
No Matches
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
  SPI Status Error Codes for SPI driver; USART Status Error Codes for USART driver; NAND Status Error Codes for NAND driver;

## Macro Definition Documentation

## ◆ ARM_DRIVER_OK

#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.

## ◆ ARM_DRIVER_ERROR

#define ARM_DRIVER_ERROR -1

Unspecified error.

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

## ◆ ARM_DRIVER_ERROR_BUSY

#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.

## ◆ ARM_DRIVER_ERROR_TIMEOUT

#define ARM_DRIVER_ERROR_TIMEOUT -3

Timeout occurred.

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

## ◆ ARM_DRIVER_ERROR_UNSUPPORTED

#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.

## ◆ ARM_DRIVER_ERROR_PARAMETER

#define ARM_DRIVER_ERROR_PARAMETER -5

Parameter error.

A function parameter is incorrect.

## ◆ ARM_DRIVER_ERROR_SPECIFIC

#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
  SPI Status Error Codes for SPI driver; USART Status Error Codes for USART driver;