“RTC DS1307 DS3231库”的版本间的差异

来自YFRobotwiki
跳转至: 导航搜索
第85行: 第85行:
 
::返回:RtcDateTime
 
::返回:RtcDateTime
  
:-[[RtcDS3231.GetTemperature()| GetTemperature()]]
+
:-<font color="forestgreen">GetTemperature()</font>  -- 获取温度
 +
::参数:无
 +
::返回:RtcTemperature
  
:-[[RtcDS3231.Enable32kHzPin()| Enable32kHzPin()]]
+
:-<font color="forestgreen">Enable32kHzPin()</font>  -- 使能32KHZ引脚
 +
::参数:bool enable
 +
::返回:无
  
:-[[RtcDS3231.SetSquareWavePin()| SetSquareWavePin()]]
+
:-<font color="forestgreen">SetSquareWavePin()</font>  -- 设置方波输出引脚
 +
::参数:DS3231SquareWavePinMode pinMode
 +
::返回:无
  
:-[[RtcDS3231.SetSquareWavePinClockFrequency()| SetSquareWavePinClockFrequency()]]
+
:-<font color="forestgreen">SetSquareWavePinClockFrequency()</font>  -- 设置方波输出引脚时钟频率
 +
::参数:DS3231SquareWaveClock freq
 +
::返回:无
  
:-[[RtcDS3231.SetAlarmOne()| SetAlarmOne()]]
+
:-<font color="forestgreen">SetAlarmOne()</font>  -- 设置闹钟1
 +
::参数:const DS3231AlarmOne& alarm
 +
::返回:无
  
:-[[RtcDS3231.SetAlarmTwo()| SetAlarmTwo()]]
+
:-<font color="forestgreen">SetAlarmTwo()</font>  -- 设置闹钟2
 +
::参数:const DS3231AlarmOne& alarm
 +
::返回:无
  
:-[[RtcDS3231.GetAlarmOne()| GetAlarmOne()]]
+
:-<font color="forestgreen">GetAlarmOne()</font>  -- 获取闹钟1
 +
::参数:无
 +
::返回:DS3231AlarmOne
  
:-[[RtcDS3231.GetAlarmTwo()| GetAlarmTwo()]]
+
:-<font color="forestgreen">GetAlarmTwo()</font>  -- 获取闹钟2
 +
::参数:无
 +
::返回:DS3231AlarmTwo
 +
 
 +
:-<font color="forestgreen">LatchAlarmsTriggeredFlags()</font>  -- 获取闹钟2
 +
::参数:无
 +
::返回:DS3231AlarmTwo
  
 
:-[[RtcDS3231.LatchAlarmsTriggeredFlags()| LatchAlarmsTriggeredFlags()]]
 
:-[[RtcDS3231.LatchAlarmsTriggeredFlags()| LatchAlarmsTriggeredFlags()]]
第105行: 第125行:
 
:-[[RtcDS3231.ForceTemperatureCompensationUpdate()| ForceTemperatureCompensationUpdate()]]
 
:-[[RtcDS3231.ForceTemperatureCompensationUpdate()| ForceTemperatureCompensationUpdate()]]
  
:-[[RtcDS3231.GetAgingOffset()| GetAgingOffset()]]
 
  
:-[[RtcDS3231.SetAgingOffset()| SetAgingOffset()]]
+
:-<font color="forestgreen">GetAgingOffset()</font>  -- 获取老化补偿
 +
::参数:无
 +
::返回:int8_t
 +
 
 +
:-<font color="forestgreen">SetAgingOffset()</font>  -- 设置老化补偿
 +
::参数:int8_t
 +
::返回:无
  
:-[[RtcDS3231.getReg()| getReg()]]
+
:-<font color="forestgreen">getReg()</font>  -- 获取老化补偿
 +
::参数:uint8_t regAddress
 +
::返回:uint8_t
  
:-[[RtcDS3231.setReg()| setReg()]]
+
:-<font color="forestgreen">setReg()</font>  -- 设置老化补偿
 +
::参数:uint8_t regAddress, uint8_t regValue
 +
::返回:无
  
  

2016年11月17日 (四) 15:13的版本


RTC_DS1307_DS3231库 -- arduino实时时钟库(已支持ESP8266) GITHUB 工程地址:RTC by Makuna

支持设备

DS1307

Full support including squarewave output pin and memory access -- 全部功能支持,包括方波输出和内存访问

DS3231

Full support including squarewave output pin and alarms. -- 全部功能支持,包括方波输出和闹钟


示例


- DS1307_Memory: This demonstrates how to write and read data from the extended memory of the device. This memory is retained even after the device has lost power./演示如何读写数据从设备的扩展内存。即使设备掉电内存依然保存
- DS1307_Simple: This demonstrates how to set and get the date and time from the device./演示了如何在设备上设置和获取日期和时间
- DS3231_Alarms: This demonstrates how to set the alarms and check when the alarms are triggered. This includes using the squarewave output to trigger an interrupt./演示如何设置闹钟和检查何时触发闹钟。这包含使用方波输出触发一个中断
- DS3231_Simple: This demonstrates how to set and get the date and time from the device./演示如何在设备上设置和获取日期和时间。
- DS3231_StoreIt: This demonstrates how to turn off the Rtc clock so that the onboard battery will last longer./演示如何关闭RTC时钟以保证板载电池能持续更长时间




DS1307

DS1307 函数。

- Begin() -- 初始化
参数:无
返回:无
- GetIsRunning()
- SetIsRunning()
- SetDateTime()
- GetDateTime()
- SetMemory()
- GetMemory()
- SetSquareWavePin()



DS3231

DS3231 函数

- Begin() -- 初始化
参数:无
返回:无
-IsDateTimeValid() -- 检查日期时间是否有效
参数:无
返回:bool
- GetIsRunning()
- SetIsRunning()
-SetDateTime() -- 设置日期时间
参数:const RtcDateTime& dt
返回:无
-GetDateTime() -- 获取日期时间
参数:无
返回:RtcDateTime
-GetTemperature() -- 获取温度
参数:无
返回:RtcTemperature
-Enable32kHzPin() -- 使能32KHZ引脚
参数:bool enable
返回:无
-SetSquareWavePin() -- 设置方波输出引脚
参数:DS3231SquareWavePinMode pinMode
返回:无
-SetSquareWavePinClockFrequency() -- 设置方波输出引脚时钟频率
参数:DS3231SquareWaveClock freq
返回:无
-SetAlarmOne() -- 设置闹钟1
参数:const DS3231AlarmOne& alarm
返回:无
-SetAlarmTwo() -- 设置闹钟2
参数:const DS3231AlarmOne& alarm
返回:无
-GetAlarmOne() -- 获取闹钟1
参数:无
返回:DS3231AlarmOne
-GetAlarmTwo() -- 获取闹钟2
参数:无
返回:DS3231AlarmTwo
-LatchAlarmsTriggeredFlags() -- 获取闹钟2
参数:无
返回:DS3231AlarmTwo
- LatchAlarmsTriggeredFlags()
- ForceTemperatureCompensationUpdate()


-GetAgingOffset() -- 获取老化补偿
参数:无
返回:int8_t
-SetAgingOffset() -- 设置老化补偿
参数:int8_t
返回:无
-getReg() -- 获取老化补偿
参数:uint8_t regAddress
返回:uint8_t
-setReg() -- 设置老化补偿
参数:uint8_t regAddress, uint8_t regValue
返回:无





返回Arduino库菜单

返回首页

更多建议和问题欢迎反馈至 YFRobot论坛