Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Driver] mk_arcade_joystick_rpi GPIO Driver
#1
Bug 
At this point, I don't want to push a update to Github for this "work in process" modification.

- [Pushed to Github] debug parameter added to output various debug data to dmesg.
- [Pushed to Github] ADC_OffsetCenter() : constrain corrected value for 0-4095 to 1-4094 to try to fix Reicast analog input overflow when using evdev.
- [Pushed to Github] adc_val default is now 2048 (was 0).

Attached file is not to be considered a update but a testing file.


Attached Files
.c   mk_arcade_joystick_rpi.c (Size: 36.45 KB / Downloads: 0)
Reply
#2
So after some dig, when the driver fail to get analog value, there is 2 possibles return:
110 : Connection timed out
5 : I/O error (due to noises?)

https://github.com/torvalds/linux/blob/m...rno-base.h
https://github.com/torvalds/linux/blob/m...ic/errno.h


Maybe found the source and the solution for the i2c problems.

To my understand i2c-bcm2708 driver emulate SMbus functionality, there is part of the problem if the CPU is not able to track all simultaneous (or in a very short time) transactions.

The solution so far is to change in /boot/config.txt : "dtoverlay=i2c1-bcm2708,sda1_pin=44,scl1_pin=45,pin_func=6" to "dtoverlay=i2c1-bcm2708,sda1_pin=44,scl1_pin=45,pin_func=6,combine=off"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)