ADT7410 ドライバ(I2C I/F)
[詳解]
#include "sysconfig.h"
#include "device.h"
#include "interrupt.h"
#include "tkprintf.h"
#include "str.h"
#include "device/i2c_ioctl.h"
#include "device/envsnsr_ioctl.h"
#include "dkprintf.h"
[ソースコード]
|
#define | REG_TEMP_MSB 0x00 |
|
#define | REG_TEMP_LSB 0x01 |
|
#define | REG_STATUS 0x02 |
|
#define | REG_CONFIG 0x03 |
|
#define | DEV_ADDR 0x48 |
|
|
static int | adt7410_register (struct st_device *dev, char *param) |
|
static int | get_temp (void) |
|
static int | adt7410_ioctl (struct st_device *dev, unsigned int com, unsigned int arg, void *param) |
|
|
static struct st_device * | i2c_dev |
|
static char | dev_name [MAX_DEVNAMELRN] |
|
const struct st_device | adt7410_device |
|
ADT7410 ドライバ(I2C I/F)
- 日付
- 2014.12.14
- 著者
- Takashi SHUDO
adt7410.c に定義があります。
◆ adt7410_device
初期値:= {
.explan = "ATD7410 I2C Temperature Sensor",
.register_dev = adt7410_register,
.ioctl = adt7410_ioctl,
}
#define DEF_DEV_NAME_ENVSNSR
標準環境センサデバイス名
adt7410.c の 102 行目に定義があります。