You've already forked ESP32-DAPLink
mirror of
https://github.com/m5stack/ESP32-DAPLink.git
synced 2026-05-20 11:37:17 -07:00
40 lines
904 B
C++
40 lines
904 B
C++
#include "app_display_c_api.h"
|
|
#include "M5Unified.h"
|
|
|
|
|
|
extern "C" void lfgx_write_pixels(void* param, uint32_t len);
|
|
void lfgx_write_pixels(void* param, uint32_t len)
|
|
{
|
|
M5.Display.writePixels((lgfx::rgb565_t *)param, len);
|
|
}
|
|
|
|
extern "C" void lfgx_set_addr_window(int32_t x, int32_t y, int32_t w, int32_t h);
|
|
void lfgx_set_addr_window(int32_t x, int32_t y, int32_t w, int32_t h)
|
|
{
|
|
M5.Display.setAddrWindow(x, y, w, h);
|
|
}
|
|
|
|
extern "C" void lfgx_start_write(void);
|
|
void lfgx_start_write(void)
|
|
{
|
|
M5.Display.startWrite();
|
|
}
|
|
|
|
extern "C" void lfgx_end_write(void);
|
|
void lfgx_end_write(void)
|
|
{
|
|
M5.Display.endWrite();
|
|
}
|
|
|
|
extern "C" uint8_t m5gfx_get_touch(uint16_t* x, uint16_t* y);
|
|
uint8_t m5gfx_get_touch(uint16_t* x, uint16_t* y)
|
|
{
|
|
return M5.Display.getTouch(x, y);
|
|
}
|
|
|
|
extern "C" void beep(void);
|
|
void beep(void)
|
|
{
|
|
M5.Speaker.tone(4000, 100);
|
|
}
|