Guard eink drivers w/ MESHTASTIC_INCLUDE_NICHE_GRAPHICS

This commit is contained in:
Ben Meadors 2025-02-12 06:23:49 -06:00
parent 910efd86f0
commit 6cb3acd79f
11 changed files with 46 additions and 11 deletions

View File

@ -11,6 +11,7 @@ E-Ink display driver
#pragma once
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
#include "configuration.h"
#include "./SSD16XX.h"
@ -29,4 +30,5 @@ class DEPG0154BNS800 : public SSD16XX
DEPG0154BNS800() : SSD16XX(width, height, supported, 1) {} // Note: left edge of this display is offset by 1 byte
};
} // namespace NicheGraphics::Drivers
} // namespace NicheGraphics::Drivers
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS

View File

@ -1,5 +1,7 @@
#include "./DEPG0290BNS800.h"
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
using namespace NicheGraphics::Drivers;
// Describes the operation performed when a "fast refresh" is performed
@ -114,4 +116,5 @@ void DEPG0290BNS800::finalizeUpdate()
sendCommand(0x7F); // Terminate image write without update
wait();
}
}
}
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS

View File

@ -11,6 +11,8 @@ E-Ink display driver
#pragma once
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
#include "configuration.h"
#include "./SSD16XX.h"
@ -36,4 +38,5 @@ class DEPG0290BNS800 : public SSD16XX
void finalizeUpdate() override; // Only overriden for a slight optimization
};
} // namespace NicheGraphics::Drivers
} // namespace NicheGraphics::Drivers
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS

View File

@ -1,5 +1,7 @@
#include "./EInk.h"
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
using namespace NicheGraphics::Drivers;
// Separate from EInk::begin method, as derived class constructors can probably supply these parameters as constants
@ -64,4 +66,5 @@ void EInk::await()
runOnce();
yield();
}
}
}
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS

View File

@ -6,6 +6,7 @@
#pragma once
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
#include "configuration.h"
#include "concurrency/OSThread.h"
@ -50,4 +51,6 @@ class EInk : private concurrency::OSThread
uint32_t pollingInterval; // How often to check if update complete (ms)
};
} // namespace NicheGraphics::Drivers
} // namespace NicheGraphics::Drivers
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS

View File

@ -1,5 +1,7 @@
#include "./GDEY0154D67.h"
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
using namespace NicheGraphics::Drivers;
// Map the display controller IC's output to the conected panel
@ -55,4 +57,5 @@ void GDEY0154D67::detachFromUpdate()
default:
return beginPolling(100, 2000); // At least 2 seconds for full refresh
}
}
}
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS

View File

@ -11,6 +11,8 @@ E-Ink display driver
#pragma once
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
#include "configuration.h"
#include "./SSD16XX.h"
@ -35,4 +37,6 @@ class GDEY0154D67 : public SSD16XX
void detachFromUpdate() override;
};
} // namespace NicheGraphics::Drivers
} // namespace NicheGraphics::Drivers
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS

View File

@ -1,5 +1,7 @@
#include "./LCMEN2R13EFC1.h"
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
#include <assert.h>
using namespace NicheGraphics::Drivers;
@ -294,4 +296,6 @@ void LCMEN213EFC1::finalizeUpdate()
writeOldImage();
wait();
}
}
}
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS

View File

@ -14,6 +14,8 @@ It is implemented as a "one-off", directly inheriting the EInk base class, unlik
#pragma once
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
#include "configuration.h"
#include "./EInk.h"
@ -61,4 +63,6 @@ class LCMEN213EFC1 : public EInk
SPISettings spiSettings = SPISettings(6000000, MSBFIRST, SPI_MODE0);
};
} // namespace NicheGraphics::Drivers
} // namespace NicheGraphics::Drivers
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS

View File

@ -1,5 +1,6 @@
#include "./SSD16XX.h"
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
using namespace NicheGraphics::Drivers;
SSD16XX::SSD16XX(uint16_t width, uint16_t height, UpdateTypes supported, uint8_t bufferOffsetX)
@ -222,4 +223,5 @@ void SSD16XX::finalizeUpdate()
sendCommand(0x7F); // Terminate image write without update
wait();
}
}
}
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS

View File

@ -10,6 +10,8 @@ See DEPG0154BNS800 and DEPG0290BNS800 for examples.
#pragma once
#ifdef MESHTASTIC_INCLUDE_NICHE_GRAPHICS
#include "configuration.h"
#include "./EInk.h"
@ -55,4 +57,6 @@ class SSD16XX : public EInk
SPISettings spiSettings = SPISettings(4000000, MSBFIRST, SPI_MODE0);
};
} // namespace NicheGraphics::Drivers
} // namespace NicheGraphics::Drivers
#endif // MESHTASTIC_INCLUDE_NICHE_GRAPHICS