Search found 16 matches

by xiaot
2024年 Mar 18日 19:57
Forum: TuyaOS-Zigbee设备开发
Topic: 适配1820传感,有没有delay(1)延时1us的实现参考
Replies: 7
Views: 305

Re: 适配1820传感,有没有delay(1)延时1us的实现参考

初始化时间很长,测试需要30us左右

by xiaot
2024年 Mar 18日 19:51
Forum: TuyaOS-Zigbee设备开发
Topic: 适配1820传感,有没有delay(1)延时1us的实现参考
Replies: 7
Views: 305

Re: 适配1820传感,有没有delay(1)延时1us的实现参考

执行以下的步骤: for (i = 0; i < 8; i++) { 1. 下拉输出初始化; 2.上拉输入初始化 if (DS18B20_READ()) { //读取电平 data |= 0x80; } } TUYA_GPIO_BASE_CFG_T sel_gpio_cfg = {0}; if(FALSE == in) { sel_gpio_cfg.direct = TUYA_GPIO_OUTPUT; if(high) { sel_gpio_cfg.mode = TUYA_GPIO_PULLDOWN; sel_gpio_cfg.level = TUYA_GPIO_LEVEL_LOW; }els...
by xiaot
2024年 Mar 18日 19:34
Forum: TuyaOS-Zigbee设备开发
Topic: 适配1820传感,有没有delay(1)延时1us的实现参考
Replies: 7
Views: 305

Re: 适配1820传感,有没有delay(1)延时1us的实现参考

好的谢谢,在适配过程中,使用tal_gpio_init接口进行初始化时,发现初始化完成需要30多us的时间,导致不能正常读取到ds18b20的数据,请问这里是什么原因,消耗了这么长时间

by xiaot
2024年 Mar 13日 10:11
Forum: TuyaOS-Zigbee设备开发
Topic: 适配1820传感,有没有delay(1)延时1us的实现参考
Replies: 7
Views: 305

适配1820传感,有没有delay(1)延时1us的实现参考

TLSR8258_TuyaOS-3.8.0,基于tuyaos_demo_meter_socket_tl开发包,想要接1820温度传感,请问有没有delay(1)延时1us的实现参考,

by xiaot
2024年 Feb 26日 10:24
Forum: TuyaOS-Zigbee设备开发
Topic: 无法使用ctype.h中的tolower函数
Replies: 2
Views: 482

Re: 无法使用ctype.h中的tolower函数

好的谢谢 再给到的路径下没找到tolower相关库函数,我这边自己实现吧

by xiaot
2024年 Feb 26日 09:49
Forum: TuyaOS-Zigbee设备开发
Topic: 无法使用ctype.h中的tolower函数
Replies: 2
Views: 482

无法使用ctype.h中的tolower函数

TLSR8258_TuyaOS-3.8.0,开发包demo:tuyaos_demo_meter_socket_tl;因业务需要添加cjson库,编译链接报错:该函数未定义(已包含相关头文件):

by xiaot
2024年 Feb 23日 14:47
Forum: TuyaOS-Zigbee设备开发
Topic: 使用插座开发包,面板控制开关会内存泄漏
Replies: 13
Views: 995

Re: 使用插座开发包,面板控制开关会内存泄漏

请问一下为什么无法直接使用标准C库函数,使用sprintf函数会报错undefined reference to `sprintf'