Closed
Description
Thank you for sharing useful library.
M5Display saves my time a lot.
I want to use the library for other lcd but it seems difficult. ( TFT_WIDTH
and TFT_HEIGHT
are embedded in code.)
How about to separate M5Display as a independent library and make it one of dependent library of this lib?
If it is separated, M5Core2 and M5StickC can depend on the library and we can redule amount of code.
Arduino framework supports depends
option from Arduino IDE 1.8.10
arduino/Arduino#8600
https://arduino.github.io/arduino-cli/library-specification/
My idea of definitions.
M5Display.h as independent library
class M5Display
{
public:
M5Display(uint16_t width, uint16_t height, int pinLed = -1, uint16_t ledPWMChannel = 7);
};
library.properties of M5Stack
depends=M5Display
M5Stack.h
class M5Stack
{
public:
M5Stack();
// LCD
M5Display Lcd = M5Display(TFT_WIDTH, TFT_HEIGHT, TFT_BG, BLK_PWM_CHANNEL);
};
Metadata
Metadata
Assignees
Labels
No labels