• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eldruin / eeprom24x-rs / 20
86%

Build:
DEFAULT BRANCH: master
Ran 17 Jan 2019 06:49PM UTC
Jobs 1
Files 2
Run time 5s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
20

push

travis-ci

eldruin
eeprom24x: fix memory addressing for low-end devices

Current implementation assumes that memory address consists of two bytes.
In other words, three consecutive address bytes should be included into
each r/w operation (except read from current address):
- devaddr (i2c address)
- most significant byte of 2-byte memory address
- least significant byte of 2-byte memory address

However, according to datasheets, the things are a bit more complicated:
1. Low-end devices need only 1-byte memory address:
   AT24C00, AT24C02, AT24C04, AT24C08, AT24C016

2. Some devices need to keep most significant bits of memory addresses
   in least significant bits i2c device address:
   - 1-byte addr devices
     -- AT24C04: 1 bit of memory address
     -- AT24C08: 2  bits of memory address
     -- AT24C16: 3  bits of memory address
   - 2-byte addr devices
     -- AT24CM01: 1 bit of memory address
     -- AT24CM02: 2 bits of memory address

This commit implements the following changes:

- introduce one more PhantomData marker to distinguish between
  1-byte and 2-byte memory address operations

- implement separate read/write operations for 1-byte and 2-byte
  devices using new PhantomData to distinguish between them

- add new device characteristics: devmask - number of memory
  address most significant bits that should be appended to
  i2c address

- modify interface test suite: different test sets are needed
  for 1-byte and 2-byte devices

- add more tests to interface test suite: invalid address tests

Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>

262 of 276 relevant lines covered (94.93%)

0.95 hits per line

Jobs
ID Job ID Ran Files Coverage
1 20.1 (TARGET=x86_64-unknown-linux-gnu) 17 Jan 2019 06:49PM UTC 0
94.93
Travis Job 20.1
Source Files on build 20
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #20
  • 88f543a8 on github
  • Prev Build on master (#17)
  • Next Build on master (#18)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc