Contiki-NG
CC13xx/CC26xx GPIO HAL implementation

Files

 
 

Macros

#define GPIO_HAL_PIN_STD_INPUT
 < PIN standard input configuration mimicking IOC_STD_INPUT More...
 
#define GPIO_HAL_PIN_STD_INPUT_BM
 PIN standard input configuration mimicking IOC_STD_OUTPUT.
 
#define GPIO_HAL_PIN_STD_OUTPUT
 PIN standard output configuration bitmask.
 

Functions

void gpio_hal_arch_init (void)
 Perform architecture specific gpio initaliaztion. More...
 
void gpio_hal_arch_no_port_pin_set_input (gpio_hal_pin_t pin)
 Configure a pin as GPIO input. More...
 
void gpio_hal_arch_no_port_pin_set_output (gpio_hal_pin_t pin)
 Configure a pin as GPIO output. More...
 
void gpio_hal_arch_no_port_interrupt_enable (gpio_hal_pin_t pin)
 Enable interrupts for a gpio pin. More...
 
void gpio_hal_arch_no_port_interrupt_disable (gpio_hal_pin_t pin)
 Disable interrupts for a gpio pin. More...
 
void gpio_hal_arch_no_port_pin_cfg_set (gpio_hal_pin_t pin, gpio_hal_pin_cfg_t cfg)
 Configure a gpio pin. More...
 
gpio_hal_pin_cfg_t gpio_hal_arch_no_port_pin_cfg_get (gpio_hal_pin_t pin)
 Read the configuration of a GPIO pin. More...
 
gpio_hal_pin_mask_t gpio_hal_arch_no_port_read_pins (gpio_hal_pin_mask_t pins)
 Read multiple pins. More...
 
uint8_t gpio_hal_arch_no_port_read_pin (gpio_hal_pin_t pin)
 Read a GPIO pin. More...
 

Detailed Description

Macro Definition Documentation

◆ GPIO_HAL_PIN_STD_INPUT

#define GPIO_HAL_PIN_STD_INPUT
Value:
(PIN_INPUT_EN | PIN_GPIO_OUTPUT_DIS | \
PIN_NOPULL | PIN_DRVSTR_MIN | PIN_IRQ_DIS)

< PIN standard input configuration mimicking IOC_STD_INPUT

PIN standard input configuration bitmask

Definition at line 61 of file gpio-hal-arch.c.

Function Documentation

◆ gpio_hal_arch_init()

void gpio_hal_arch_init ( void  )

Perform architecture specific gpio initaliaztion.

It is the platform developer's responsibility to provide an implementation.

The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.

Definition at line 162 of file gpio-hal-arch.c.

◆ gpio_hal_arch_no_port_interrupt_disable()

void gpio_hal_arch_no_port_interrupt_disable ( gpio_hal_pin_t  pin)

Disable interrupts for a gpio pin.

Parameters
pinThe GPIO pin number (0...GPIO_HAL_PIN_COUNT - 1)

It is the platform developer's responsibility to provide an implementation.

The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.

Note
Code should not call this function directly. Use GPIO manipulation macros instead.

Definition at line 211 of file gpio-hal-arch.c.

◆ gpio_hal_arch_no_port_interrupt_enable()

void gpio_hal_arch_no_port_interrupt_enable ( gpio_hal_pin_t  pin)

Enable interrupts for a gpio pin.

Parameters
pinThe GPIO pin number (0...GPIO_HAL_PIN_COUNT - 1)

It is the platform developer's responsibility to provide an implementation.

The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.

Note
Code should not call this function directly. Use GPIO manipulation macros instead.

Definition at line 193 of file gpio-hal-arch.c.

◆ gpio_hal_arch_no_port_pin_cfg_get()

gpio_hal_pin_cfg_t gpio_hal_arch_no_port_pin_cfg_get ( gpio_hal_pin_t  pin)

Read the configuration of a GPIO pin.

Parameters
pinThe GPIO pin number (0...GPIO_HAL_PIN_COUNT - 1)
Returns
An OR mask of GPIO_HAL_PIN_CFG_xyz

It is the platform developer's responsibility to provide an implementation.

The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.

Note
Code should not call this function directly. Use GPIO manipulation macros instead.

Definition at line 237 of file gpio-hal-arch.c.

◆ gpio_hal_arch_no_port_pin_cfg_set()

void gpio_hal_arch_no_port_pin_cfg_set ( gpio_hal_pin_t  pin,
gpio_hal_pin_cfg_t  cfg 
)

Configure a gpio pin.

Parameters
pinThe GPIO pin number (0...GPIO_HAL_PIN_COUNT - 1)
cfgThe configuration

cfg is an OR mask of GPIO_HAL_PIN_CFG_xyz

The implementation of this function also has to make sure that pin is configured as software-controlled GPIO.

It is the platform developer's responsibility to provide an implementation.

The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.

Note
Code should not call this function directly. Use GPIO manipulation macros instead.

Definition at line 223 of file gpio-hal-arch.c.

◆ gpio_hal_arch_no_port_pin_set_input()

void gpio_hal_arch_no_port_pin_set_input ( gpio_hal_pin_t  pin)

Configure a pin as GPIO input.

Parameters
pinThe GPIO pin number (0...GPIO_HAL_PIN_COUNT - 1)

The implementation of this function also has to make sure that pin is configured as software-controlled GPIO.

It is the platform developer's responsibility to provide an implementation.

The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.

Note
Code should not call this function directly. Use GPIO manipulation macros instead.

Definition at line 171 of file gpio-hal-arch.c.

◆ gpio_hal_arch_no_port_pin_set_output()

void gpio_hal_arch_no_port_pin_set_output ( gpio_hal_pin_t  pin)

Configure a pin as GPIO output.

Parameters
pinThe GPIO pin number (0...GPIO_HAL_PIN_COUNT - 1)

The implementation of this function also has to make sure that pin is configured as software-controlled GPIO.

It is the platform developer's responsibility to provide an implementation.

The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.

Note
Code should not call this function directly. Use GPIO manipulation macros instead.

Definition at line 182 of file gpio-hal-arch.c.

◆ gpio_hal_arch_no_port_read_pin()

uint8_t gpio_hal_arch_no_port_read_pin ( gpio_hal_pin_t  pin)

Read a GPIO pin.

Parameters
pinThe GPIO pin number (0...GPIO_HAL_PIN_COUNT - 1)
Return values
0The pin is logical low
1The pin is logical high

It is the platform developer's responsibility to provide an implementation.

The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.

Note
Code should not call this function directly. Use GPIO manipulation macros instead.

Definition at line 260 of file gpio-hal-arch.c.

◆ gpio_hal_arch_no_port_read_pins()

gpio_hal_pin_mask_t gpio_hal_arch_no_port_read_pins ( gpio_hal_pin_mask_t  pins)

Read multiple pins.

Parameters
pinsAn ORd pin mask of the pins to read
Return values
AnORd mask of the pins that are high

If the position of the pin in pins is set and the pin is logical high then the position of the pin in the return value will be set. For example, if you pass 0x09 as the value of pins and the return value is 0x08 then pin 3 is logical high and pin 0 is logical low.

It is the platform developer's responsibility to provide an implementation.

The implementation can be provided as a global symbol, an inline function or a function-like macro, as described above.

Note
Code should not call this function directly. Use GPIO manipulation macros instead.

Definition at line 248 of file gpio-hal-arch.c.