GadgetSeed  0.9.6
rx8025.c ファイル

RX-8025ドライバ [詳解]

#include "device.h"
#include "device/i2c_ioctl.h"
#include "device/rtc_ioctl.h"
#include "datetime.h"
#include "tkprintf.h"
#include "system.h"
rx8025.c の依存先関係図:

[ソースコード]

マクロ定義

#define DEV_ADDR   0x32
 
#define BCD2BIN(x)   (((((x) & 0xf0)>>4) * 10) + ((x) & 0x0f))
 
#define BIN2BCD(x)   (((((x)/10) % 10)<<4) + ((x) % 10))
 

関数

static int rx8025_register (struct st_device *dev, char *param)
 
static int rtc_set (struct st_datetime *tp)
 
static int rtc_get (struct st_datetime *tp)
 
static int rx8025_ioctl (struct st_device *dev, unsigned int com, unsigned int arg, void *param)
 

変数

static const char def_v_dev [] = DEF_DEV_NAME_I2C
 
static struct st_devicei2c_dev
 
const struct st_device rx8025_device
 

詳解

RX-8025ドライバ

日付
2015.07.20
著者
Takashi SHUDO

リアルタイムクロック(RX-8025)ドライバ

下位にI2Cドライバを使用する。

rx8025.c に定義があります。

変数詳解

◆ rx8025_device

const struct st_device rx8025_device
初期値:
= {
.explan = "RX-8025 RTC(I2C)",
.register_dev = rx8025_register,
.ioctl = rx8025_ioctl,
}
#define DEF_DEV_NAME_RTC
標準リアルタイムクロックデバイス名
Definition: rtc_ioctl.h:15

rx8025.c130 行目に定義があります。