Skip to content
Snippets Groups Projects
Commit 7005bd84 authored by dawehr's avatar dawehr
Browse files

wip: add checks to new i2c

parent 3fbfd6a8
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,11 @@ int XIicPs_MasterRecvPolled_ours(XIicPs *InstancePtr, u8 *MsgPtr,
int XIicPs_SetupMaster(XIicPs *InstancePtr, int Role);
int zybo_i2c_reset(struct I2CDriver *self) {
// ensure all required memory is allocated
struct ZyboI2CState *state = self->state;
if (state == NULL) return -1;
if (state->inst == NULL) return -1;
if (state->busId > 1) return -1;
int i2cID = state->busId;
XIicPs *inst = state->inst;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment