platformio shows this library is compatible with the stm32 (STM32F103C8).
I've tried the "toggle" example sketch and it does compile and flash without errors.
However, the MCP23017 doesn't output anything.
It's connected to PB6 (SCL1) and PB7 (SDA1).
Do I have to change pin definitions for this library to work?
Thank's for the idea with the i2c scanner!
I've also just ordered a cheap Logic analyzer and both really helped me figure out what's going on.
It might seem obvious but i2c really doesn't seem to like it if you have 2 different voltage levels.
I thought i could just connect both chips eventhough the mcp23017 was at 5v and the stm32 at 3.3 volts since the i2c pins on the stm32 are 5v tolerant.
Doesn't work like that, I guess... oops
Yeah adding a couple 2.2k resistors helped a lot, now it also works on 5V.
I know these are really stupid beginner mistakes, I should have done more research beforehand.
I'm glad you still helped me, I really appreciate that!