waveshare / mk_arcade_joystick_rpi

arcade joystick module for Pi
GNU General Public License v2.0
7 stars 5 forks source link

Rpi4 #4

Open JerysekB opened 2 years ago

JerysekB commented 2 years ago

My only thing is that, I want to know, if this driver supports raspberry pi 4 or not. Thanks

vale-max commented 1 year ago

@JerysekB as it is, it does not work on Raspberry Pi 4 because the peripheral base address is different than on Rpi2 or Rpi3 Luckily it is pretty easy to fix that: at the beginning of the file change:

#ifdef RPI2
#define PERI_BASE        0x3F000000
#else
#define PERI_BASE        0x20000000
#endif

to: #define PERI_BASE 0xFE000000

@waveshare I understand the product has been discontinued, but it's very easy to adapt the code for the Raspberry 4 and I'm sure your customers would appreciate it.