#include <sys/cdefs.h>
#include "opt_platform.h"
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
#include <machine/bus.h>
#include <dev/iicbus/iicbus.h>
#include <dev/iicbus/iiconf.h>
Go to the source code of this file.
|
| __FBSDID ("$FreeBSD$") |
|
static int | pcf8591_set_config (device_t dev) |
|
static int | pcf8591_get_reading (device_t dev, uint8_t *reading) |
|
static int | pcf8591_select_channel (device_t dev, int channel) |
|
static int | pcf8591_channel_sysctl (SYSCTL_HANDLER_ARGS) |
|
static void | pcf8591_start (void *arg) |
|
static int | pcf8591_probe (device_t dev) |
|
static int | pcf8591_attach (device_t dev) |
|
static int | pcf8591_detach (device_t dev) |
|
| DRIVER_MODULE (pcf8591, iicbus, pcf8591_driver, pcf8591_devclass, 0, 0) |
|
| MODULE_DEPEND (pcf8591, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER) |
|
| MODULE_VERSION (pcf8591, 1) |
|
◆ CTRL_AUTOINC_EN
#define CTRL_AUTOINC_EN 0x04 |
◆ CTRL_CH_CONFIG_2_DIFF
#define CTRL_CH_CONFIG_2_DIFF 0x30 |
◆ CTRL_CH_CONFIG_2_SINGLE_1_DIFF
#define CTRL_CH_CONFIG_2_SINGLE_1_DIFF 0x20 |
◆ CTRL_CH_CONFIG_3_DIFF
#define CTRL_CH_CONFIG_3_DIFF 0x10 |
◆ CTRL_CH_CONFIG_4_SINGLE
#define CTRL_CH_CONFIG_4_SINGLE 0x00 |
◆ CTRL_CH_CONFIG_MASK
#define CTRL_CH_CONFIG_MASK 0x30 |
◆ CTRL_CH_SELECT_MASK
#define CTRL_CH_SELECT_MASK 0x03 |
◆ CTRL_OUTPUT_EN
#define CTRL_OUTPUT_EN 0x40 |
◆ __FBSDID()
◆ DRIVER_MODULE()
◆ MODULE_DEPEND()
◆ MODULE_VERSION()
MODULE_VERSION |
( |
pcf8591 |
, |
|
|
1 |
|
|
) |
| |
◆ pcf8591_attach()
static int pcf8591_attach |
( |
device_t |
dev | ) |
|
|
static |
◆ pcf8591_channel_sysctl()
static int pcf8591_channel_sysctl |
( |
SYSCTL_HANDLER_ARGS |
| ) |
|
|
static |
◆ pcf8591_detach()
static int pcf8591_detach |
( |
device_t |
dev | ) |
|
|
static |
◆ pcf8591_get_reading()
static int pcf8591_get_reading |
( |
device_t |
dev, |
|
|
uint8_t * |
reading |
|
) |
| |
|
static |
◆ pcf8591_probe()
static int pcf8591_probe |
( |
device_t |
dev | ) |
|
|
static |
◆ pcf8591_select_channel()
static int pcf8591_select_channel |
( |
device_t |
dev, |
|
|
int |
channel |
|
) |
| |
|
static |
◆ pcf8591_set_config()
static int pcf8591_set_config |
( |
device_t |
dev | ) |
|
|
static |
Definition at line 79 of file pcf8591.c.
References iic_msg::buf, data, dev, iic_msg::flags, IIC_INTRWAIT, IIC_M_WR, iicbus_transfer_excl(), iic_msg::len, pcf8591_softc::sc_addr, pcf8591_softc::sc_cfg, pcf8591_softc::sc_output, and iic_msg::slave.
Referenced by pcf8591_select_channel(), and pcf8591_start().
◆ pcf8591_start()
static void pcf8591_start |
( |
void * |
arg | ) |
|
|
static |
◆ pcf8591_devclass
devclass_t pcf8591_devclass |
|
static |
◆ pcf8591_driver
Initial value:= {
"pcf8591",
}
static device_method_t pcf8591_methods[]
Definition at line 255 of file pcf8591.c.
◆ pcf8591_methods
device_method_t pcf8591_methods[] |
|
static |
Initial value:= {
DEVMETHOD_END
}
static int pcf8591_detach(device_t dev)
static int pcf8591_probe(device_t dev)
static int pcf8591_attach(device_t dev)
Definition at line 246 of file pcf8591.c.