当前位置:网站首页>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));
}
边栏推荐
猜你喜欢
随机推荐
Internship: changed the requirements
一些性能测试的要点
华为企业组网实例:VRRP+MSTP典型组网配置
v-model的使用
小波提取特征的VQ实现
WPF 多个 StylusPlugIn 的事件触发顺序
【最新资讯】2022下半年软考新增2个地区公布报名时间
nr part calculation
Orthodontic MIA micro-implant anchorage technology China 10th anniversary exchange meeting was held in Shenyang
Switch node version and switch npm source tool
小软件大作用 | 如何省时省力进行Gerber图层快速对比?
从零开始实现一个简单的CycleGAN项目
Video Object Detection
什么是内部客户服务?
Notepad++更改显示背景
用“绿色计算“技术推动算力可持续发展
电脑一键重装系统内存完整性无法打开怎么办
SQL Server 遇到报错解决办法--更新中
「 WAIC 2022 · 黑客马拉松」蚂蚁财富两大赛题邀你来战!
Openharmony code framework (2) the person that








