当前位置:网站首页>Aura clock chip generation configuration file script
Aura clock chip generation configuration file script
2022-08-04 19:33:00 【Hong Dayu】
[[ -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));
}
边栏推荐
- QCustomPlot 坐标轴间隔显示刻度标签
- 入门:人脸专集1 | 级联卷积神经网络用于人脸检测(文末福利)
- 如何给MySQL添加自定义语法 ?
- MMDetection usage example: from entry to exit
- 02 ts 变量定义,类型
- Embrace the Cmake child is simple and practical, but inflexible
- 华为企业组网实例:VRRP+MSTP典型组网配置
- 四维图新:子公司首款功能安全 MCU 芯片已陆续送样
- 笔记本WIFI无法上网(无Internet访问权限)
- The list of Kubernetes - watch mechanism
猜你喜欢
随机推荐
Regular expression is incomplete
STP实验
【Attention演变史】翻译模型seq2seq (第二弹)
Chrome 开发者工具 performance 标签页的用法
QT 小知识随记
带你了解数据分布式存储原理
如何推动乡村振兴的落地
数据库治理的探索与实践
拥抱Cmake小朋友 简单又实用,但是不灵活
四维图新:子公司首款功能安全 MCU 芯片已陆续送样
如何让远在的老板看到你!----------来自财富中国网
使用.NET简单实现一个Redis的高性能克隆版(二)
MMDetection usage example: from entry to exit
【HCIP】MPLS WPN 实验
TritonVM——基于Recursive STARK的虚拟机
PG网络传输安全SSL介绍及使用示例
我的四周年创作纪念日
VQ Realization of Wavelet Extraction Features
win10 uwp win2d 使用 Path 绘制界面
The difference between Client Side Cache and Server Side Cache