@@ -54,20 +54,20 @@ public static void Example_BasicUse() {
5454 myDevice . ProbeAddress ( ) ; // You can omit the address if myDevice already has "I2CAddress" set
5555
5656 // Set SPD size to DDR4's EEPROM size (512 bytes)
57- myDevice . SpdSize = Ram . SpdSize . DDR4 ;
57+ myDevice . DataLength = Spd . DataLength . DDR4 ;
5858
5959 // The device can also be initialized in one line, like so:
60- Arduino myOtherDevice = new Arduino ( ReaderSettings , PortName , 80 , Ram . SpdSize . DDR4 ) ;
60+ Arduino myOtherDevice = new Arduino ( ReaderSettings , PortName , 80 , Spd . DataLength . DDR4 ) ;
6161
6262 // Read first byte at offset 0
6363 byte firstByte = Eeprom . ReadByte ( myDevice , 0 ) ;
6464
6565 // Read last byte (located at offset 511, not 512!)
66- byte lastByte = Eeprom . ReadByte ( myDevice , ( ushort ) ( myDevice . SpdSize - 1 ) ) ;
66+ byte lastByte = Eeprom . ReadByte ( myDevice , ( ushort ) ( myDevice . DataLength - 1 ) ) ;
6767
6868 // Read the entire EEPROM, 1 byte at a time
69- byte [ ] spdDump = new byte [ ( int ) myDevice . SpdSize ] ;
70- for ( ushort i = 0 ; i < ( int ) myDevice . SpdSize ; i ++ ) {
69+ byte [ ] spdDump = new byte [ ( int ) myDevice . DataLength ] ;
70+ for ( ushort i = 0 ; i < ( int ) myDevice . DataLength ; i ++ ) {
7171 spdDump [ i ] = Eeprom . ReadByte ( myDevice , i ) ;
7272 }
7373
@@ -100,7 +100,7 @@ public static void Example_TestRealDevice() {
100100 realDevice . Scan ( ) ; //{ 80 }
101101
102102 // Test a real device
103- Arduino myReader = new Arduino ( ReaderSettings , PortName , 0x50 , Ram . SpdSize . DDR4 ) ;
103+ Arduino myReader = new Arduino ( ReaderSettings , PortName , 0x50 , Spd . DataLength . DDR4 ) ;
104104 myReader . Test ( ) ; //true
105105 }
106106
@@ -109,15 +109,15 @@ public static void Example_TestRealDevice() {
109109 /// </summary>
110110 public static void Example_DuplicateRam ( ) {
111111 // Copy SPD contents from one DIMM to another
112- Arduino source = new Arduino ( ReaderSettings , "COM1" , 80 , Ram . SpdSize . DDR4 ) ;
113- Arduino destination = new Arduino ( ReaderSettings , "COM4" , 82 , source . SpdSize ) ;
112+ Arduino source = new Arduino ( ReaderSettings , "COM1" , 80 , Spd . DataLength . DDR4 ) ;
113+ Arduino destination = new Arduino ( ReaderSettings , "COM4" , 82 , source . DataLength ) ;
114114
115- for ( ushort i = 0 ; i < ( int ) source . SpdSize ; i ++ ) {
115+ for ( ushort i = 0 ; i < ( int ) source . DataLength ; i ++ ) {
116116 Eeprom . WriteByte ( destination , i , Eeprom . ReadByte ( source , i ) ) ;
117117 }
118118
119119 // Verify contents
120- for ( ushort i = 0 ; i < ( int ) source . SpdSize ; i ++ ) {
120+ for ( ushort i = 0 ; i < ( int ) source . DataLength ; i ++ ) {
121121 if ( Eeprom . ReadByte ( source , i ) != Eeprom . ReadByte ( destination , i ) ) {
122122 // Mismatched contents detected
123123 }
@@ -129,7 +129,7 @@ public static void Example_DuplicateRam() {
129129 /// </summary>
130130 public static void Example_FixCRC ( ) {
131131
132- Arduino myReader = new Arduino ( ReaderSettings , PortName , 0x52 , Ram . SpdSize . DDR4 ) ;
132+ Arduino myReader = new Arduino ( ReaderSettings , PortName , 0x52 , Spd . DataLength . DDR4 ) ;
133133
134134 // Read first 126 bytes
135135 byte [ ] spdHeader = Eeprom . ReadByte ( myReader , 0 , 126 ) ;
@@ -158,8 +158,8 @@ public static void Example_FixCRC() {
158158 /// Erase SPD contents (fill with 0xFF's)
159159 /// </summary>
160160 public static void Example_EraseSPD ( ) {
161- Arduino myReader = new Arduino ( ReaderSettings , PortName , 0x50 , Ram . SpdSize . DDR4 ) ;
162- for ( ushort i = 0 ; i <= ( int ) myReader . SpdSize ; i ++ ) {
161+ Arduino myReader = new Arduino ( ReaderSettings , PortName , 0x50 , Spd . DataLength . DDR4 ) ;
162+ for ( ushort i = 0 ; i <= ( int ) myReader . DataLength ; i ++ ) {
163163 Eeprom . UpdateByte ( myReader , i , 0xFF ) ;
164164 Console . WriteLine ( i . ToString ( ) ) ;
165165 }
0 commit comments