+ Collaboration diagram for Functions:

Functions

uint16_t app_io_init (app_io_type_t type, app_io_init_t *p_init)
 Initialize the APP GPIO DRIVER according to the specified parameters in the app_io_type_t and app_io_init_t. More...
 
uint16_t app_io_deinit (app_io_type_t type, uint32_t pin)
 De-initialize the GPIOx peripheral. More...
 
app_io_pin_state_t app_io_read_pin (app_io_type_t type, uint32_t pin)
 Read the specified input port pin. More...
 
uint16_t app_io_write_pin (app_io_type_t type, uint32_t pin, app_io_pin_state_t pin_state)
 Set or clear the selected data port bit. More...
 
uint16_t app_io_toggle_pin (app_io_type_t type, uint32_t pin)
 Toggle the specified GPIO pin. More...
 
uint16_t app_io_set_speed (app_io_type_t type, uint32_t pin, app_io_speed_t speed)
 Set the speed of the GPIO. More...
 
uint16_t app_io_set_strength (app_io_type_t type, uint32_t pin, app_io_strength_t strength)
 Set the strength of the GPIO. More...
 
uint16_t app_io_set_intput_type (app_io_type_t type, uint32_t pin, app_io_input_type_t input_type)
 Set the input type of the GPIO. More...
 
uint16_t app_io_event_register_cb (app_io_type_t type, app_io_init_t *p_init, app_io_callback_t io_evt_cb, void *arg)
 Initialize GPIO to interrupt mode and register interrupt callback function. More...
 
uint16_t app_io_event_unregister (app_io_type_t type, uint32_t pin)
 Deinitialize GPIO to normal mode and unregister interrupt. More...
 

Detailed Description

Function Documentation

◆ app_io_deinit()

uint16_t app_io_deinit ( app_io_type_t  type,
uint32_t  pin 
)

De-initialize the GPIOx peripheral.

Parameters
[in]typeGPIO type, See app_io_type_t.
[in]pinThe pin want to De-initialization.
Returns
Result of De-initialization.

◆ app_io_event_register_cb()

uint16_t app_io_event_register_cb ( app_io_type_t  type,
app_io_init_t p_init,
app_io_callback_t  io_evt_cb,
void *  arg 
)

Initialize GPIO to interrupt mode and register interrupt callback function.

Parameters
[in]typeGPIO type, See app_io_type_t.
[in]p_initPointer to app_io_init_t parameter which contains the configuration information for the specified GPIO.
[in]io_evt_cbInterrupt callback function.
[in]argUser parameters.
Returns
Result of register.

◆ app_io_event_unregister()

uint16_t app_io_event_unregister ( app_io_type_t  type,
uint32_t  pin 
)

Deinitialize GPIO to normal mode and unregister interrupt.

Parameters
[in]typeGPIO type, See app_io_type_t.
[in]pinThe pin want to unregister.
Returns
Result of unregister.

◆ app_io_init()

uint16_t app_io_init ( app_io_type_t  type,
app_io_init_t p_init 
)

Initialize the APP GPIO DRIVER according to the specified parameters in the app_io_type_t and app_io_init_t.

Parameters
[in]typeGPIO type.
[in]p_initPointer to app_io_init_t parameter which contains the configuration information for the specified GPIO.
Returns
Result of initialization.

◆ app_io_read_pin()

app_io_pin_state_t app_io_read_pin ( app_io_type_t  type,
uint32_t  pin 
)

Read the specified input port pin.

Parameters
[in]typeGPIO type, See app_io_type_t.
[in]pinThe pin want to read.
Returns
The GPIO state.

◆ app_io_set_intput_type()

uint16_t app_io_set_intput_type ( app_io_type_t  type,
uint32_t  pin,
app_io_input_type_t  input_type 
)

Set the input type of the GPIO.

Parameters
[in]typeGPIO type, See app_io_type_t.
[in]pinThe pin want to toggle.
[in]input_typeGPIO input type, See app_io_input_type_t.
Returns
Result of setting.

◆ app_io_set_speed()

uint16_t app_io_set_speed ( app_io_type_t  type,
uint32_t  pin,
app_io_speed_t  speed 
)

Set the speed of the GPIO.

Parameters
[in]typeGPIO type, See app_io_type_t.
[in]pinThe pin want to set.
[in]speedGPIO speed type, See app_io_speed_t.
Returns
Result of setting.

◆ app_io_set_strength()

uint16_t app_io_set_strength ( app_io_type_t  type,
uint32_t  pin,
app_io_strength_t  strength 
)

Set the strength of the GPIO.

Parameters
[in]typeGPIO type, See app_io_type_t.
[in]pinThe pin want to set.
[in]strengthGPIO strength type, See app_io_strength_t.
Returns
Result of setting.

◆ app_io_toggle_pin()

uint16_t app_io_toggle_pin ( app_io_type_t  type,
uint32_t  pin 
)

Toggle the specified GPIO pin.

Parameters
[in]typeGPIO type, See app_io_type_t.
[in]pinThe pin want to toggle.
Returns
Result of toggle.

◆ app_io_write_pin()

uint16_t app_io_write_pin ( app_io_type_t  type,
uint32_t  pin,
app_io_pin_state_t  pin_state 
)

Set or clear the selected data port bit.

Parameters
[in]typeGPIO type, See app_io_type_t.
[in]pinThe pin want to set or clear.
[in]pin_stateSpecifies the value to be written to the selected bit.
Returns
Result of write.