Programming Thread

Viewing single post

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic


So back to my controller to arcade converters.  I managed to find some current sink shift registers, which solves a lot of my issues with hardware for my converter.  Finished up the Linux code for getting controller input, despite the lack of documentation on the controller stuff for evdev (Seriously, I was lucky I found a random post on the internet from someone on the SDL team with a working, useable example).  I managed to get my SPI code working, that I shamelessly took from wiringPi (Rip).  Shiftout worked.  Controller code worked.  I put the two together?  It broke.  Something's up with the way linux or GCC handles loops.  The word I was sending out was getting changed asycrhronously somehow.  So I was investigating multithreading.  Multithreading isn't fun.  I took a chance and copied the word to another variable before the shiftout.  It worked.   (╯°□°)╯︵ ┻━┻