Beispiel #1
0
__attribute__ ((always_inline)) static inline void I2cFail(struct i2c_periph* p, struct i2c_transaction* t) {
  ((i2cRegs_t *)(p->reg_addr))->conset = _BV(STO);
  // transaction failed
  t->status = I2CTransFailed;
  // FIXME I2C should be reseted here ?
  I2cEndOfTransaction(p);
}
Beispiel #2
0
__attribute__ ((always_inline)) static inline void I2cSendStop(struct i2c_periph* p, struct i2c_transaction* t) {
  ((i2cRegs_t *)(p->reg_addr))->conset = _BV(STO);
  // transaction finished with success
  t->status = I2CTransSuccess;
  I2cEndOfTransaction(p);
}
Beispiel #3
0
__attribute__ ((always_inline)) static inline void I2cFinished(struct i2c_periph* p, struct i2c_transaction* t) {
  // transaction finished with success
  t->status = I2CTransSuccess;
  I2cEndOfTransaction(p);
}