1 /* 2 * Export a panel structure. 3 * 4 * (c) 2018 Paul Boddie <paul@boddie.org.uk> 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 of 9 * the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 * Boston, MA 02110-1301, USA 20 */ 21 22 #include <l4/devices/lcd-jz4740-config.h> 23 #include <l4/devices/lcd-jz4740-panel.h> 24 #include "panel-server.h" 25 26 #include <l4/re/util/object_registry> 27 28 static struct Jz4740_lcd_panel panel = { 29 .config = ( 30 Jz4740_lcd_mode_tft_serial 31 | Jz4740_lcd_pclock_negative 32 | Jz4740_lcd_hsync_negative 33 | Jz4740_lcd_vsync_negative 34 | Jz4740_lcd_de_positive), 35 36 .width = 320, 37 .height = 240, 38 .bpp = 32, 39 .frame_rate = 70, 40 .hsync = 1, 41 .vsync = 1, 42 .line_start = 140, 43 .line_end = 273, 44 .frame_start = 20, 45 .frame_end = 1, 46 }; 47 48 static L4Re::Util::Registry_server<> server; 49 50 int main(void) 51 { 52 /* Initialise and register a new server object. */ 53 54 Panel_server server_obj(&panel, sizeof(panel)); 55 server.registry()->register_obj(&server_obj, "panel"); 56 57 /* Enter the IPC server loop. */ 58 59 server.loop(); 60 return 0; 61 }