当前位置:网站首页>奥拉时钟芯片生成配置文件脚本
奥拉时钟芯片生成配置文件脚本
2022-08-04 19:23:00 【洪大宇】
[[ -f $1 ]] && sed "/#/d;s/(//g;s/)//g;s/i2c\.i2cw//g;/^[[:space:]]*$/d;s/\.sleep/ /" $1 || echo "file not exist"
while (fgets(sbuf, sizeof(sbuf), fp_au5329) != NULL) {
if (!strncmp(sbuf, "0x68", 4)) {
sscanf(sbuf, "%x,%x,%x", &empty, &addr, &value);
ret = i2c_smbus_write_byte_data(au5329_dev_fd, addr & 0xFF, value & 0xFF);
printf("w %#x %#x\n", addr, value);
if (ret < 0) {
goto OUT;
}
} else if (!strncmp(sbuf, "time", 4)) {
sscanf(sbuf, "%s %f", empty_str, &time);
usleep((__useconds_t)(time * (1e6)));
printf("sleep %f \n", time);
}
bzero(sbuf, sizeof(sbuf));
}
边栏推荐
猜你喜欢
随机推荐
我的四周年创作纪念日
Pedestrian fall detection experiment based on YOLOV5
ACP-Cloud Computing By Wakin自用笔记(1)云计算基础、虚拟化技术
当前最快的实例分割模型:YOLACT 和 YOLACT++
Polygon zkEVM 基本概念
win10 uwp MVVM 语义耦合
win10 uwp ping
Scala104-Spark.sql的内置日期时间函数
一些性能测试的要点
如何进行自动化测试?【Eolink分享】
【Attention演变史】翻译模型seq2seq (第二弹)
Scala104 - Built-in datetime functions for Spark.sql
华为企业组网实例:VRRP+MSTP典型组网配置
Zip4j使用
Infrared image filtering
Homework 8.3 Thread Synchronization Mutex Condition Variables
动手学深度学习_VggNet
Scala105-Spark.sql中collect_list用法
win10 uwp win2d 使用 Path 绘制界面
Internship: changed the requirements









