RTC
1 2 3 4 5 6 7 8 9 10
from driver import RTC print("-------------------rtc test--------------------") rtc = RTC() rtc.open() rtc.setTime(21, 3, 19, 18, 25, 8) value = rtc.getTime() print(value) rtc.close() print("-------------------rtc test--------------------")
open
打开并创建RTC 实例
close
关闭RTC实例
getTime
读取RTC 时间视觉数据year, month, date, hr, min, sec
setTime
设置RTC时间数据year, month, date, hr, min, sec