mikroSDK Reference Manual
hal_gpio.h File Reference

Go to the source code of this file.

Data Structures

struct  hal_gpio_t
 GPIO HAL context structure, consisted of the following fields : More...
 

Typedefs

typedef handle_t hal_gpio_base_t
 
typedef hal_ll_gpio_mask_t hal_gpio_mask_t
 
typedef struct hal_gpio_t hal_gpio_pin_t
 
typedef struct hal_gpio_t hal_gpio_port_t
 

Enumerations

enum  hal_gpio_direction_t
 

Functions

void hal_gpio_configure_pin (hal_gpio_pin_t *pin, hal_pin_name_t name, hal_gpio_direction_t direction)
 Configure pin. More...
 
uint8_t hal_gpio_read_pin_input (hal_gpio_pin_t *pin)
 Read pin. More...
 
uint8_t hal_gpio_read_pin_output (hal_gpio_pin_t *pin)
 Read pin. More...
 
void hal_gpio_write_pin_output (hal_gpio_pin_t *pin, uint8_t value)
 Sets pin state. More...
 
void hal_gpio_toggle_pin_output (hal_gpio_pin_t *pin)
 Toggle pin state. More...
 
void hal_gpio_set_pin_output (hal_gpio_pin_t *pin)
 Set pin state high. More...
 
void hal_gpio_clear_pin_output (hal_gpio_pin_t *pin)
 Set pin state low. More...
 
void hal_gpio_configure_port (hal_gpio_port_t *port, hal_port_name_t name, hal_gpio_mask_t mask, hal_gpio_direction_t direction)
 Configure port. More...
 
hal_port_size_t hal_gpio_read_port_input (hal_gpio_port_t *port)
 Read port. More...
 
hal_port_size_t hal_gpio_read_port_output (hal_gpio_port_t *port)
 Read port. More...
 
void hal_gpio_write_port_output (hal_gpio_port_t *port, hal_port_size_t value)
 Sets port state. More...
 

Typedef Documentation

◆ hal_gpio_base_t

typedef handle_t hal_gpio_base_t

Handle type.

◆ hal_gpio_mask_t

typedef hal_ll_gpio_mask_t hal_gpio_mask_t

Mask type.

◆ hal_gpio_pin_t

typedef struct hal_gpio_t hal_gpio_pin_t

Forward declaration of the gpio pin typedef.

◆ hal_gpio_port_t

typedef struct hal_gpio_t hal_gpio_port_t

Forward declaration of the gpio port typedef.

Enumeration Type Documentation

◆ hal_gpio_direction_t

Predefined enum values for for pin direction selection.

Enumerator
HAL_GPIO_DIGITAL_INPUT 

GPIO as digital input.

HAL_GPIO_DIGITAL_OUTPUT 

GPIO as digital output.