原同学 发表于 2017-8-26 09:15
LZ,请问这一句中的Century是什么作用?
这是头文件中的获取代码,参考DS3231中的相关寄存器参数,时间太久了,你自己查下吧,贴出cpp中的源代码
byte DS3231::getMonth(bool& Century) {
byte temp_buffer;
byte hour;
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.write(uint8_t(0x05));
Wire.endTransmission();
Wire.requestFrom(CLOCK_ADDRESS, 1);
temp_buffer = Wire.read();
Century = temp_buffer & 0b10000000;
return (bcdToDec(temp_buffer & 0b01111111)) ;
}
记录下来,后面好接着使用。8
感谢,正好也想这么做一个。