Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
hal_gpio.h File Reference

This file contains all the functions prototypes for the GPIO library. More...

#include <stdint.h>
#include "hal_target.h"
Include dependency graph for hal_gpio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Typedefs

typedef handle_t hal_gpio_base_t
 Handle type. More...
 
typedef hal_ll_gpio_mask_t hal_gpio_mask_t
 Mask type. More...
 
typedef struct hal_gpio_t hal_gpio_t
 GPIO HAL context structure, consisted of the following fields : More...
 
typedef struct hal_gpio_t hal_gpio_pin_t
 Forward declaration of the gpio pin typedef. More...
 
typedef struct hal_gpio_t hal_gpio_port_t
 Forward declaration of the gpio port typedef. More...
 

Enumerations

enum  hal_gpio_direction_t { HAL_GPIO_DIGITAL_INPUT = 0 , HAL_GPIO_DIGITAL_OUTPUT = 1 }
 

Functions

void hal_gpio_configure_pin (hal_gpio_pin_t *pin, hal_pin_name_t name, hal_gpio_direction_t direction)
 Configure pin. More...
 
void hal_gpio_deregister_pin (hal_gpio_pin_t *pin)
 De-register a 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...
 

Detailed Description

This file contains all the functions prototypes for the GPIO library.

Typedef Documentation

◆ hal_gpio_base_t

Handle type.

◆ 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.

◆ hal_gpio_t

typedef struct hal_gpio_t hal_gpio_t

GPIO HAL context structure, consisted of the following fields :

User needs to specify values herein.

Note
The values are specified by hal_gpio_configure_pin and hal_gpio_configure_port.
Warning
The contents of the context structure are used by the module and must not be altered. Reading or writing data directly from a control structure by user should be avoided.

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.