mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 11:39:58 +02:00
[ion/device/display] Add panelIdentifier
This commit is contained in:
@@ -386,6 +386,16 @@ void pullPixels(KDColor * pixels, size_t numberOfPixels) {
|
||||
send_command(Command::PixelFormatSet, 0x05);
|
||||
}
|
||||
|
||||
uint32_t panelIdentifier() {
|
||||
send_command(Command::ReadDisplayID);
|
||||
receive_data(); // Dummy read, per datasheet
|
||||
uint8_t id1 = receive_data();
|
||||
uint8_t id2 = receive_data();
|
||||
uint8_t id3 = receive_data();
|
||||
|
||||
return (id1 << 16) | (id2 << 8) | id3;
|
||||
}
|
||||
|
||||
void pushBlackWhitePixels() {
|
||||
send_command(Command::MemoryWrite);
|
||||
int numberOfPixels = Ion::Display::Width * Ion::Display::Height;
|
||||
|
||||
@@ -32,10 +32,12 @@ void waitForPendingDMAUploadCompletion();
|
||||
void pushPixels(const KDColor * pixels, size_t numberOfPixels);
|
||||
void pushColor(KDColor color, size_t numberOfPixels);
|
||||
void pullPixels(KDColor * pixels, size_t numberOfPixels);
|
||||
uint32_t panelIdentifier();
|
||||
|
||||
enum class Command : uint16_t {
|
||||
Nop = 0x00,
|
||||
Reset = 0x01,
|
||||
ReadDisplayID = 0x04,
|
||||
SleepIn = 0x10,
|
||||
SleepOut = 0x11,
|
||||
DisplayInversionOff = 0x20,
|
||||
|
||||
Reference in New Issue
Block a user