#include <errno.h>
#include <stdbool.h>
#include <stdint.h>
#include "kernel_defines.h"
#include "periph/gpio.h"
#include "periph/i2c.h"
#include "saul/periph.h"
#include "event.h"
Go to the source code of this file.
|
#define | PCF857X_GPIO_PIN(x, y) (y) |
| conversion of (port x : pin y) to a pin number
|
|
|
int | pcf857x_init (pcf857x_t *dev, const pcf857x_params_t *params) |
| Initialize the PCF857X I/O expander.
|
|
int | pcf857x_gpio_init (pcf857x_t *dev, uint8_t pin, gpio_mode_t mode) |
| Initialize a PCF857X pin.
|
|
int | pcf857x_gpio_init_int (pcf857x_t *dev, uint8_t pin, gpio_mode_t mode, gpio_flank_t flank, gpio_cb_t isr, void *arg) |
| Initialize a PCF857X pin for external interrupt usage.
|
|
int | pcf857x_gpio_read (pcf857x_t *dev, uint8_t pin) |
| Get the value from PCF857X input pin.
|
|
void | pcf857x_gpio_write (pcf857x_t *dev, uint8_t pin, int value) |
| Write the value to PCF857X input pin.
|
|
void | pcf857x_gpio_clear (pcf857x_t *dev, uint8_t pin) |
| Clear the PCF857X output pin.
|
|
void | pcf857x_gpio_set (pcf857x_t *dev, uint8_t pin) |
| Set the PCF857X output pin.
|
|
void | pcf857x_gpio_toggle (pcf857x_t *dev, uint8_t pin) |
| Toggle the value of the PCF857X output pin.
|
|
void | pcf857x_gpio_irq_enable (pcf857x_t *dev, uint8_t pin) |
| Enable pin interrupt.
|
|
void | pcf857x_gpio_irq_disable (pcf857x_t *dev, uint8_t pin) |
| Disable pin interrupt.
|
|
|
PCF857X I2C slave addresses are defined as an offset to a base address, which depends on the expander used.
The address offset is in the range of 0 to 7.
|
#define | PCF8575_BASE_ADDR (0x20) |
| PCF8575 I2C slave base address.
|
|
#define | PCF8574_BASE_ADDR (0x20) |
| PCF8574 I2C slave base address.
|
|
#define | PCF8574A_BASE_ADDR (0x38) |
| PCF8574A I2C slave base address.
|
|