Code: Select all
case p_4bit_inputs when pinsneq(int_val_curr) :> int_val_new:
uint8_t int_changed = int_val_curr ^ int_val_new;
int_val_curr = int_val_new;
if (input_changed & 1) ...action the change here by reading an i2c message that resets the [b]p_4bit_inputs [/b] bit.
if (input_changed & 2) ...action the change here by reading an i2c message that resets the [b]p_4bit_inputs [/b] bit.
if (input_changed & 4) ...action the change here by reading an i2c message that resets the [b]p_4bit_inputs [/b] bit.
if (input_changed & 8) ...action the change here by reading an i2c message that resets the [b]p_4bit_inputs [/b] bit.
Any obviously thoughts why?