RTEMS 6.1-rc1
Functions

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_pidThe GPIO port identifier.
configIndividual bit interrupt enables
0 - Interrupt disabled.
1 - Interrupt enabled.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGBad 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_pidThe GPIO port identifier.
configIndividual bit interrupt enables
0 - Interrupt disabled.
1 - Interrupt enabled.
Return values
ALT_E_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGBad 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_pidThe GPIO port identifier.
Return values
uint32_tThe 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_pidThe GPIO port identifier.
Return values
uint32_tThe 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_pidThe GPIO port identifier.
maskWhich bits to change among the port
0 = Do not change this bit.
1 = Allow this bit to change.
valThe 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_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGInvalid 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_pidThe GPIO port identifier.
maskThe 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_tThe 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_pidThe GPIO port identifier.
maskThe group of bits (where mask bits equal one) to apply this operation to. Other bits (where mask bits equal zero) are not changed.
configThe 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_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGInvalid 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_pidThe GPIO port identifier.
clrmaskThe 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_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGInvalid 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_pidThe GPIO port identifier.
Return values
uint32_tThe 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_pidThe GPIO port identifier.
maskThe 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_tThe 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_pidThe GPIO port identifier.
maskThe 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.
configThe 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_SUCCESSThe operation was successful.
ALT_E_ERRORThe operation failed.
ALT_E_BAD_ARGInvalid input data.