C# Класс Controller.DS1307

This class implements a complete driver for the Dallas Semiconductors / Maxim DS1307 I2C real-time clock: http://pdfserv.maxim-ic.com/en/ds/DS1307.pdf
Наследование: IDisposable
Показать файл Открыть проект

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

Метод Описание
DS1307 ( ) : System
DS1307 ( Microsoft.SPOT.Hardware.I2CDevice device ) : System
Dispose ( ) : void

Releases clock resources

GetRAM ( ) : byte[]

Reads the clock's user RAM registers as a block.

ReadRegister ( byte address, int length = 1 ) : byte[]

Reads an arbitrary RTC or RAM register

SetRAM ( byte buffer ) : void

Writes to the clock's user RAM registers as a block

SetSquareWave ( SQWFreq Freq, SQWDisabledOutputControl OutCtrl = SQWDisabledOutputControl.Zero ) : void

Enables / Disables the square wave generation function of the clock. Requires a pull-up resistor on the clock's SQW pin.

WriteRegister ( byte address, byte data ) : void

Writes an arbitrary RTC or RAM register

this ( byte address ) : byte

Приватные методы

Метод Описание
EncodeDate ( System.DateTime value, bool clockHalt, bool hourMode ) : byte[]
ParseDate ( byte clockData ) : System.DateTime

Описание методов

DS1307() публичный Метод

public DS1307 ( ) : System
Результат System

DS1307() публичный Метод

public DS1307 ( Microsoft.SPOT.Hardware.I2CDevice device ) : System
device Microsoft.SPOT.Hardware.I2CDevice
Результат System

Dispose() публичный Метод

Releases clock resources
public Dispose ( ) : void
Результат void

GetRAM() публичный Метод

Reads the clock's user RAM registers as a block.
public GetRAM ( ) : byte[]
Результат byte[]

ReadRegister() публичный Метод

Reads an arbitrary RTC or RAM register
public ReadRegister ( byte address, int length = 1 ) : byte[]
address byte Register address between 0x00 and 0x3f
length int The number of bytes to read
Результат byte[]

SetRAM() публичный Метод

Writes to the clock's user RAM registers as a block
public SetRAM ( byte buffer ) : void
buffer byte A byte buffer of size DS1307_RAM_SIZE
Результат void

SetSquareWave() публичный Метод

Enables / Disables the square wave generation function of the clock. Requires a pull-up resistor on the clock's SQW pin.
public SetSquareWave ( SQWFreq Freq, SQWDisabledOutputControl OutCtrl = SQWDisabledOutputControl.Zero ) : void
Freq SQWFreq Desired frequency or disabled
OutCtrl SQWDisabledOutputControl Logical level of output pin when the frequency is disabled (zero by default)
Результат void

WriteRegister() публичный Метод

Writes an arbitrary RTC or RAM register
public WriteRegister ( byte address, byte data ) : void
address byte Register address between 0x00 and 0x3f
data byte
Результат void

this() публичный Метод

public this ( byte address ) : byte
address byte
Результат byte