Loading...
Searching...
No Matches

Default configuration for Texas Instruments PCF857X I2C I/O expanders. More...

Detailed Description

Default configuration for Texas Instruments PCF857X I2C I/O expanders.

Author
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file pcf857x_params.h.

#include "board.h"
#include "pcf857x.h"
#include "saul_reg.h"
#include "saul/periph.h"
+ Include dependency graph for pcf857x_params.h:

Go to the source code of this file.

Variables

static const pcf857x_params_t pcf857x_params []
 Allocate some memory to store the actual configuration.
 
static const pcf857x_saul_gpio_params_t pcf857x_saul_gpio_params []
 Additional meta information to keep in the SAUL registry.
 

Set default configuration parameters

#define PCF857X_PARAM_DEV   I2C_DEV(0)
 device is I2C_DEV(0)
 
#define PCF857X_PARAM_ADDR   (0)
 I2C slave address offset is 0.
 
#define PCF857X_PARAM_EXP   (PCF857X_EXP_PCF8575)
 PCF857X expander variant used depends on enabled pseudomodules.
 
#define PCF857X_PARAM_INT_PIN   (GPIO_UNDEF)
 MCU interrupt pin.
 
#define PCF857X_PARAMS
 Default configuration parameter set.
 
#define PCF857X_SAUL_GPIO_PARAMS
 Example for mapping expander pins to SAUL.
 

Macro Definition Documentation

◆ PCF857X_PARAM_ADDR

#define PCF857X_PARAM_ADDR   (0)

I2C slave address offset is 0.

Definition at line 40 of file pcf857x_params.h.

◆ PCF857X_PARAM_DEV

#define PCF857X_PARAM_DEV   I2C_DEV(0)

device is I2C_DEV(0)

Definition at line 35 of file pcf857x_params.h.

◆ PCF857X_PARAM_EXP

#define PCF857X_PARAM_EXP   (PCF857X_EXP_PCF8575)

PCF857X expander variant used depends on enabled pseudomodules.

Definition at line 46 of file pcf857x_params.h.

◆ PCF857X_PARAM_INT_PIN

#define PCF857X_PARAM_INT_PIN   (GPIO_UNDEF)

MCU interrupt pin.

Definition at line 56 of file pcf857x_params.h.

◆ PCF857X_PARAMS

#define PCF857X_PARAMS
Value:
{ \
.addr = PCF857X_PARAM_ADDR, \
.int_pin = PCF857X_PARAM_INT_PIN, \
},
#define PCF857X_PARAM_INT_PIN
MCU interrupt pin.
#define PCF857X_PARAM_ADDR
I2C slave address offset is 0.
#define PCF857X_PARAM_DEV
device is I2C_DEV(0)
#define PCF857X_PARAM_EXP
PCF857X expander variant used depends on enabled pseudomodules.

Default configuration parameter set.

Definition at line 62 of file pcf857x_params.h.

◆ PCF857X_SAUL_GPIO_PARAMS

#define PCF857X_SAUL_GPIO_PARAMS
Value:
{ \
.dev = 0, \
.gpio = { \
.name = "P00 Output", \
.pin = PCF857X_GPIO_PIN(0, 0), \
.mode = GPIO_OUT, \
} \
}, \
{ \
.dev = 0, \
.gpio = { \
.name = "P01 Input", \
.pin = PCF857X_GPIO_PIN(0, 1), \
.mode = GPIO_IN, \
.flags = 0, \
} \
},
@ GPIO_OUT
select GPIO MASK as output
Definition periph_cpu.h:165
@ GPIO_IN
select GPIO MASK as input
Definition periph_cpu.h:164
#define PCF857X_GPIO_PIN(x, y)
conversion of (port x : pin y) to a pin number
Definition pcf857x.h:300
@ SAUL_GPIO_INIT_CLEAR
set pin inactive after init
Definition periph.h:44

Example for mapping expander pins to SAUL.

Definition at line 79 of file pcf857x_params.h.

Variable Documentation

◆ pcf857x_params

const pcf857x_params_t pcf857x_params[]
static
Initial value:
=
{
}
#define PCF857X_PARAMS
Default configuration parameter set.

Allocate some memory to store the actual configuration.

Definition at line 103 of file pcf857x_params.h.

◆ pcf857x_saul_gpio_params

const pcf857x_saul_gpio_params_t pcf857x_saul_gpio_params[]
static
Initial value:
=
{
}
#define PCF857X_SAUL_GPIO_PARAMS
Example for mapping expander pins to SAUL.

Additional meta information to keep in the SAUL registry.

Definition at line 112 of file pcf857x_params.h.