comparison ee2232/ee2232-gen.c @ 2:252e3d37b9e5

ee2232-gen works after checksum bugfix
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 05 Apr 2018 10:20:43 +0000
parents be4cbc0efb7e
children
comparison
equal deleted inserted replaced
1:2312f270fe62 2:252e3d37b9e5
129 eeprom[10] = 0x46; 129 eeprom[10] = 0x46;
130 } 130 }
131 131
132 do_checksum() 132 do_checksum()
133 { 133 {
134 u_short chksum; 134 u_short chksum = 0xAAAA;
135 unsigned n; 135 unsigned n;
136 136
137 for (n = 0; n < 63; n++) { 137 for (n = 0; n < 63; n++) {
138 chksum ^= eeprom[n]; 138 chksum ^= eeprom[n];
139 chksum = (chksum << 1) | (chksum >> 15); 139 chksum = (chksum << 1) | (chksum >> 15);