|
一开始提示'uint8_t' does not name a type
网上找到说是加#include <stdint.h>
好了。
然后提示好多错误
Arduino:1.8.13 (Windows 10), 开发板:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
In file included from d:\Arduino\libraries\DS3231\DS3231.cpp:23:
d:\Arduino\libraries\DS3231\DS3231.h:95:18: error: 'byte' has not been declared
95 | void setOutput(byte enable);
| ^~~~
d:\Arduino\libraries\DS3231\DS3231.h:103:3: error: 'boolean' does not name a type; did you mean 'bool'?
103 | boolean _use_hw;
| ^~~~~~~
| bool
d:\Arduino\libraries\DS3231\DS3231.h:105:19: error: 'byte' has not been declared
105 | void _sendStart(byte addr);
| ^~~~
d:\Arduino\libraries\DS3231\DS3231.cpp:327:6: error: no declaration matches 'void DS3231::setOutput(byte)'
327 | void DS3231::setOutput(byte enable)
| ^~~~~~
In file included from d:\Arduino\libraries\DS3231\DS3231.cpp:23:
d:\Arduino\libraries\DS3231\DS3231.h:95:8: note: candidate is: 'void DS3231::setOutput(int)'
95 | void setOutput(byte enable);
| ^~~~~~~~~
d:\Arduino\libraries\DS3231\DS3231.h:77:7: note: 'class DS3231' defined here
77 | class DS3231
| ^~~~~~
d:\Arduino\libraries\DS3231\DS3231.cpp:352:6: error: no declaration matches 'void DS3231::_sendStart(byte)'
352 | void DS3231::_sendStart(byte addr)
| ^~~~~~
In file included from d:\Arduino\libraries\DS3231\DS3231.cpp:23:
d:\Arduino\libraries\DS3231\DS3231.h:105:8: note: candidate is: 'void DS3231::_sendStart(int)'
105 | void _sendStart(byte addr);
| ^~~~~~~~~~
d:\Arduino\libraries\DS3231\DS3231.h:77:7: note: 'class DS3231' defined here
77 | class DS3231
| ^~~~~~
exit status 1
为开发板 NodeMCU 1.0 (ESP-12E Module) 编译时出错。
这如何搞定。。。
附件是我下载到的DS3231库
DS3231.zip
(378.7 KB, 下载次数: 6)
|
|