address has to be inserted twice, otherwise loop from for -> lwr fails, since lwr is 0

This commit is contained in:
tharexde 2020-10-29 00:23:14 +01:00
commit 4c95c16e54

View file

@ -314,7 +314,7 @@ bool detect_4x50_block(void) {
em4x50_data_t etd = {
.pwd_given = false,
.addr_given = true,
.addresses = EM4X50_DEVICE_ID,
.addresses = (EM4X50_DEVICE_ID << 8) | EM4X50_DEVICE_ID,
};
em4x50_word_t words[EM4X50_NO_WORDS];
return (em4x50_read(&etd, words) == PM3_SUCCESS);