Skip to content
Commit 34e4edc2 authored by Jared Kangas's avatar Jared Kangas Committed by Alberto Escolar
Browse files

drivers: eeprom: emulator: correct improper exponentiation



The top-level driver comment states that a uint16_t is used to store
changes if the EEPROM size is smaller than 64kB, or uint32_t otherwise.
However, the 64kB threshold is represented as 2^16 in the actual code,
which is a bitwise XOR instead of an exponent. This causes a uint16_t
to be used only if the size is less than or equal to 18 bytes. Correct
this by using KB(64) instead of 2^16.

Signed-off-by: default avatarJared Kangas <kangas.jd@gmail.com>
parent f80c75c3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment