This is annoying. Maybe I’m doing it wrong.
I used pins 16 & 17 for my bitbang i2c program, because I was having trouble with 14 & 15 for some reason (probably the same reason). To run my program I had to cvi_pinmux the pins to XGPIO. Ok fine, that worked. But, to my extreme annoyance, when I restarted the Duo and ran my program again it didn’t work. Had to cvi_pinmux those pins again.
I understand it switching to default pinmux on those pins on restart, but shouldn’t wiringx set that for me when I set a pin as a GPIO output? If it doesn’t then that’s fine, but it should have a function (method? command?) so I can set pinmux inside my program.
I guess I’ll find the processor datasheet and dig through it to find out what register(s) to change to set it in my program.