No announcement yet.

4DPi-32-II Flip/Mirror Image

  • Filter
  • Time
  • Show
Clear All
new posts

  • 4DPi-32-II Flip/Mirror Image

    Hi there,

    I am using the 4DPi-32-II with my Raspberry Pi 2 Model B running raspberrypi 4.1.10-v7 (Jessie). I have my display reflect off a mirror, so I would like to know how I could flip/get a mirror image of the display so that the display is the correct side when viewed from a mirror. I have checked the datasheet and it states only about rotation:

    rotate: Screen rotation 0/90/180/270 (int)
    which can be edited in the /boot/cmdline.txt.

    However there is no information regarding flipping the image. Is there a parameter for flipping in /boot/cmdline.txt that can be added or do I need to edit the display driver source code?


  • #2
    Hi sraaron,

    At the moment, we do not have a sample or documentation about the flip/mirror setting for the 4DPi-32-II hat. As this isn't included in the standard features.

    However, the team will try to consult and discuss on how this would be attained. You can try and edit the driver source code, firmware or kernel to achieve this one.

    Thanks and Regards,


    • #3
      Thank you for your response. Could you let me know where this could be achieved at? I have taken a look at the code and suspect it should be in the 4d-hats.c file in the lcdpi_update function.

      Thanks and Regards,


      • #4
        Hi, most probably you can do this with a different initialisation of ILI9341 controller (datasheet can easily be found on internet). For 4DPi-32, have a look at

        static void ili9341_32_setup(struct lcdpi *item)

        function, where memory access is set:

        ili9341_32_seq_memory_access[1] = ...;

        it should be possible to achieve mirroring, not only rotation (actually rotation is achieved with mirroring and swapping x and y axes)...
        Last edited by strancara; 9 February 2017, 06:20 PM.