|
_How to define external stubs to implement your CommLCD engine and
|
|
_How to define external stubs to implement your CommLCD engine and
|
|
Comm IAL engine outside MiniGUI Core._
|
|
Comm IAL engine outside MiniGUI Core._
|
|
|
|
|
|
|
|
Table of Contents
|
|
|
|
|
|
|
|
- [Introduction](#introduction)
|
|
|
|
- [Key Points](#key-points)
|
|
|
|
- [Functions to be Implemented](#functions-to-be-implemented)
|
|
|
|
* [CommLCD NEWGAL engine](#commlcd-newgal-engine)
|
|
|
|
+ [Initializing the engine](#initializing-the-engine)
|
|
|
|
+ [Setting video mode](#setting-video-mode)
|
|
|
|
+ [Setting palette](#setting-palette)
|
|
|
|
+ [Update method](#update-method)
|
|
|
|
+ [Releasing the engine](#releasing-the-engine)
|
|
|
|
* [Comm IAL engine](#comm-ial-engine)
|
|
|
|
- [Summary](#summary)
|
|
|
|
- [References](#references)
|
|
|
|
|
|
## Introduction
|
|
## Introduction
|
|
|
|
|
|
Since MiniGUI 3.2.2, you can use MiniGUI's built-in CommLCD NEWGAL engine
|
|
Since MiniGUI 3.2.2, you can use MiniGUI's built-in CommLCD NEWGAL engine
|
... | @@ -69,7 +84,7 @@ Note that, all external methods for CommLCD engine should return zero for succes |
... | @@ -69,7 +84,7 @@ Note that, all external methods for CommLCD engine should return zero for succes |
|
|
|
|
|
#### Setting video mode
|
|
#### Setting video mode
|
|
|
|
|
|
`__commlcd_drv_getinfo` will be called when MiniGUI trying to set the video
|
|
`__commlcd_drv_getinfo` will be called when MiniGUI tries to set the video
|
|
mode according to your settings in the MiniGUI runtime configuration, e.g.,
|
|
mode according to your settings in the MiniGUI runtime configuration, e.g.,
|
|
`defaultmode=240x320-32bpp`.
|
|
`defaultmode=240x320-32bpp`.
|
|
|
|
|
... | @@ -94,7 +109,7 @@ call and returns the video information via `struct commlcd_info* li`: |
... | @@ -94,7 +109,7 @@ call and returns the video information via `struct commlcd_info* li`: |
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
You need fill the all fields of `struct commlcd_info* li` by the correct
|
|
You need fill the all fields of `struct commlcd_info* li` with the correct
|
|
values:
|
|
values:
|
|
|
|
|
|
* `type`: The video mode type. Currently, CommLCD supports the following modes:
|
|
* `type`: The video mode type. Currently, CommLCD supports the following modes:
|
... | @@ -168,7 +183,7 @@ If you specify the `update_method` to be `COMMLCD_UPDATE_SYNC` or |
... | @@ -168,7 +183,7 @@ If you specify the `update_method` to be `COMMLCD_UPDATE_SYNC` or |
|
`COMMLCD_UPDATE_ASYNC`, the update method `__commlcd_drv_update` will
|
|
`COMMLCD_UPDATE_ASYNC`, the update method `__commlcd_drv_update` will
|
|
be called frequently or periodically.
|
|
be called frequently or periodically.
|
|
|
|
|
|
In our sample, this method save the whole frame buffer content to Windows
|
|
In our sample, this method saves the whole frame buffer content to Windows
|
|
bitmap files by calling MiniGUI function:
|
|
bitmap files by calling MiniGUI function:
|
|
|
|
|
|
int __commlcd_drv_update (const RECT* rc_dirty)
|
|
int __commlcd_drv_update (const RECT* rc_dirty)
|
... | | ... | |