当前位置:网站首页>奥拉时钟芯片生成配置文件脚本
奥拉时钟芯片生成配置文件脚本
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));
}
边栏推荐
猜你喜欢
随机推荐
Switch node version and switch npm source tool
[Latest Information] 2 new regions will announce the registration time for the soft exam in the second half of 2022
Usage of collect_list in Scala105-Spark.sql
【CCIG 2022】视觉大模型论坛
Jmeter - Heap配置原因报错Invalid initial heap size: -Xms1024m -Xmx2048mError
WPF 元素裁剪 Clip 属性
从零开始实现一个简单的CycleGAN项目
服务器
图片延迟加载、预加载
Video Object Detection
win10 uwp 动态修改ListView元素布局
T+Cloud:构建新型生意社交网络和营销关系的“智公司”
STP实验
lc marathon 8.3
win10 uwp MVVM 轻量框架
Redis数据库—定义、特点、安装、如何启动与停止
如何进行自动化测试?
EuROC dataset format and related codes
Query the published version records of the APP Store
入门:人脸专集1 | 级联卷积神经网络用于人脸检测(文末福利)