I2C port expander with interrupt

Thank you Richard,
so if I understand correctly it is like I suggested? Or am I missing perhaps some subtle detail?

For example when I mean by wait/block I was thinking to have a state machine and entering a state where with a
while(int_flag == 0); [where int_flag is actually a global variable and not sampling the actual INT flag]
so that the while loops exits only after that variable is set to 1 by the ISR.

Is that what you are also suggesting or when you say “the ISR I send a notification to a task” do you mean using some RTOS functionality?

Thank you again :slight_smile: