RTEMS: General-Purpose IO Interrupt Functions

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Functions
General-Purpose IO Interrupt Functions
Board Support Packages » ARM » Intel Cyclone V » Contributed Code » The General Purpose Input/Output Manager API

## Functions
ALT_STATUS_CODE | alt_gpio_port_int_type_set (ALT_GPIO_PORT_t gpio_pid, uint32_t mask, uint32_t config)
uint32_t | alt_gpio_port_int_type_get (ALT_GPIO_PORT_t gpio_pid, uint32_t mask)
ALT_STATUS_CODE | alt_gpio_port_int_pol_set (ALT_GPIO_PORT_t gpio_pid, uint32_t mask, uint32_t config)
uint32_t | alt_gpio_port_int_pol_get (ALT_GPIO_PORT_t gpio_pid, uint32_t mask)
ALT_STATUS_CODE | alt_gpio_port_int_enable (ALT_GPIO_PORT_t gpio_pid, uint32_t config)
ALT_STATUS_CODE | alt_gpio_port_int_disable (ALT_GPIO_PORT_t gpio_pid, uint32_t config)
uint32_t | alt_gpio_port_int_enable_get (ALT_GPIO_PORT_t gpio_pid)
ALT_STATUS_CODE | alt_gpio_port_int_mask_set (ALT_GPIO_PORT_t gpio_pid, uint32_t mask, uint32_t val)
uint32_t | alt_gpio_port_int_mask_get (ALT_GPIO_PORT_t gpio_pid)
uint32_t | alt_gpio_port_int_status_get (ALT_GPIO_PORT_t gpio_pid)
ALT_STATUS_CODE | alt_gpio_port_int_status_clear (ALT_GPIO_PORT_t gpio_pid, uint32_t clrmask)

## Detailed Description

This functional group contains functions to control and manage the interrupts of the General-Purpose IO modules.

## Function Documentation

## ◆ alt_gpio_port_int_disable()

ALT_STATUS_CODE alt_gpio_port_int_disable | ( | ALT_GPIO_PORT_t | gpio_pid,
|  | uint32_t | config
| ) |  |

Disables the specified GPIO data module interrupt.

Parameters

  gpio_pid | The GPIO port identifier.
  config | Individual bit interrupt enables 0 - Interrupt disabled. 1 - Interrupt enabled.

Return values

  ALT_E_SUCCESS | The operation was successful.
  ALT_E_ERROR | The operation failed.
  ALT_E_BAD_ARG | Bad input argument.

## ◆ alt_gpio_port_int_enable()

ALT_STATUS_CODE alt_gpio_port_int_enable | ( | ALT_GPIO_PORT_t | gpio_pid,
|  | uint32_t | config
| ) |  |

Enables the specified GPIO data input interrupts.

Parameters

  gpio_pid | The GPIO port identifier.
  config | Individual bit interrupt enables 0 - Interrupt disabled. 1 - Interrupt enabled.

Return values

  ALT_E_SUCCESS | The operation was successful.
  ALT_E_ERROR | The operation failed.
  ALT_E_BAD_ARG | Bad input argument.

## ◆ alt_gpio_port_int_enable_get()

uint32_t alt_gpio_port_int_enable_get | ( | ALT_GPIO_PORT_t | gpio_pid | ) |

Returns the current state of the specified GPIO port interrupts enables.

Parameters

  gpio_pid | The GPIO port identifier.

Return values

  uint32_t | The interrupt enable configuration that was read. Individual bits are: 0 = The interrupt for this bit is not enabled. 1 = The interrupt for this bit is enabled.

## ◆ alt_gpio_port_int_mask_get()

uint32_t alt_gpio_port_int_mask_get | ( | ALT_GPIO_PORT_t | gpio_pid | ) |

Returns the interrupt mask of the specified GPIO module.

Parameters

  gpio_pid | The GPIO port identifier.

Return values

  uint32_t | The interrupt mask that was read. Individual bits are: 0 = The interrupt for this bit is not masked. 1 = The interrupt for this bit is masked.

## ◆ alt_gpio_port_int_mask_set()

ALT_STATUS_CODE alt_gpio_port_int_mask_set | ( | ALT_GPIO_PORT_t | gpio_pid,
|  | uint32_t | mask,
|  | uint32_t | val
| ) |  |

Masks or unmasks selected interrupt source bits of the data register of the specified GPIO module. Uses a second bit mask to determine which signals may be changed by this call.

Parameters

  gpio_pid | The GPIO port identifier.
  mask | Which bits to change among the port 0 = Do not change this bit. 1 = Allow this bit to change.
  val | The interrupt mask to write. Individual bits are: 0 = Do not mask the interrupt for this bit (default). 1 = Mask the interrupt for this bit.

Return values

  ALT_E_SUCCESS | The operation was successful.
  ALT_E_ERROR | The operation failed.
  ALT_E_BAD_ARG | Invalid input data.

