Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DM_HttpServer DM_USBHost
Dependents: lpc4088_displaymodule_emwin lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI ... more
Fork of DMSupport by
Bios/bios.h
- Committer:
- embeddedartists
- Date:
- 2015-01-16
- Revision:
- 22:1a58a518435c
- Child:
- 26:a65fbb4bde5c
File content as of revision 22:1a58a518435c:
#ifndef BIOS_H
#define BIOS_H
#include <stdint.h>
#include <stdbool.h>
#define BIOS_MAGIC 0xEA0123EA
#define BIOS_VER 1
typedef enum {
BiosError_Ok = 0,
BiosError_ConfigError = 1,
BiosError_WrongBPP = 2,
BiosError_InvalidParam = 3,
BiosError_NoInit = 4,
BiosError_Calibration = 5,
BiosError_Timeout = 6,
BiosError_CommError = 7,
BiosError_NotSupported = 8,
} BiosError_t;
typedef enum {
Res_16bit_rgb565 = 1<<0,
Res_18bit_rgb666 = 1<<1,
Res_24bit_rgb888 = 1<<2,
} Resolution_t;
typedef struct {
uint16_t x;
uint16_t y;
uint16_t z;
} touch_coordinate_t;
typedef void (*delayUsFunc)(int us);
typedef uint32_t (*readTimeMsFunc)(void);
typedef BiosError_t (*initParamFunc)(void* data, uint32_t SystemCoreClock, uint32_t PeripheralClock, delayUsFunc delay, readTimeMsFunc readMs);
typedef BiosError_t (*simpleFunc)(void* data);
typedef BiosError_t (*powerUpFunc)(void* data, void* framebuffer, Resolution_t wanted);
typedef BiosError_t (*backlightFunc)(void* data, int percent);
typedef BiosError_t (*infoFuncD)(void* data,
uint16_t* width,
uint16_t* height,
uint16_t* bytesPerPixel,
bool* landscape,
uint16_t* supportedResolutions,
Resolution_t* currentResolution);
typedef BiosError_t (*infoFuncT)(void* data,
bool* supportsTouch,
bool* supportsCalibration,
bool* resistive,
uint8_t* numPoints);
typedef void (*touchIrqFunc)(uint32_t arg, bool enable, bool rising);
typedef BiosError_t (*touchInitFunc)(void* data, touchIrqFunc irqEnabler, uint32_t enablerArg);
typedef BiosError_t (*readFunc)(void* data, touch_coordinate_t* coords, int num);
typedef BiosError_t (*nextFunc)(void* data, uint16_t* x, uint16_t* y, bool* last);
typedef BiosError_t (*waitCalibFunc)(void* data, bool* morePoints, uint32_t timeoutMs);
typedef BiosError_t (*spifiFunc)(void* data, uint8_t mfgr, uint8_t devType, uint8_t devID, uint32_t memSize, bool* known, uint32_t* eraseBlockSize);
typedef struct {
initParamFunc initParams;
simpleFunc displayInit;
powerUpFunc displayPowerUp;
simpleFunc displayPowerDown;
backlightFunc displayBacklight;
infoFuncD displayInformation;
touchInitFunc touchInit;
simpleFunc touchPowerUp;
simpleFunc touchPowerDown;
readFunc touchRead;
simpleFunc touchCalibrateStart;
nextFunc touchGetNextCalibPoint;
waitCalibFunc touchWaitForCalibratePoint;
simpleFunc touchIrqHandler;
infoFuncT touchInformation;
spifiFunc spifiIsSupported;
} bios_header_t;
typedef struct {
uint32_t magic;
uint32_t size;
uint32_t crc;
uint32_t version;
uint32_t paramSize;
uint32_t headerSize;
bios_header_t header;
} file_header_t;
#endif /* BIOS_H */
