1 /* 2 * Common LCD device functionality. 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 "lcd-device.h" 23 24 void Lcd_device::disable_display() 25 { 26 _display->disable(); 27 } 28 29 void Lcd_device::enable_display() 30 { 31 _display->enable(); 32 } 33 34 // C language interface. 35 36 void *lcd_get_device() 37 { 38 return (void *) Lcd_device::get_device(); 39 } 40 41 l4_addr_t lcd_get_framebuffer(void *lcd) 42 { 43 return static_cast<Lcd_device *>(lcd)->get_framebuffer(); 44 } 45 46 l4_size_t lcd_get_framebuffer_size(void *lcd) 47 { 48 return static_cast<Lcd_device *>(lcd)->get_framebuffer_size(); 49 } 50 51 void lcd_get_view_info(void *lcd, l4re_video_view_info_t *view_info) 52 { 53 return static_cast<Lcd_device *>(lcd)->get_view_info(view_info); 54 } 55 56 void lcd_disable(void *lcd) 57 { 58 static_cast<Lcd_device *>(lcd)->disable(); 59 } 60 61 void lcd_enable(void *lcd) 62 { 63 static_cast<Lcd_device *>(lcd)->enable(); 64 }