Skip to content

Problem with setRotation(...) with Arduino_NV3041A on bus Arduino_ESP32QSPI #474

Answered by calint
calint asked this question in Q&A
Discussion options

You must be logged in to vote

I think I solved it :) Se the changes below

void Arduino_NV3041A::setRotation(uint8_t r)
{
  Arduino_TFT::setRotation(r);
  switch (_rotation)
  {
  case 1:
    r = NV3041A_MADCTL_MY | NV3041A_MADCTL_MV | NV3041A_MADCTL_RGB;
    break;
  case 2:
    r = NV3041A_MADCTL_RGB;
    break;
  case 3:
    r = NV3041A_MADCTL_MX | NV3041A_MADCTL_MV | NV3041A_MADCTL_RGB;
    break;
  default: // case 0:
    r = NV3041A_MADCTL_MX | NV3041A_MADCTL_MY | NV3041A_MADCTL_RGB;
    break;
  }
  // _bus->beginWrite();
  // _bus->writeCommand(NV3041A_MADCTL);
  // _bus->write(r);
  // _bus->endWrite();

  _bus->beginWrite();
  _bus->writeC8D8(NV3041A_MADCTL, r);
  _bus->endWrite();
}

Kind regards

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by calint
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant