A board support package for the LPC4088 Display Module.
Dependencies: DM_HttpServer DM_USBHost
Dependents: lpc4088_displaymodule_emwin lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI ... more
Fork of DMSupport by
BiosLoader.h
00001 /* 00002 * Copyright 2014 Embedded Artists AB 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef BIOSLOADER_H 00018 #define BIOSLOADER_H 00019 00020 #include "mbed.h" 00021 #include "DMBoard.h" 00022 #include "BiosDisplay.h" 00023 #include "BiosTouch.h" 00024 #include "bios.h" 00025 00026 /** 00027 * Unpacks and prepares the BIOS code. 00028 */ 00029 class BiosLoader { 00030 public: 00031 00032 /** Get the only instance of the BiosLoader 00033 * 00034 * @returns The BIOS 00035 */ 00036 static BiosLoader& instance() 00037 { 00038 static BiosLoader singleton; 00039 return singleton; 00040 } 00041 00042 00043 void getMacAddress(char mac[6]); 00044 bool isKnownSPIFIMemory(uint8_t mfgr, uint8_t devType, uint8_t devID, uint32_t memSize, uint32_t* eraseBlockSize); 00045 void handleI2CInterrupt(); 00046 00047 void getBiosStats(uint8_t& type, uint8_t& major, uint8_t& minor, uint8_t& rev); 00048 00049 friend class BiosDisplay; 00050 friend class BiosTouch; 00051 friend class DMBoard; 00052 00053 private: 00054 00055 bool _initialized; 00056 00057 bios_header_t _bios; 00058 void* _biosData; 00059 uint8_t* _conf; 00060 uint32_t _confSize; 00061 uint32_t _stats; 00062 00063 explicit BiosLoader(); 00064 // hide copy constructor 00065 BiosLoader(const BiosLoader&); 00066 // hide assign operator 00067 BiosLoader& operator=(const BiosLoader&); 00068 ~BiosLoader(); 00069 00070 /** Loads, verifies and prepares the BIOS 00071 * 00072 * @returns 00073 * Ok on success 00074 * An error code on failure 00075 */ 00076 DMBoard::BoardError init(); 00077 DMBoard::BoardError readBIOS(uint8_t** data, uint32_t* size); 00078 DMBoard::BoardError params(bios_header_t** header, void** instanceData); 00079 00080 void resetI2C(); 00081 }; 00082 00083 #endif /* BIOSLOADER_H */
Generated on Tue Jul 12 2022 14:18:31 by 1.7.2