C# Class 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.
Inheritance: IDS1302
Afficher le fichier Open project: cyrusbuilt/MonoPi

Méthodes publiques

Méthode Description
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.

Method Details

DS1302() public méthode

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. ///
Résultat System

Dispose() public méthode

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
Résultat void

ReadClock() public méthode

Reads the clock.
/// This instance has been disposed. ///
public ReadClock ( ) : System.Int32[]
Résultat System.Int32[]

ReadRAM() public méthode

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. ///
Résultat System.UInt32

ReadRTC() public méthode

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. ///
Résultat System.UInt32

WriteClock() public méthode

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. ///
Résultat void

WriteRAM() public méthode

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. ///
Résultat void

WriteRTC() public méthode

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. ///
Résultat void