Astra MCU SDK Peripheral Driver Library
 
Loading...
Searching...
No Matches
Enumerated Types

Enumerated Type for GPIO Driver. More...

Enumerations

enum  gpio_int_level_en {
  GPIO_INT_LEVEL_LOW = 0 ,
  GPIO_INT_LEVEL_HIGH = 1
}
 Interrupt level or edge selection. More...
 
enum  gpio_status_en {
  GPIO_OK = 0 ,
  GPIO_ERROR = 1 ,
  GPIO_ERROR_BUSY = 2 ,
  GPIO_ERROR_TIMEOUT = 3 ,
  GPIO_ERROR_UNSUPPORTED = 4 ,
  GPIO_ERROR_PARAMETER = 5 ,
  GPIO_ERROR_INVALID_CONFIG = 7 ,
  GPIO_ERROR_INITIALIZED = 8 ,
  GPIO_ERROR_ALL_PINS_UNAVAILABLE = 9 ,
  GPIO_ERROR_PIN_NOT_IN_USE = 10 ,
  GPIO_ERROR_PINS_MUX_NOT_GPIO = 11 ,
  GPIO_ERROR_ILLEGAL_DIRECTION = 12 ,
  GPIO_ERROR_PIN_NOT_IN_PORT = 13 ,
  GPIO_ERROR_NOT_OUTPUT = 14
}
 Return status for GPIO driver. More...
 

Detailed Description

Enumerated Type for GPIO Driver.

Enumeration Type Documentation

◆ gpio_int_level_en

Interrupt level or edge selection.

Enumerator
GPIO_INT_LEVEL_LOW 

Low level or falling edge

GPIO_INT_LEVEL_HIGH 

High level or rising edge

◆ gpio_status_en

Return status for GPIO driver.

This enumeration defines various return and error codes used by the GPIO driver to indicate success, failure, and specific error conditions.

Enumerator
GPIO_OK 

Operation succeeded

GPIO_ERROR 

Unspecified error

GPIO_ERROR_BUSY 

Driver is busy

GPIO_ERROR_TIMEOUT 

Timeout occurred

GPIO_ERROR_UNSUPPORTED 

Operation not supported

GPIO_ERROR_PARAMETER 

Parameter error

GPIO_ERROR_INVALID_CONFIG 

Invalid Configuration

GPIO_ERROR_INITIALIZED 

GPIO device was previously initialized

GPIO_ERROR_ALL_PINS_UNAVAILABLE 

All pins are unavailable

GPIO_ERROR_PIN_NOT_IN_USE 

Write/read to pin that isn't in use

GPIO_ERROR_PINS_MUX_NOT_GPIO 

Pin/pins current mux-function isn't GPIO

GPIO_ERROR_ILLEGAL_DIRECTION 

Pin/pins current mux-function allows pin to be in one direction - GPI/GPO

GPIO_ERROR_PIN_NOT_IN_PORT 

Pin not in particular port

GPIO_ERROR_NOT_OUTPUT 

Pin is not an output pin