1 // Copyright (C) 2022 Beken Corporation 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #include <driver/gpio.h> 16 #include <driver/media_types.h> 17 #include <driver/lcd_types.h> 18 19 #include "lcd_devices.h" 20 21 static const lcd_rgb_t lcd_rgb = 22 { 23 .clk = LCD_8M, 24 .data_out_clk_edge = POSEDGE_OUTPUT, 25 26 .hsync_back_porch = 40, 27 .hsync_front_porch = 5, 28 .vsync_back_porch = 8, 29 .vsync_front_porch = 8, 30 }; 31 32 const lcd_device_t lcd_device_st7282 = 33 { 34 .id = LCD_DEVICE_ST7282, 35 .name = "st7282", 36 .type = LCD_TYPE_RGB565, 37 .ppi = PPI_480X272, 38 .rgb = &lcd_rgb, 39 .init = NULL, 40 }; 41 42