My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

tft_lvgl_configuration.h 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * @file lcd/extui/mks_ui/tft_lvgl_configuration.h
  25. * @date 2020-02-21
  26. */
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. #include <lvgl.h>
  31. //#define TFT_ROTATION TFT_ROTATE_180
  32. extern uint8_t bmp_public_buf[14 * 1024];
  33. extern uint8_t public_buf[513];
  34. void tft_lvgl_init();
  35. void my_disp_flush(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * color_p);
  36. bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data);
  37. bool my_mousewheel_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
  38. void LCD_Clear(uint16_t Color);
  39. void tft_set_point(uint16_t x, uint16_t y, uint16_t point);
  40. void LCD_setWindowArea(uint16_t StartX, uint16_t StartY, uint16_t width, uint16_t height);
  41. void LCD_WriteRAM_Prepare();
  42. void lcd_draw_logo();
  43. void lv_encoder_pin_init();
  44. void lv_update_encoder();
  45. lv_fs_res_t spi_flash_open_cb(lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode);
  46. lv_fs_res_t spi_flash_close_cb(lv_fs_drv_t * drv, void * file_p);
  47. lv_fs_res_t spi_flash_read_cb(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
  48. lv_fs_res_t spi_flash_seek_cb(lv_fs_drv_t * drv, void * file_p, uint32_t pos);
  49. lv_fs_res_t spi_flash_tell_cb(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p);
  50. lv_fs_res_t sd_open_cb(lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode);
  51. lv_fs_res_t sd_close_cb(lv_fs_drv_t * drv, void * file_p);
  52. lv_fs_res_t sd_read_cb(lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
  53. lv_fs_res_t sd_seek_cb(lv_fs_drv_t * drv, void * file_p, uint32_t pos);
  54. lv_fs_res_t sd_tell_cb(lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p);
  55. void lv_fill_rect(lv_coord_t x1, lv_coord_t y1, lv_coord_t x2, lv_coord_t y2, lv_color_t bk_color);
  56. bool get_lcd_dma_lock();
  57. #ifdef __cplusplus
  58. } /* C-declarations for C++ */
  59. #endif