diff --git a/adafruit-pitft.sh b/adafruit-pitft.sh index d499c93..14046ed 100755 --- a/adafruit-pitft.sh +++ b/adafruit-pitft.sh @@ -57,6 +57,11 @@ MADCTL_st7789_240x24090="0x36,0x00,-1,0x37,0x00,0x00,-1" MADCTL_st7789_240x240180="0x36,0xA0,-1,0x37,0x00,0x50,-1" MADCTL_st7789_240x240270="0x36,0xC0,-1,0x37,0x00,0x50,-1" +MADCTL_st7789_240x32090="0x36,0x60,-1,0x37,0x00,0x00,-1" +MADCTL_st7789_240x320180="0x36,0x00,-1,0x37,0x00,0x00,-1" +MADCTL_st7789_240x320270="0x36,0xA0,-1,0x37,0x00,0x00,-1" +MADCTL_st7789_240x3200="0x36,0xC0,-1,0x37,0x00,0x00,-1" + warning() { echo WARNING : $1 } @@ -237,6 +242,25 @@ function update_configtxt() { overlay="dtoverlay=pitft35-resistive,rotate=${pitftrot},speed=20000000,fps=20" fi + if [ "${pitfttype}" == "st7789_240x320" ]; then + madctl=$(eval echo "\$MADCTL_$pitfttype$pitftrot") + if [ "${pitftrot}" == "90" ] || [ "${pitftrot}" == "270" ]; then + fbtftdevicerotate="rotate=90" + else + fbtftdevicerotate="" + fi + cat >> /etc/modprobe.d/fbtft.conf <> /etc/modules + echo "flexfb" >> /etc/modules + echo "fbtft_device" >> /etc/modules + overlay="" + fi + if [ "${pitfttype}" == "st7789_240x240" ]; then madctl=$(eval echo "\$MADCTL_$pitfttype$pitftrot") cat >> /etc/modprobe.d/fbtft.conf <