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
Показать файл Открыть проект

Открытые методы

Метод Описание
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