#include <stdio.h>
#include <linux/types.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <assert.h>
#include <string.h>
#include <linux/i2c.h>
#include <linux/i2c-dev.h>
#include <stdio.h>
#include <map>
#include <string.h>
#include <termios.h>
#include <fcntl.h>
#include <sys/select.h>
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <pthread.h>
#include <semaphore.h>
#include <stdint.h>
#define I2C_BUS "/dev/i2c-1"
#define ISL2108_ADDR 0x6F
static int i2c_write_bytes(int fd, uint8_t slave_addr, uint8_t reg_addr, uint8_t *values, uint8_t len);
typedef struct time_datas
{
int _weeks;
int _weeks_enable; //
int _months;
int _months_enabl
ISL1208时钟芯片 Linux下 i2c 设置报警时钟。
最新推荐文章于 2025-06-11 14:43:46 发布
文章介绍了如何在Linux环境下通过I2C接口与ISL2108通信,实现时间和日期的自动设置,包括十进制转BCD、BCD转十进制以及I2C数据传输函数的应用。

最低0.47元/天 解锁文章
2065

被折叠的 条评论
为什么被折叠?



