This is the David Smart RA8875 Library with mods for working with FRDM-K64F
Diff: RA8875.cpp
- Revision:
- 191:0fad2e45e196
- Parent:
- 190:3132b7dfad82
- Child:
- 194:53c18f0e7922
--- a/RA8875.cpp Sat Sep 21 17:30:00 2019 +0000 +++ b/RA8875.cpp Fri Oct 11 20:53:08 2019 +0000 @@ -1161,6 +1161,23 @@ } } +RA8875::orientation_t RA8875::GetOrientation() +{ + uint8_t dpcrVal = ReadCommand(0x20); + + dpcrVal &= 0x0C; // keep the scan direction bits + switch (dpcrVal) { + default: + case 0x00: + return rotate_0; + case 0x08: + return rotate_90; + case 0x0C: + return rotate_180; + case 0x04: + return rotate_270; + } +} RetCode_t RA8875::SetOrientation(RA8875::orientation_t angle) {