函数原型:
void begin(void)
功能说明:
传入参数:
返回值:
函数原型:
void beginTransaction(void)
功能说明
传入参数:
返回值:
函数原型:
void calibrateTouch<T>(uint16_t* parameters, const T &color_fg, const T &color_bg, uint8_t size = 10)
功能说明
传入参数:
返回值:
函数原型:
void clear(const T &color)
功能说明
传入参数:
*关于颜色编码
返回值:
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
void setup() {
display.begin();
display.clear(RED);
//clearDisplay(RED);
//fillScreen(RED);
}
void loop() {
}
函数原型:
void clearClipRect(void)
功能说明:
传入参数:
返回值:
函数原型:
void clearDisplay(uint32_t color = 0)
功能说明:
传入参数:
*关于颜色编码
返回值:
函数原型:
void clearScrollRect(void)
功能说明:
传入参数:
返回值:
函数原型:
uint16_t color8to16(uint8_t rgb332)
功能说明:
传入参数:
返回值:
函数原型:
uint32_t color16to24(uint16_t rgb565)
功能说明:
传入参数:
返回值:
函数原型:
uint8_t color16to8(uint16_t rgb565)
功能说明:
传入参数:
返回值:
函数原型:
uint16_t color24to16(uint32_t rgb888)
功能说明:
传入参数:
返回值:
函数原型:
uint8_t color332(uint8_t r, uint8_t g, uint8_t b)
功能说明:
传入参数:
返回值:
函数原型:
uint16_t color565(uint8_t r, uint8_t g, uint8_t b)
功能说明:
传入参数:
返回值:
函数原型:
uint32_t color888(uint8_t r, uint8_t g, uint8_t b)
功能说明:
传入参数:
函数原型:
void convertRawXY(touch_point_t *tp, uint_fast8_t count = 1)
功能说明:
传入参数:
返回值:
函数原型:
void copyRect(uint32_t dst_x, uint32_t dst_y, uint32_t w, uint32_t h, uint32_t src_x, uint32_t src_y)
功能说明:
传入参数:
返回值:
函数原型:
void* createPng( size_t* datalen, int32_t x = 0, int32_t y = 0, int32_t width = 0, int32_t height = 0)
功能说明:
传入参数:
返回值:
函数原型:
void display(void)
功能说明:
传入参数:
返回值:
函数原型:
bool displayBusy(void)
功能说明:
传入参数:
返回值:
函数原型:
bool dmaBusy(void)
功能说明:
传入参数:
返回值:
函数原型1:
void drawArc(int32_t x, int32_t y, int32_t r0, int32_t r1, float angle0, float angle1)
函数原型2:
void drawArc(int32_t x, int32_t y, int32_t r0, int32_t r1, float angle0, float angle1, const T &color)
功能说明:
传入参数:
返回值:
*关于颜色编码
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
void setup() {
display.begin();
uint16_t x = display.width() / 2;
uint16_t y = display.height() / 2;
display.drawArc(x, y, 10, 20, 20, 240, TFT_WHITE);
}
void loop() {
}
函数原型1:
void drawBezier( int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, const T& color)
函数原型2:
void drawBezier( int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2)
函数原型3:
void drawBezier( int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x3, int32_t y3, const T& color)
函数原型4:
void drawBezier( int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, int32_t x3, int32_t y3, const T& color)
功能说明:
传入参数:
返回值:
*关于颜色编码
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
void setup() {
display.begin();
uint16_t x = display.width() / 2;
uint16_t y = display.height() / 2;
display.drawBezier(0, 0, x, 0, x, y, TFT_WHITE);
display.drawBezier(0, 0, x, 0, x, y, 0, y, TFT_WHITE);
}
void loop() {
}
函数原型1:
void drawBmp(const uint8_t *data, uint32_t len, int32_t x=0, int32_t y=0, int32_t maxWidth=0, int32_t maxHeight=0, int32_t offX=0, int32_t offY=0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
函数原型2:
void drawBmp(DataWrapper *data, int32_t x=0, int32_t y=0, int32_t maxWidth=0, int32_t maxHeight=0, int32_t offX=0, int32_t offY=0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
功能说明:
传入参数:
*关于datum_t
返回值:
函数原型1:
void drawBmpFile(T &fs, const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
函数原型3:
void drawBmpFile(DataWrapper* file, const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
函数原型2:
void drawBmpFile(const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
功能说明:
传入参数:
*关于DataWrapper
*关于datum_t
返回值:
函数原型:
bool drawBmpUrl(const char* url, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
bool drawBmpUrl(String& url, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
功能说明:
<M5GFX.h>
之前写入 #include <HTTPClient.h>
。传入参数:
返回值:
函数原型1:
void drawCenterString(const char *string, int32_t x, int32_t y, const IFont* font)
函数原型2:
void drawCenterString(const char *string, int32_t x, int32_t y)
功能说明:
传入参数:
*关于Font
返回值:
函数原型1:
size_t drawChar(int32_t x, int32_t y, uint16_t uniCode, T color, T bg, float size_x, float size_y)
函数原型2:
size_t drawChar(int32_t x, int32_t y, uint16_t uniCode, T color, T bg, float size)
函数原型3:
size_t drawChar(uint16_t uniCode, int32_t x, int32_t y, uint8_t font)
函数原型4:
size_t drawChar(uint16_t uniCode, int32_t x, int32_t y)
功能说明:
传入参数:
返回值:
函数原型1:
void drawCircle( int32_t x, int32_t y, int32_t r)
函数原型2:
void drawCircle( int32_t x, int32_t y, int32_t r, const T& color)
功能说明:
传入参数:
返回值:
*关于颜色编码
函数原型1:
void drawEllipse( int32_t x, int32_t y, int32_t rx, int32_t ry)
函数原型2:
void drawEllipse( int32_t x, int32_t y, int32_t rx, int32_t ry, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void drawEllipseArc( int32_t x, int32_t y, int32_t r0x, int32_t r1x, int32_t r0y, int32_t r1y, float angle0, float angle1)
函数原型2:
void drawEllipseArc( int32_t x, int32_t y, int32_t r0x, int32_t r1x, int32_t r0y, int32_t r1y, float angle0, float angle1, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void drawFastHLine( int32_t x, int32_t y, int32_t w)
函数原型2:
void drawFastHLine( int32_t x, int32_t y, int32_t w, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void drawFastVLine( int32_t x, int32_t y, int32_t w)
函数原型2:
void drawFastVLine( int32_t x, int32_t y, int32_t w, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
size_t drawFloat(float floatNumber, uint8_t dp, int32_t poX, int32_t poY)
函数原型2:
size_t drawFloat(float floatNumber, uint8_t dp, int32_t poX, int32_t poY, uint8_t font)
功能说明:
传入参数:
返回值:
函数原型:
void drawGradientHLine( int32_t x, int32_t y, int32_t w, const T& colorstart, const T& colorend)
功能说明:
传入参数:
返回值:
函数原型:
void drawGradientLine ( int32_t x0, int32_t y0, int32_t x1, int32_t y1, const T& colorstart, const T& colorend )
功能说明:
传入参数:
返回值:
函数原型:
void drawGradientVLine( int32_t x, int32_t y, int32_t h, const T& colorstart, const T& colorend)
功能说明:
传入参数:
返回值:
函数原型1:
void drawJpg(const uint8_t *data, uint32_t len, int32_t x=0, int32_t y=0, int32_t maxWidth=0, int32_t maxHeight=0, int32_t offX=0, int32_t offY=0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
函数原型2:
void drawJpg(DataWrapper *data, int32_t x=0, int32_t y=0, int32_t maxWidth=0, int32_t maxHeight=0, int32_t offX=0, int32_t offY=0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
功能说明:
传入参数:
*关于datum_t
返回值:
函数原型1:
void drawJpgFile(T &fs, const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
函数原型3:
void drawJpgFile(DataWrapper* file, const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
函数原型2:
void drawJpgFile(const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
功能说明:
传入参数:
*关于DataWrapper *关于datum_t
返回值:
函数原型:
bool drawJpgUrl(const char*/String& url, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
功能说明:
<M5GFX.h>
之前写入 #include <HTTPClient.h>
。传入参数:
返回值:
函数原型1:
void drawLine( int32_t x0, int32_t y0, int32_t x1, int32_t y1)
函数原型2:
void drawLine( int32_t x0, int32_t y0, int32_t x1, int32_t y1, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
size_t drawNumber(long long_num, int32_t poX, int32_t poY)
函数原型2:
size_t drawNumber(long long_num, int32_t poX, int32_t poY, uint8_t font)
功能说明:
传入参数:
返回值:
函数原型1:
void drawPixel( int32_t x, int32_t y)
函数原型2:
void drawPixel( int32_t x, int32_t y, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void drawPng(const uint8_t *data, uint32_t len, int32_t x=0, int32_t y=0, int32_t maxWidth=0, int32_t maxHeight=0, int32_t offX=0, int32_t offY=0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
函数原型2:
void drawPng(DataWrapper *data, int32_t x=0, int32_t y=0, int32_t maxWidth=0, int32_t maxHeight=0, int32_t offX=0, int32_t offY=0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
功能说明:
传入参数:
*关于datum_t
函数原型1:
void drawPngFile(T &fs, const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
函数原型3:
void drawPngFile(DataWrapper* file, const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
函数原型2:
void drawPngFile(const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
功能说明:
传入参数:
*关于DataWrapper *关于datum_t
返回值:
函数原型:
bool drawPngUrl(const char*/String& url, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
功能说明:
<M5GFX.h>
之前写入 #include <HTTPClient.h>
。传入参数:
返回值:
函数原型1:
void drawQoi(const uint8_t *data, uint32_t len, int32_t x=0, int32_t y=0, int32_t maxWidth=0, int32_t maxHeight=0, int32_t offX=0, int32_t offY=0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
函数原型2:
void drawQoi(DataWrapper *data, int32_t x=0, int32_t y=0, int32_t maxWidth=0, int32_t maxHeight=0, int32_t offX=0, int32_t offY=0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
功能说明:
传入参数:
*关于datum_t
返回值:
函数原型1:
void drawQoiFile(T &fs, const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
函数原型3:
void drawQoiFile(DataWrapper* file, const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
函数原型2:
void drawQoiFile(const char *path, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
功能说明:
传入参数:
*关于DataWrapper *关于datum_t
返回值:
函数原型:
bool drawQoiUrl(const char* url, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
bool drawQoiUrl(String& url, int32_t x = 0, int32_t y = 0, int32_t maxWidth = 0, int32_t maxHeight = 0, int32_t offX = 0, int32_t offY = 0, float scale_x = 1.0f, float scale_y = 0.0f, datum_t datum = datum_t::top_left)
功能说明:
<M5GFX.h>
之前写入 #include <HTTPClient.h>
。传入参数:
返回值:
函数原型1:
void drawRect( int32_t x, int32_t y, int32_t w, int32_t h)
函数原型2:
void drawRect( int32_t x, int32_t y, int32_t w, int32_t h, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
size_t drawRightString( const char *string, int32_t x, int32_t y)
函数原型2:
size_t drawRightString( const char *string, int32_t x, int32_t y, const IFont* font)
功能说明:
传入参数:
返回值:
函数原型1:
void drawRoundRect( int32_t x, int32_t y, int32_t w, int32_t h, int32_t r)
函数原型2:
void drawRoundRect( int32_t x, int32_t y, int32_t w, int32_t h, int32_t r, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
size_t drawString( const char *string, int32_t x, int32_t y)
函数原型2:
size_t drawString( const char *string, int32_t x, int32_t y, const IFont* font)
功能说明:
传入参数:
返回值:
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
void setup() {
display.begin();
display.setTextDatum(middle_center);
uint16_t x = display.width() / 2;
uint16_t y = display.height() / 2;
display.drawString("Text", x, y);
}
void loop() {
}
函数原型1:
void drawTriangle( int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2)
函数原型2:
void drawTriangle( int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, const T& color)
功能说明:
传入参数:
返回值:
函数原型:
void effect(int32_t x, int32_t y, int32_t w, int32_t h, TFunc&& effector)
功能说明:
传入参数:
返回值:
函数原型:
void endTransaction(void)
功能说明
传入参数:
返回值:
函数原型:
void endWrite(void)
功能说明
传入参数:
返回值:
函数原型1:
void fillAffine(const float matrix[6], int32_t w, int32_t h)
函数原型2:
void fillAffine(const float matrix[6], int32_t w, int32_t h, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void fillArc( int32_t x, int32_t y, int32_t r0, int32_t r1, float angle0, float angle1)
函数原型2:
void fillArc( int32_t x, int32_t y, int32_t r0, int32_t r1, float angle0, float angle1, const T& color)
功能说明:
传入参数:
返回值:
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
void setup() {
display.begin();
uint16_t x = display.width() / 2;
uint16_t y = display.height() / 2;
display.fillArc(x, y, 10, 20, 20, 240, TFT_WHITE);
}
void loop() {
}
函数原型1:
void fillCircle( int32_t x, int32_t y, int32_t r)
函数原型2:
void fillCircle( int32_t x, int32_t y, int32_t r, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void fillEllipse( int32_t x, int32_t y, int32_t rx, int32_t ry)
函数原型2:
void fillEllipse( int32_t x, int32_t y, int32_t rx, int32_t ry, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void fillEllipseArc( int32_t x, int32_t y, int32_t r0x, int32_t r1x, int32_t r0y, int32_t r1y, float angle0, float angle1)
函数原型2:
void fillEllipseArc( int32_t x, int32_t y, int32_t r0x, int32_t r1x, int32_t r0y, int32_t r1y, float angle0, float angle1, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void fillRect( int32_t x, int32_t y, int32_t w, int32_t h)
函数原型2:
void fillRect( int32_t x, int32_t y, int32_t w, int32_t h, const T& color)
功能说明:
传入参数:
返回值:
函数原型:
void fillRectAlpha(int32_t x, int32_t y, int32_t w, int32_t h, uint8_t alpha, const T& color)
功能说明:
传入参数:
返回值:
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
void setup()
{
display.begin();
display.fillScreen(TFT_BLACK);
uint16_t x = display.width() / 2;
uint16_t y = display.height() / 2;
display.fillRect(x - 10, y - 10, 50, 50, TFT_WHITE);
display.fillRectAlpha(x, y, 30, 30, 100, TFT_BLACK);
}
void loop(){
}
函数原型1:
void fillRoundRect( int32_t x, int32_t y, int32_t w, int32_t h, int32_t r)
函数原型2:
void fillRoundRect( int32_t x, int32_t y, int32_t w, int32_t h, int32_t r, const T& color)
功能说明:
传入参数:
返回值:
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
void setup()
{
display.begin();
display.fillScreen(TFT_BLACK);
uint16_t x = display.width() / 2;
uint16_t y = display.height() / 2;
display.fillRoundRect(x, y, 30, 30, 5, TFT_WHITE);
}
void loop(){
}
函数原型:
void fillScreen(const T &color)
功能说明:
传入参数:
返回值:
函数原型1:
void fillTriangle( int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2)
函数原型2:
void fillTriangle( int32_t x0, int32_t y0, int32_t x1, int32_t y1, int32_t x2, int32_t y2, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void floodFill( int32_t x, int32_t y)
函数原型2:
void floodFill( int32_t x, int32_t y, const T& color)
功能说明:
传入参数:
返回值:
函数原型:
int32_t fontHeight(const IFont* font)
功能说明:
传入参数:
返回值:
函数原型:
int32_t fontWidth(const IFont* font)
功能说明:
传入参数:
返回值:
函数原型:
uint8_t getAttribute(attribute_t attr_id)
功能说明:
传入参数:
*关于attribute_t
返回值:
函数原型:
uint32_t getBaseColor(void)
功能说明:
传入参数:
返回值:
函数原型:
board_t getBoard(void)
功能说明:
传入参数:
返回值:
*关于board_t
函数原型:
uint8_t getBrightness(void)
功能说明:
传入参数:
返回值:
函数原型:
void getClipRect(int32_t *x, int32_t *y, int32_t *w, int32_t *h)
功能说明:
传入参数:
返回值:
函数原型:
color_depth_t getColorDepth(void)
功能说明:
传入参数:
返回值:
函数原型:
int32_t getCursorX(void)
功能说明:
传入参数:
返回值:
函数原型:
int32_t getCursorY(void)
功能说明:
传入参数:
返回值:
函数原型:
epd_mode_t getEpdMode(void)
功能说明:
传入参数:
返回值:
*关于epd_mode_t
函数原型:
const IFont* getFont (void)
功能说明:
传入参数:
返回值:
*关于Font
函数原型:
static M5GFX* getInstance(void)
功能说明:
传入参数:
返回值:
函数原型:
bool getInvert(void)
功能说明:
传入参数:
返回值:
函数原型:
RGBColor* getPalette(void)
功能说明:
传入参数:
返回值:
函数原型:
uint32_t getPaletteCount(void)
功能说明:
传入参数:
返回值:
函数原型:
Panel_Device* getPanel(void)
功能说明:
传入参数:
返回值:
函数原型:
float getPivotX(void)
功能说明:
传入参数:
返回值:
函数原型:
float getPivotY(void)
功能说明:
传入参数:
返回值:
函数原型:
uint32_t getRawColor(void)
功能说明:
传入参数:
返回值:
函数原型:
uint8_t getRotation(void)
功能说明:
传入参数:
返回值:
函数原型:
void getScrollRect(int32_t *x, int32_t *y, int32_t *w, int32_t *h)
功能说明:
传入参数:
返回值:
函数原型:
uint32_t getStartCount(void)
功能说明:
传入参数:
返回值:
函数原型:
bool getSwapBytes(void)
功能说明:
传入参数:
返回值:
函数原型:
textdatum_t getTextDatum(void)
功能说明:
传入参数:
返回值:
函数原型:
uint32_t getTextPadding(void)
功能说明:
传入参数:
返回值:
函数原型:
float getTextSizeX(void)
功能说明:
传入参数:
返回值:
函数原型:
float getTextSizeY(void)
功能说明:
传入参数:
返回值:
函数原型:
TextStyle& getTextStyle(void)
功能说明:
传入参数:
返回值:
函数原型:
uint_fast8_t getTouch(touch_point_t *tp, uint_fast8_t count = 1)
功能说明:
传入参数:
返回值:
函数原型:
uint_fast8_t getTouchRaw(touch_point_t *tp, uint_fast8_t count = 1)
功能说明:
传入参数:
返回值:
函数原型:
bool hasPalette(void)
功能说明:
传入参数:
返回值:
函数原型:
int32_t height(void)
功能说明:
传入参数:
返回值:
函数原型:
bool init(void)
功能说明:
传入参数:
返回值:
函数原型:
void initDMA(void)
功能说明:
传入参数:
返回值:
函数原型:
void invertDisplay(bool i)
功能说明:
传入参数:
返回值:
函数原型:
bool isBusShared(void)
功能说明:
传入参数:
返回值:
函数原型:
bool isEPD(void)
功能说明:
返回值:
函数原型:
bool isReadable(void)
功能说明:
返回值:
函数原型:
bool isSPIShared(void)
功能说明:
返回值:
函数原型1:
bool loadFont(const uint8_t* array)
函数原型2:
bool loadFont(T &fs, const char *path)
函数原型3:
bool loadFont(const char *path)
函数原型4:
bool loadFont(DataWrapper* data)
功能说明:
传入参数:
返回值:
函数原型1:
void paint( int32_t x, int32_t y)
函数原型2:
void paint( int32_t x, int32_t y, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void panel(Panel_Device* panel)
函数原型2:
Panel_Device* panel(void)
功能说明:
传入参数:
返回值:
函数原型:
void popState(void)
功能说明:
传入参数:
返回值:
函数原型:
void powerSave(bool flg)
功能说明:
传入参数:
返回值:
函数原型:
void powerSaveOff(void)
功能说明:
传入参数:
返回值:
函数原型:
void powerSaveOn(void)
功能说明:
传入参数:
返回值:
函数原型1:
size_t print(char c)
size_t print(const char str[])
函数原型2:
size_t print(int n, int base = 10)
size_t print(long n, int base = 10)
size_t print(unsigned char n, int base = 10)
size_t print(unsigned int n, int base = 10)
size_t print(unsigned long n, int base = 10)
size_t print(double n, int digits= 2)
功能说明:
Print.h
。传入参数:
返回值:
函数原型:
size_t printf(const char* format, ...)
功能说明:
LibPrint.h
。传入参数:
返回值:
函数原型:
size_t println(void)
size_t println(char c)
size_t println(const char c[])
函数原型:
size_t println(int n, int base = 10)
size_t println(long n, int base = 10)
size_t println(unsigned char n, int base = 10)
size_t println(unsigned int n, int base = 10)
size_t println(unsigned long n, int base = 10)
size_t println(double n, int digits= 2)
功能说明:
Print.h
。传入参数:
返回值:
函数原型:
void progressBar(int x, int y, int w, int h, uint8_t val)
功能说明:
传入参数:
返回值:
函数原型:
void pushBlock( const T& color, uint32_t length)
功能说明:
传入参数:
返回值:
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
int32_t x;
int32_t y;
void setup()
{
display.begin();
display.fillScreen(TFT_BLACK);
x = display.width() / 2;
y = display.height() / 2;
display.startWrite();
display.setWindow(0, 0, x - 1 , y);
for (int i=0; i<y; i++) {
display.pushBlock(TFT_RED, x / 4);
display.pushBlock(TFT_BLUE, x / 4);
display.pushBlock(TFT_GREEN, x / 4);
display.pushBlock(TFT_YELLOW, x / 4);
}
display.endWrite();
}
void loop(){
}
函数原型1:
void pushImage(int32_t x, int32_t y, int32_t w, int32_t h, pixelcopy_t *param, bool use_dma = false)
函数原型2:
void pushImage(int32_t x, int32_t y, int32_t w, int32_t h, const T* data)
函数原型3:
void pushImage(int32_t x, int32_t y, int32_t w, int32_t h, const T1* data, const T2& transparent)
函数原型4:
void pushImage(int32_t x, int32_t y, int32_t w, int32_t h, const void* data, color_depth_t depth, const T* palette)
函数原型5:
void pushImage(int32_t x, int32_t y, int32_t w, int32_t h, const void* data, uint32_t transparent, color_depth_t depth, const T* palette)
功能说明:
传入参数:
返回值:
函数原型1:
void pushImageAffine(const float matrix[6], int32_t w, int32_t h, const T* data)
函数原型2:
void pushImageAffine(const float matrix[6], int32_t w, int32_t h, const T1* data, const T2& transparent)
函数原型3:
void pushImageAffine(const float matrix[6], int32_t w, int32_t h, const void* data, color_depth_t depth, const T* palette)
函数原型4:
void pushImageAffine(const float matrix[6], int32_t w, int32_t h, const void* data, uint32_t transparent, color_depth_t depth, const T* palette)
功能说明:
传入参数:
返回值:
函数原型1:
void pushImageAffineWithAA(const float matrix[6], int32_t w, int32_t h, const T* data)
函数原型2:
void pushImageAffineWithAA(const float matrix[6], int32_t w, int32_t h, const T1* data, const T2& transparent)
函数原型3:
void pushImageAffineWithAA(const float matrix[6], int32_t w, int32_t h, const void* data, color_depth_t depth, const T* palette)
函数原型4:
void pushImageAffineWithAA(const float matrix[6], int32_t w, int32_t h, const void* data, uint32_t transparent, color_depth_t depth, const T* palette)
功能说明:
传入参数:
返回值:
函数原型1:
void pushPixels(T* data, int32_t len )
函数原型2:
void pushPixels(const uint16_t* data, int32_t len, bool swap)
void pushPixels(const void* data, int32_t len, bool swap)
功能说明:
传入参数:
返回值:
函数原型1:
void pushPixelsDMA(T* data, int32_t len )
函数原型2:
void pushPixelsDMA(const uint16_t* data, int32_t len, bool swap)
void pushPixelsDMA(const void* data, int32_t len, bool swap)
功能说明:
传入参数:
返回值:
函数原型:
void pushState(void)
功能说明:
传入参数:
返回值:
Generate qrcode from a string.
函数原型:
void qrcode(const char *string, uint16_t x = 50, uint16_t y = 10, uint8_t width = 220, uint8_t version = 6)
void qrcode(const String &string, uint16_t x = 50, uint16_t y = 10, uint8_t width = 220, uint8_t version = 6)
功能说明:
传入参数:
返回值:
函数原型:
uint16_t readData16(uint8_t index=0)
功能说明:
传入参数:
返回值:
函数原型:
uint32_t readData32(uint8_t index=0)
功能说明:
传入参数:
返回值:
函数原型:
uint8_t readData8(uint8_t index=0)
功能说明:
传入参数:
返回值:
函数原型:
uint16_t readPixel(int32_t x, int32_t y)
功能说明:
传入参数:
返回值:
函数原型:
RGBColor readPixelRGB(int32_t x, int32_t y)
功能说明:
传入参数:
返回值:
函数原型:
void readRect( int32_t x, int32_t y, int32_t w, int32_t h, T* data)
功能说明:
传入参数:
返回值:
函数原型:
void readRectRGB( int32_t x, int32_t y, int32_t w, int32_t h, RGBColor* data)
功能说明:
传入参数:
返回值:
函数原型:
void scroll(int_fast16_t dx, int_fast16_t dy)
功能说明:
传入参数:
返回值:
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
uint16_t x;
uint16_t y;
void setup()
{
display.begin();
display.fillScreen(TFT_BLACK);
x = display.width() / 2;
y = display.height() / 2;
display.drawCenterString("scroll", x, y, &fonts::lgfxJapanGothic_24);
}
void loop()
{
for (int i=-10; i<=10; i+=1) {
display.scroll(0, i);
}
}
函数原型:
void setAddrWindow(int32_t x, int32_t y, int32_t w, int32_t h)
功能说明:
传入参数:
返回值:
函数原型:
void setAutoDisplay(bool flg)
功能说明:
传入参数:
返回值:
函数原型:
void setBaseColor(T c)
功能说明:
传入参数:
返回值:
函数原型:
void setBrightness(uint8_t brightness)
功能说明:
传入参数:
返回值:
函数原型:
void setClipRect(int32_t x, int32_t y, int32_t w, int32_t h)
功能说明:
传入参数:
返回值:
函数原型1:
void setColor(uint8_t r, uint8_t g, uint8_t b)
函数原型2:
void setColor(T color)
功能说明:
传入参数:
返回值:
函数原型1:
void setColorDepth(uint8_t bpp)
函数原型2:
void* setColorDepth(color_depth_t depth)
功能说明:
传入参数:
函数原型1:
void setCursor(int16_t x, int16_t y)
函数原型2:
void setCursor(int16_t x, int16_t y, uint8_t font)
void setCursor( int32_t x, int32_t y, const IFont* font)
功能说明:
传入参数:
返回值:
函数原型:
void setEpdMode(epd_mode_t epd_mode)
功能说明:
传入参数:
返回值:
函数原型:
void setFont(const IFont* font)
功能说明:
传入参数:
返回值:
函数原型:
void setFont(const IFont* font)
功能说明:
传入参数:
返回值:
函数原型:
void setRawColor(uint32_t c)
功能说明:
传入参数:
返回值:
函数原型1:
bool setResolution(uint16_t logical_width = 0, uint16_t logical_height = 0, float refresh_rate = 0.0f, uint16_t output_width = 0, uint16_t output_height = 0, uint_fast8_t scale_w = 0, uint_fast8_t scale_h = 0, uint32_t pixel_clock = 74250000)
函数原型2:
bool setResolution( const config_resolution_t& cfg_resolution )
功能说明:
传入参数:
返回值:
For only M5AtomDisplay. Set Resolution.
函数原型:
void setRotation(uint_fast8_t r)
功能说明:
传入参数:
返回值:
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
void setup() {
display.begin();
display.setRotation(2); //Rotate the screen 180 degrees clockwise (2 x 90)
display.fillEllipse(160, 100, 60, 100, YELLOW); //Create a yellow ellipse at (160, 100) with the long axis and the short axis to 60 and 100 respectively.
delay(1000);
display.setRotation(1); //Restore the screen to the default display state
display.fillEllipse(160, 100, 60, 100, GREEN);
}
void loop() {}
setTextScroll(true)
。函数原型:
void setScrollRect(int32_t x, int32_t y, int32_t w, int32_t h, const T& color)
功能说明:
传入参数:
返回值:
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
uint32_t count = 0;
void setup() {
display.begin();
display.setRotation(3);
display.clear(TFT_WHITE);
display.setTextFont(&fonts::FreeMonoBoldOblique18pt7b);
display.setTextColor(TFT_BLACK);
display.setTextScroll(true);
display.setScrollRect(0, 0, display.width(), display.height());
}
void loop() {
display.printf("Scroll: %d\n", count);
count++;
delay(500);
}
函数原型:
void setSwapBytes(bool swap)
功能说明:
传入参数:
返回值:
函数原型1:
void setTextColor(T color)
函数原型2:
void setTextColor(T1 fgcolor, T2 bgcolor)
功能说明:
传入参数:
返回值:
函数原型:
void setTextDatum(textdatum_t datum)
功能说明:
传入参数:
返回值:
函数原型:
void setTextScroll(bool scroll)
功能说明:
传入参数:
返回值:
函数原型1:
void setTextSize(float size)
函数原型2:
void setTextSize(float sx, float sy)
功能说明:
传入参数:
返回值:
函数原型:
void setTextStyle(const TextStyle& text_style)
功能说明:
传入参数:
*关于 TextStyle
返回值:
函数原型:
void setTextWrap( bool wrapX, bool wrapY = false)
功能说明:
传入参数:
返回值:
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
void setup()
{
display.begin();
display.fillScreen(TFT_BLACK);
display.setTextWrap(true, true); // <- Change Value
}
uint32_t count = 0;
void loop()
{
display.printf("wrap--------------------------------------------:%d\n", count);
count++;
delay(100);
}
函数原型:
void setTouchCalibrate(uint16_t *parameters)
功能说明:
传入参数:
返回值:
函数原型:
void setWindow(uint_fast16_t xs, uint_fast16_t ys, uint_fast16_t xe, uint_fast16_t ye)
功能说明:
传入参数:
返回值:
函数原型:
void showFont(uint32_t td = 2000)
功能说明:
传入参数:
返回值:
函数原型:
void sleep(void)
功能说明:
传入参数:
返回值:
函数原型:
void startWrite(bool transaction = true)
功能说明:
startWrite()
可使 M5GFX 有效地利用 DMA 缓冲区。传入参数:
返回值:
函数原型:
uint16_t swap565( uint8_t r, uint8_t g, uint8_t b)
功能说明:
传入参数:
返回值:
函数原型:
uint16_t swap888( uint8_t r, uint8_t g, uint8_t b)
功能说明:
传入参数:
返回值:
函数原型:
int32_t textLength(const char *string, int32_t width)
功能说明:
传入参数:
返回值:
函数原型:
int32_t textWidth(const char *string, const IFont* font)
功能说明:
传入参数:
返回值:
函数原型:
ITouch* touch(void)
功能说明:
传入参数:
返回值:
Restore font set by setFont() to the default font(&fonts::Font0).
函数原型:
void unloadFont(void)
功能说明:
&fonts::Font0
。传入参数:
返回值:
函数原型:
void waitDisplay(void)
功能说明:
传入参数:
返回值:
函数原型:
void waitDMA(void)
功能说明:
传入参数:
返回值:
函数原型:
void wakeup(void)
功能说明:
传入参数:
返回值:
函数原型:
int32_t width (void)
功能说明:
传入参数:
返回值:
函数原型:
void writeColor( const T& color, uint32_t length)
功能说明:
传入参数:
返回值:
案例程序:
#include <Arduino.h>
#include <M5GFX.h>
M5GFX display;
int32_t x;
int32_t y;
void setup()
{
display.begin();
display.fillScreen(TFT_BLACK);
x = display.width() / 2;
y = display.height() / 2;
display.startWrite();
display.setWindow(0, 0, x - 1 , y);
for (int i=0; i<y; i++) {
display.writeColor(TFT_RED, x / 4);
display.writeColor(TFT_BLUE, x / 4);
display.writeColor(TFT_GREEN, x / 4);
display.writeColor(TFT_YELLOW, x / 4);
}
display.endWrite();
}
void loop(){
}
函数原型:
void writeCommand16(uint16_t cmd)
功能说明:
传入参数:
返回值:
函数原型:
void writeData16(uint16_t data)
功能说明:
传入参数:
返回值:
函数原型:
void writeData32(uint32_t data)
功能说明:
传入参数:
返回值:
函数原型:
void writeData(uint8_t data)
功能说明:
传入参数:
返回值:
函数原型1:
void writeFastHLine( int32_t x, int32_t y, int32_t w)
函数原型2:
void writeFastHLine( int32_t x, int32_t y, int32_t w, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void writeFastVLine( int32_t x, int32_t y, int32_t w)
函数原型2:
void writeFastVLine( int32_t x, int32_t y, int32_t w, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void writeFillRect( int32_t x, int32_t y, int32_t w, int32_t h)
函数原型2:
void writeFillRect( int32_t x, int32_t y, int32_t w, int32_t h, const T& color)
功能说明:
传入参数:
返回值:
函数原型:
void writeIndexedPixels(const uint8_t* data, T* palette, int32_t len, uint8_t depth = 8)
功能说明:
传入参数:
返回值:
函数原型1:
void writePixel(int32_t x, int32_t y)
函数原型2:
void writePixel(int32_t x, int32_t y, const T& color)
功能说明:
传入参数:
返回值:
函数原型1:
void writePixels(const T* data, int32_t len)
函数原型2:
void writePixels(const uint16_t* data, int32_t len, bool swap)
void writePixels(const void* data, int32_t len, bool swap)
功能说明:
传入参数:
返回值:
函数原型1:
void writePixels(const T* data, int32_t len)
函数原型2:
void writePixels(const uint16_t* data, int32_t len, bool swap)
void writePixels(const void* data, int32_t len, bool swap)
功能说明:
传入参数:
返回值: