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

eldruin / eeprom24x-rs / 20 / 1
86%
master: 86%

Build:
DEFAULT BRANCH: master
Ran 17 Jan 2019 06:49PM UTC
Files 2
Run time 4s
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

17 Jan 2019 06:32PM UTC coverage: 94.928% (-0.5%) from 95.425%
TARGET=x86_64-unknown-linux-gnu

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

Source Files on job 20.1 (TARGET=x86_64-unknown-linux-gnu)
  • Tree
  • List 0
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 28
  • Travis Job 20.1
  • 88f543a8 on github
  • Prev Job for TARGET=x86_64-unknown-linux-gnu on master (#17.1)
  • Next Job for TARGET=x86_64-unknown-linux-gnu on master (#18.1)
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