drivers/pn532: adapt to new i2c API#9432
drivers/pn532: adapt to new i2c API#9432MichelRottleuthner wants to merge 1 commit intoRIOT-OS:new_i2c_iffrom
Conversation
|
Overall changes are OK but I have no sensor for testing this. |
smlng
left a comment
There was a problem hiding this comment.
otherwise looks good, untested pre-ACK.
| ret = i2c_write_bytes(dev->conf->i2c, PN532_I2C_ADDRESS, buff, len); | ||
| ret = i2c_write_bytes(dev->conf->i2c, PN532_I2C_ADDRESS, buff, len, 0); | ||
| if (ret == 0) { | ||
| ret = len; |
There was a problem hiding this comment.
looking at the SPI part this might also be ret = (int)len;, though my compiler didn't complain about assigned unsigned to signed - but might be different with other versions?!
| ret = i2c_read_bytes(dev->conf->i2c, PN532_I2C_ADDRESS, buff, len + 1); | ||
| ret = i2c_read_bytes(dev->conf->i2c, PN532_I2C_ADDRESS, buff, len + 1, 0); | ||
| if (ret == 0) { | ||
| ret = len + 1; |
There was a problem hiding this comment.
dito, maybe cast to int needed, see above
|
Tested on samr21-xpro and it seems like it is good. Ready to merge as soon as the casting and Travis issues are looked at! |
|
@MichelRottleuthner you can fix the remaining comments and squash directly so we can push the green button :) |
|
@MichelRottleuthner What's going on ? |
|
typo^^ just used |
|
is there no option to just reopen it o.O |
|
But I think you can reopen the PR and restore your branch using github. |
|
sadly no. Seems like the option was disabled because of me directly re-pushing it to the same name -.- |
Contribution description
Aapplies the new i2c API to the pn532.
Tested with adafruit PN532 RFID/NFC shield v1.3 and nucleo144-f446
Issues/PRs references
#6577