My code for the SETDATAOUT and CLEARDATAOUT registers is working reliable for years. I see no reason why you should need to invert anything.
I guess you're facing multiple bugs compensating themself sometimes. In order to help, I need to check the complete source code (ie a reduced fragment, demonstrating the issue).
PS
Following your hint, I'm considering to extend the project by a further example demonstrating that feature (stepper2) and perhaps adding a new function GPIO::flush() to set multiple GIPO output in a single step ...
libpruio (BB D/A - I/O fast and easy)
Re: libpruio (BB D/A - I/O fast and easy)
I didn't doubt a second your example was wrong, my questions was only to find bugs in my code!
Now I'm waiting for a new cape with sip pull resistors in the 5v side of level shifter, since I think my erratic reading depend from bad input more than error in coding.
Anyway, I think a lot of people may be interested in multiple pins managing, and a new example (and the new function!) Will be really appreciated!
Now I'm waiting for a new cape with sip pull resistors in the 5v side of level shifter, since I think my erratic reading depend from bad input more than error in coding.
Anyway, I think a lot of people may be interested in multiple pins managing, and a new example (and the new function!) Will be really appreciated!