## ◆ alt_gpio_port_int_pol_get()

uint32_t alt_gpio_port_int_pol_get | ( | ALT_GPIO_PORT_t | gpio_pid,
|  | uint32_t | mask
| ) |  |

Returns the active-high or active-low polarity configuration for the possible interrupt sources of the specified GPIO module.

Parameters

  gpio_pid | The GPIO port identifier.
  mask | The group of bits (where mask bits equal one) to return. Other bits (where mask bits equal zero) are returned as zero. Specify mask = ALT_GPIO_BITMASK (0x1FFFFFFF) to return all the configuration bits of the port.

Return values

  uint32_t | The current polarity configuration. Individual bits are: 0 = The interrupt polarity for this bit is set to active-low or falling-edge mode. 1 = The interrupt polarity for this bit is set to active-high or rising-edge mode.

## ◆ alt_gpio_port_int_pol_set()

ALT_STATUS_CODE alt_gpio_port_int_pol_set | ( | ALT_GPIO_PORT_t | gpio_pid,
|  | uint32_t | mask,
|  | uint32_t | config
| ) |  |

Sets the interrupt polarity of the signals of the specified GPIO register (when used as inputs) to active-high or active-low (for level-sensitive interrupts) or to rising-edge or falling-edge (for edge-sensitive interrupts).

Parameters

  gpio_pid | The GPIO port identifier.
  mask | The group of bits (where mask bits equal one) to apply this operation to. Other bits (where mask bits equal zero) are not changed.
  config | The interrupt polarity configuration to set. Individual bits are: 0 - Set the interrupt polarity for this bit to active-low or falling-edge mode (default). 1 - Set the interrupt polarity for this bit to active-high or rising-edge mode.

Return values

  ALT_E_SUCCESS | The operation was successful.
  ALT_E_ERROR | The operation failed.
  ALT_E_BAD_ARG | Invalid input data.

## ◆ alt_gpio_port_int_status_clear()

ALT_STATUS_CODE alt_gpio_port_int_status_clear | ( | ALT_GPIO_PORT_t | gpio_pid,
|  | uint32_t | clrmask
| ) |  |

Clear the interrupt pending status of selected signals of the specified GPIO register.

Parameters

  gpio_pid | The GPIO port identifier.
  clrmask | The interrupt bits to clear. Individual bits are: 0 - The interrupt for this bit will not be changed. 1 - The interrupt for this bit will be cleared.

Return values

  ALT_E_SUCCESS | The operation was successful.
  ALT_E_ERROR | The operation failed.
  ALT_E_BAD_ARG | Invalid input data.

## ◆ alt_gpio_port_int_status_get()

uint32_t alt_gpio_port_int_status_get | ( | ALT_GPIO_PORT_t | gpio_pid | ) |

Returns the interrupt pending status of all signals of the specified GPIO register.

Parameters

  gpio_pid | The GPIO port identifier.

Return values

  uint32_t | The current interrupt pending status. Individual bits are: 0 - The interrupt for this bit is not pending. 1 - The interrupt for this bit is pending.

## ◆ alt_gpio_port_int_type_get()

uint32_t alt_gpio_port_int_type_get | ( | ALT_GPIO_PORT_t | gpio_pid,
|  | uint32_t | mask
| ) |  |

Returns the interrupt configuration (edge-triggered or level-triggered) for the specified bits of the specified GPIO module.

Parameters

  gpio_pid | The GPIO port identifier.
  mask | The group of bits (where mask bits equal one) to return. Other bits (where mask bits equal zero) are returned as zero. Specify mask = ALT_GPIO_BITMASK (0x1FFFFFFF) to return all configuration bits of the port.

Return values

  uint32_t | The current interrupt source configuration. Individual bits are: 0 - The interrupt for this bit is set to be level-sensitive. 1 - The interrupt for this bit is set to be edge-sensitive.

## ◆ alt_gpio_port_int_type_set()

ALT_STATUS_CODE alt_gpio_port_int_type_set | ( | ALT_GPIO_PORT_t | gpio_pid,
|  | uint32_t | mask,
|  | uint32_t | config
| ) |  |

Sets edge-triggered or level-triggered interrupt configuration for the specified signals of the specified GPIO module.

Parameters

  gpio_pid | The GPIO port identifier.
  mask | The group of bits (where mask bits equal one) to apply this operation to. Other bits (where mask bits equal zero) are not changed. Specify mask = ALT_GPIO_BITMASK (0x1FFFFFFF) to configure all interrupt type bits of the port.
  config | The interrupt configuration to write. Individual bits are: 0 - Set the interrupt for this bit to be level-sensitive (default). 1 - Set the interrupt for this bit to be edge-sensitive.

Return values

  ALT_E_SUCCESS | The operation was successful.
  ALT_E_ERROR | The operation failed.
  ALT_E_BAD_ARG | Invalid input data.