EVE 1.0
Collaboration diagram for SC16IS7x0 GPIO driver:

Functions

void Sc16OutPort (const struct gpio_ext_t *GpioExt, uint8_t Address, uint16_t Data)
 Synchronous function writes SC16 register asynchronously and waits for the end of the operation. Uses internally by inline functions.
 
uint16_t Sc16InPort (const struct gpio_ext_t *GpioExt, uint8_t Address)
 Synchronous function reads SC16 register asynchronously and waits for the end of the operation. Uses internally by inline functions.
 
static void GpioExtInitSc16 (const struct gpio_ext_t *GpioExt)
 Initialize GPIO expander. More...
 
static void GpioExtDisableSc16 (const struct gpio_ext_t *GpioExt)
 De-initialize IO expander. More...
 
static uint16_t GpioExtInPortSc16 (const struct gpio_ext_t *GpioExt)
 Read 8-bits data from GPIO port. More...
 
static void GpioExtOutPortSc16 (const struct gpio_ext_t *GpioExt, uint16_t Data)
 Write 8-bits data to GPIO port. More...
 
static void GpioExtSetDirectionSc16 (const struct gpio_ext_t *GpioExt, uint16_t Direction)
 Set pins direction to GPIO port. More...
 
static void GpioExtSetPullSelectSc16 (const struct gpio_ext_t *GpioExt, uint16_t PullSelect)
 Select pullup or pulldown for GPIO port. More...
 
static void GpioExtSetPullEnableSc16 (const struct gpio_ext_t *GpioExt, uint16_t PullEnable)
 Enable pullup/pulldown to GPIO port. More...
 
static void GpioExtSetInterruptsSc16 (const struct gpio_ext_t *GpioExt, uint16_t Mask)
 Enable/disable interrupts on input GPIO pins. More...
 
static void GpioExtSetLatchSc16 (const struct gpio_ext_t *GpioExt, uint16_t Mask)
 Enable/disable latching values on input GPIO pins after interrupt until they are read. More...
 
static void GpioExtSetDriveSc16 (const struct gpio_ext_t *GpioExt, uint8_t Values[])
 Set drive level for output pins. More...
 

Variables

const struct gpio_ext_api_t GpioSc16Func
 

Detailed Description

Function Documentation

static void GpioExtInitSc16 ( const struct gpio_ext_t GpioExt)
inlinestatic

Initialize GPIO expander.

Parameters
GpioExtParameters for the IO port expander to be used

Definition at line 474 of file sc16is7x0.h.

static void GpioExtDisableSc16 ( const struct gpio_ext_t GpioExt)
inlinestatic

De-initialize IO expander.

Parameters
GpioExtParameters for the IO port expander to be used

Definition at line 484 of file sc16is7x0.h.

static uint16_t GpioExtInPortSc16 ( const struct gpio_ext_t GpioExt)
inlinestatic

Read 8-bits data from GPIO port.

Parameters
GpioExtParameters for the IO port expander to be used
Returns
Data read

Definition at line 495 of file sc16is7x0.h.

References SC16_REG_IOSTATE, and Sc16InPort().

static void GpioExtOutPortSc16 ( const struct gpio_ext_t GpioExt,
uint16_t  Data 
)
inlinestatic

Write 8-bits data to GPIO port.

Parameters
GpioExtParameters for the IO port expander to be used
DataData to be written to IO expander ports

Definition at line 506 of file sc16is7x0.h.

References SC16_REG_IOSTATE, and Sc16OutPort().

static void GpioExtSetDirectionSc16 ( const struct gpio_ext_t GpioExt,
uint16_t  Direction 
)
inlinestatic

Set pins direction to GPIO port.

Parameters
GpioExtParameters for the IO port expander to be used
DirectionNew direction to be settled: 0 - input, 1 - output

Definition at line 517 of file sc16is7x0.h.

References SC16_REG_IODIR, and Sc16OutPort().

static void GpioExtSetPullSelectSc16 ( const struct gpio_ext_t GpioExt,
uint16_t  PullSelect 
)
inlinestatic

Select pullup or pulldown for GPIO port.

Parameters
GpioExtParameters for the IO port expander to be used
PullSelect0 - pulldown, 1 - pullup

Definition at line 529 of file sc16is7x0.h.

static void GpioExtSetPullEnableSc16 ( const struct gpio_ext_t GpioExt,
uint16_t  PullEnable 
)
inlinestatic

Enable pullup/pulldown to GPIO port.

Parameters
GpioExtParameters for the IO port expander to be used
PullEnable0 - disable, 1 - enable

Definition at line 541 of file sc16is7x0.h.

static void GpioExtSetInterruptsSc16 ( const struct gpio_ext_t GpioExt,
uint16_t  Mask 
)
inlinestatic

Enable/disable interrupts on input GPIO pins.

Parameters
GpioExtParameters for the IO port expander to be used
MaskEach bit represents a pin #0-7, 1 enables interrupt.

Definition at line 553 of file sc16is7x0.h.

References SC16_REG_IOINT, and Sc16OutPort().

static void GpioExtSetLatchSc16 ( const struct gpio_ext_t GpioExt,
uint16_t  Mask 
)
inlinestatic

Enable/disable latching values on input GPIO pins after interrupt until they are read.

Parameters
GpioExtParameters for the IO port expander to be used
MaskEach bit represents a pin #0-7, 1 enables latching.

Definition at line 565 of file sc16is7x0.h.

References SC16_BIT_IOCTRL_IOLATCH, SC16_REG_IOCTRL, Sc16InPort(), and Sc16OutPort().

static void GpioExtSetDriveSc16 ( const struct gpio_ext_t GpioExt,
uint8_t  Values[] 
)
inlinestatic

Set drive level for output pins.

Parameters
GpioExtParameters for the IO port expander to be used.
ValuesArray represents drive for pins #1-7 in percents.

Definition at line 581 of file sc16is7x0.h.

Variable Documentation

const struct gpio_ext_api_t GpioSc16Func

Pointer to GpioSc16Func structure uses to initialize the array of GPIO virtual functions .Func in struct ext_gpio_t GPIO descriptor.