C# 클래스 CyrusBuilt.MonoPi.RTC.DS1302

A Real-Time Clock (RTC) component for interfacing with a Dallas Semiconductor DS1302 RTC. This wraps the ds1302 module in wiringPi, and thus requires the wiringPi.so lib.
상속: IDS1302
파일 보기 프로젝트 열기: cyrusbuilt/MonoPi

공개 메소드들

메소드 설명
DS1302 ( IRaspiGpio clockPin, IRaspiGpio dataPin, IRaspiGpio csPin ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.RTC.DS1302 class with the clock, data, and chip-select pins.

Dispose ( ) : void

Releases all resource used by the CyrusBuilt.MonoPi.RTC.DS1302 object.

Call Dispose when you are finished using the CyrusBuilt.MonoPi.RTC.DS1302. The Dispose method leaves the CyrusBuilt.MonoPi.RTC.DS1302 in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.RTC.DS1302 so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.RTC.DS1302 was occupying.

ReadClock ( ) : System.Int32[]

Reads the clock.

ReadRAM ( Int32 address ) : UInt32

Reads data from the specified RTC register.

ReadRTC ( Int32 register ) : UInt32

Reads a value from an RTC register or RAM location.

WriteClock ( Int32 data ) : void

Writes to the clock.

WriteRAM ( Int32 address, UInt32 data ) : void

Writes a value to the specified RAM address.

WriteRTC ( Int32 register, UInt32 data ) : void

Writes a value to an RTC register or RAM location.

메소드 상세

DS1302() 공개 메소드

Initializes a new instance of the CyrusBuilt.MonoPi.RTC.DS1302 class with the clock, data, and chip-select pins.
public DS1302 ( IRaspiGpio clockPin, IRaspiGpio dataPin, IRaspiGpio csPin ) : System
clockPin IRaspiGpio /// The GPIO pin to use for the clock. ///
dataPin IRaspiGpio /// The GPIO pin to use for data. ///
csPin IRaspiGpio /// The GPIO pin to use for chip-select. ///
리턴 System

Dispose() 공개 메소드

Releases all resource used by the CyrusBuilt.MonoPi.RTC.DS1302 object.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.RTC.DS1302. The Dispose method leaves the CyrusBuilt.MonoPi.RTC.DS1302 in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.RTC.DS1302 so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.RTC.DS1302 was occupying.
public Dispose ( ) : void
리턴 void

ReadClock() 공개 메소드

Reads the clock.
/// This instance has been disposed. ///
public ReadClock ( ) : System.Int32[]
리턴 System.Int32[]

ReadRAM() 공개 메소드

Reads data from the specified RTC register.
/// This instance has been disposed. ///
public ReadRAM ( Int32 address ) : UInt32
address System.Int32 /// The RAM address to read. ///
리턴 System.UInt32

ReadRTC() 공개 메소드

Reads a value from an RTC register or RAM location.
/// This instance has been disposed. ///
public ReadRTC ( Int32 register ) : UInt32
register System.Int32 /// The register or RAM location to read. ///
리턴 System.UInt32

WriteClock() 공개 메소드

Writes to the clock.
/// This instance has been disposed. /// /// is not 8 bytes in length. ///
public WriteClock ( Int32 data ) : void
data System.Int32 /// The byte buffer to write to the clock. ///
리턴 void

WriteRAM() 공개 메소드

Writes a value to the specified RAM address.
/// This instance has been disposed. ///
public WriteRAM ( Int32 address, UInt32 data ) : void
address System.Int32 /// The RAM address to write to. ///
data System.UInt32 /// The value to write. ///
리턴 void

WriteRTC() 공개 메소드

Writes a value to an RTC register or RAM location.
/// This instance has been disposed. ///
public WriteRTC ( Int32 register, UInt32 data ) : void
register System.Int32 /// The register or RAM location to write to. ///
data System.UInt32 /// The data value to write. ///
리턴 void