Closed magdesign closed 9 years ago
If you are using the Adafruit HAT, then you actually need to give -DADAFRUIT_RGBMATRIX_HAT
Have a look in lib/Makefile, there are the options to switch on/off.
(and let me know if it works, because I don't have a Adafruit HAT to test, so I just implemented that pin-mapping looking at their description)
Thanks for your help. I uncommented the option and tried to compile, but there is an error, here is what I get:
g++ -Iinclude -Wall -O3 -g -c -o demo-main.o demo-main.cc
make -C lib
make[1]: Entering directory '/home/pi/rpi-rgb-led-matrix/lib'
g++ -I../include -Wall -O3 -g -fPIC -DADAFRUIT_RGBMATRIX_HAT -c -o gpio.o gpio.cc
g++ -I../include -Wall -O3 -g -fPIC -DADAFRUIT_RGBMATRIX_HAT -c -o led-matrix.o led-matrix.cc
g++ -I../include -Wall -O3 -g -fPIC -DADAFRUIT_RGBMATRIX_HAT -c -o framebuffer.o framebuffer.cc
framebuffer.cc: In constructor ‘rgb_matrix::internal::Framebuffer::Framebuffer(int, int, int)’:
framebuffer.cc:49:1: error: uninitialized member ‘rgbmatrix::internal::Framebuffer::parallel’ with ‘const’ type ‘const int’ [-fpermissive]
framebuffer.cc: In static member function ‘static void rgb_matrix::internal::Framebuffer::InitGPIO(rgbmatrix::GPIO, int)’:
framebuffer.cc:83:10: error: ‘struct rgb_matrix::internal::Framebuffer::IoBits::
Uh, give me a minute to fix that ...
Ok, do a pull and try again ...
Thanks for your hi-speed support!
Compilation works fine and also the ./led-matrix runs smoothly with 4 LED matrix on a HUB75 Adafruit Hat.
I think you can close the issue.
Cool.
Hi
I'm using an old Adafruit HUB75 Hat to drive the LED matrix. So I must compile your code using the classic wiring option ( -DRGB_CLASSIC_PINOUT)
But I could not figure out where I have to write these -DRGB_CLASSIC_PINOUT arguments. I guess somewhere in the Makefile.....
Thanks for your help!