Subdirectory provided by Embedded Artists
Dependencies: DM_FATFileSystem DM_HttpServer DM_USBHost EthernetInterface USBDevice mbed-rpc mbed-rtos mbed-src
Dependents: lpc4088_displaymodule_hello_world_Sept_2018
Fork of DMSupport by
Display/BiosDisplay.h
- Committer:
- embeddedartists
- Date:
- 2015-01-16
- Revision:
- 23:6afd6a716e80
- Parent:
- 22:1a58a518435c
- Child:
- 31:d47cffcb0a3e
File content as of revision 23:6afd6a716e80:
/* * Copyright 2014 Embedded Artists AB * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef BIOSDISPLAY_H #define BIOSDISPLAY_H #include "mbed.h" #include "TouchPanel.h" #include "Display.h" #include "bios.h" /** * Glue between the BIOS and the Display interface. */ class BiosDisplay : public Display { public: /** Get the only instance of the BiosDisplay * * @returns The display */ static BiosDisplay& instance() { static BiosDisplay singleton; return singleton; } /** Initializes the display but does not turn it on * * @returns * Ok on success * An error code on failure */ DisplayError init(); // From the Display interface virtual DisplayError powerUp(void* framebuffer, Resolution wanted = Resolution_16bit_rgb565); virtual DisplayError powerDown(); virtual DisplayError backlight(int percent); virtual uint16_t width(); virtual uint16_t height(); virtual uint16_t bytesPerPixel(); virtual uint32_t fbSize(); virtual bool landscape(); virtual bool isSupported(Resolution res); virtual Resolution currentResolution(); virtual void setFramebuffer(void* buff); virtual void* swapFramebuffer(void* buff); virtual void* allocateFramebuffer(Resolution res=Resolution_16bit_rgb565); private: bool _initialized; bool _poweredOn; bios_header_t* _bios; void* _biosData; uint16_t _width; uint16_t _height; uint16_t _bpp; uint16_t _supportedRes; Resolution_t _activeRes; bool _landscape; explicit BiosDisplay(); // hide copy constructor BiosDisplay(const BiosDisplay&); // hide assign operator BiosDisplay& operator=(const BiosDisplay&); ~BiosDisplay(); }; #endif /* BIOSDISPLAY_H */