Kenji Arai / mbed-os_TYBLE16

Dependents:   TYBLE16_simple_data_logger TYBLE16_MP3_Air

Embed: (wiki syntax)

« Back to documentation index

GPIO IRQ HAL functions

GPIO IRQ HAL functions
[Hal]

# Defined behavior * gpio_irq_init initializes the GPIO IRQ pin * gpio_irq_init attaches the interrupt handler * gpio_irq_free releases the GPIO IRQ pin * gpio_irq_set enables/disables pin IRQ event * gpio_irq_enable enables GPIO IRQ * gpio_irq_disable disables GPIO IRQ More...

Modules

 GPIO IRQ HAL tests
 

The GPIO IRQ HAL tests ensure driver conformance to defined behaviour.


Functions

int gpio_irq_init (gpio_irq_t *obj, PinName pin, gpio_irq_handler handler, uint32_t id)
 Initialize the GPIO IRQ pin.
void gpio_irq_free (gpio_irq_t *obj)
 Release the GPIO IRQ PIN.
void gpio_irq_set (gpio_irq_t *obj, gpio_irq_event event, uint32_t enable)
 Enable/disable pin IRQ event.
void gpio_irq_enable (gpio_irq_t *obj)
 Enable GPIO IRQ.
void gpio_irq_disable (gpio_irq_t *obj)
 Disable GPIO IRQ.
const PinMap * gpio_irq_pinmap (void)
 Get the pins that support all GPIO IRQ tests.

Detailed Description

# Defined behavior * gpio_irq_init initializes the GPIO IRQ pin * gpio_irq_init attaches the interrupt handler * gpio_irq_free releases the GPIO IRQ pin * gpio_irq_set enables/disables pin IRQ event * gpio_irq_enable enables GPIO IRQ * gpio_irq_disable disables GPIO IRQ

# Undefined behavior * Calling other function before gpio_irq_init


Function Documentation

void gpio_irq_disable ( gpio_irq_t obj )

Disable GPIO IRQ.

This is target dependent, as it might disable the entire port or just a pin

Parameters:
objThe GPIO object
void gpio_irq_enable ( gpio_irq_t obj )

Enable GPIO IRQ.

This is target dependent, as it might enable the entire port or just a pin

Parameters:
objThe GPIO object
void gpio_irq_free ( gpio_irq_t obj )

Release the GPIO IRQ PIN.

Parameters:
objThe gpio object
int gpio_irq_init ( gpio_irq_t obj,
PinName  pin,
gpio_irq_handler  handler,
uint32_t  id 
)

Initialize the GPIO IRQ pin.

Parameters:
objThe GPIO object to initialize
pinThe GPIO pin name
handlerThe handler to be attached to GPIO IRQ
idThe object ID (id != 0, 0 is reserved)
Returns:
-1 if pin is NC, 0 otherwise
const PinMap* gpio_irq_pinmap ( void   )

Get the pins that support all GPIO IRQ tests.

Return a PinMap array of pins that support GPIO IRQ. The array is terminated with {NC, NC, 0}.

Targets should override the weak implementation of this function to provide the actual pinmap for GPIO IRQ testing.

Returns:
PinMap array

Definition at line 24 of file mbed_gpio_irq.c.

void gpio_irq_set ( gpio_irq_t obj,
gpio_irq_event  event,
uint32_t  enable 
)

Enable/disable pin IRQ event.

Parameters:
objThe GPIO object
eventThe GPIO IRQ event
enableThe enable flag