Skip to content

Commit

Permalink
periph_i2c: Adapt i2c test to support read register
Browse files Browse the repository at this point in the history
As mentioned in RIOT-OS#53 the logic should reset when a start bit is sent.
This means that proper repeated read registers should be supported.

This changes the test to expect the repeated read success instead of say not supported.
  • Loading branch information
MrKevinWeiss committed Jan 10, 2020
1 parent 9d418dd commit ae7a92f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/periph_i2c/tests/04__periph_i2c_flags.robot
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ Repeated Start Read Bytes 0 Should Succeed
[Documentation] Verify DUT does not lockup on repeated start read
PHiLIP.write reg user_reg 0
API Call Should Succeed I2C Read Bytes leng=2 flag=${I2C_FLAG_NOSTOP}
API Call Should Error I2C Read Bytes leng=2
API Call Should Succeed I2C Read Bytes leng=2 flag=${I2C_FLAG_NOSTART}
API Call Should Succeed I2C Read Bytes leng=2
API Call Should Succeed I2C Read Bytes leng=2

Repeated Start Read Bytes 0xFF Should Succeed
[Documentation] Verify DUT does not lockup on repeated start read
PHiLIP.write reg user_reg 255
API Call Should Succeed I2C Read Bytes leng=2 flag=${I2C_FLAG_NOSTOP}
API Call Should Error I2C Read Bytes leng=2
API Call Should Succeed I2C Read Bytes leng=2 flag=${I2C_FLAG_NOSTART}
API Call Should Succeed I2C Read Bytes leng=2
API Call Should Succeed I2C Read Bytes leng=2

Read Bytes By Frame Should Succeed
[Documentation] Read bytes frame by frame
Expand Down

0 comments on commit ae7a92f

Please sign in to comment.