Browse Source

Silicon/Maxim: Add comments in Ds1307RtcLib

Add comments to explain the register read and write operation
on Ds1307. These comments have been referred from data sheet:

https://datasheets.maximintegrated.com/en/ds/DS1307.pdf

Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
Pankaj Bansal 4 years ago
parent
commit
b8c04785df
1 changed files with 8 additions and 0 deletions
  1. 8 0
      Silicon/Maxim/Library/Ds1307RtcLib/Ds1307RtcLib.c

+ 8 - 0
Silicon/Maxim/Library/Ds1307RtcLib/Ds1307RtcLib.c

@@ -28,6 +28,11 @@ STATIC EFI_I2C_MASTER_PROTOCOL    *mI2cMaster;
 
 /**
   Read RTC register.
+  Data Read-Slave Transmitter Mode
+
+  <Slave Address> <Word Address (n)> <Slave Address> <Data(n)> <Data(n+1)> <Data(n+2)> <Data(n+X)>
+
+  The first byte is received and handled as in the slave receiver mode.
 
   @param  RtcRegAddr       Register offset of RTC to be read.
 
@@ -69,6 +74,9 @@ RtcRead (
 
 /**
   Write RTC register.
+  Data Write-Slave Receiver Mode
+
+  <Slave Address> <Word Address (n)> <Data(n)> <Data(n+1)> <Data(n+X)>
 
   @param  RtcRegAddr       Register offset of RTC to write.
   @param  Val              Value to be written