PebbleOS
Loading...
Searching...
No Matches
Data Fields
pbl_gpio_port_ops Struct Reference

Port driver operations. More...

#include <gpio.h>

Data Fields

int(* configure )(const struct pbl_gpio_port *port, uint8_t pin, uint32_t flags)
 Configure a pin.
 
int(* get )(const struct pbl_gpio_port *port, uint8_t pin)
 Read a pin.
 
int(* set )(const struct pbl_gpio_port *port, uint8_t pin, bool level)
 Drive a pin.
 

Detailed Description

Port driver operations.

Levels and flags are physical.

Field Documentation

◆ configure

int(* pbl_gpio_port_ops::configure) (const struct pbl_gpio_port *port, uint8_t pin, uint32_t flags)

Configure a pin.

Returns 0 or a negative errno.

◆ get

int(* pbl_gpio_port_ops::get) (const struct pbl_gpio_port *port, uint8_t pin)

Read a pin.

Returns 0 or 1, or a negative errno.

◆ set

int(* pbl_gpio_port_ops::set) (const struct pbl_gpio_port *port, uint8_t pin, bool level)

Drive a pin.

Returns 0 or a negative errno.


The documentation for this struct was generated from the following file: