void delay_RTC (int secs) {
byte x;
while (secs--) {
x = read_CMOS_reg(0); /* read seconds from RTC */
while (read_CMOS_reg(0) == x); /* wait for the next value */
};
}
...全文
754打赏收藏
请各位解释一下下面这段时间延时代码的执行过程?
read_CMOS_reg() 是用来读取CMOS的寄存器的 void delay_RTC (int secs) { byte x; while (secs--) { x = read_CMOS_reg(0); /* read seconds from RTC */ while (read_CMOS_reg(0) == x); /* wait for the next value */ }; }