Description
ROM storage is allocated as follows:
Image Type | Description |
---|---|
PIN pad | PIN pad mode image not-pushed (1 to 3) |
PIN pad pushed | PIN pad mode image pushed (1 to 3) |
Slide | Slide show image (1 to 10) |
Key pad | Key pad mode image not-pushed (1 to 3) |
Key pad pushed | Key pad mode image pushed (1 to 3) |
Signature | Signature mode image not-pushed (1 to 3) |
Signature pushed | Signature mode image pushed (1 to 3) |
Message | MessageBox Image (1 to 6) |
Validate a stored ROM Image
Compute hash for required image
Compute the MD5 hash of the required image, for example by using an encryption library function.
Get hash for stored image
Retrieve the hash in two steps:
1. Request operation:
Item | Message |
---|---|
Operation Mode | Mode 1...5 |
Image design | Image design number |
Image pushed | 0/1: non-pushed/pushed image (0 for MessageBox images) |
Result | 0: Succeeded (image was stored) 1: No image stored |
2. Get operation:
Item | Message |
---|---|
Operation Mode | Mode 1...5 |
Image design | Image design number |
Image pushed | 0/1: non-pushed/pushed image design (0 for MessageBox images) |
Hash | 128 bit hash |
Upload image
Upload an image if no image is stored or the calculated and retrieved hash values do not match.
Image data is sent in three steps:
- Start ROM Image Data
- Write Image Data
- End Image Data
The Tablet interface simplifies the process with a single writeRomImage function.
Start ROM Data:
Item | Message |
---|---|
Encoding mode | 0x04: 24bit Color RAW data format 0x14 24bit Color RAW data format (Bulk) |
Operation Mode | Mode 1..5: 1:PIN Pad mode2:Slide show mode3:Key Pad mode4:Signature mode5:MessageBox |
Image design | Image design number |
Image pushed | 0/1: non-pushed/pushed image design (0 for MessageBox images) |
Image Descriptor | Defined for each image type |
Write Image data:
Item | Message |
---|---|
Data Block Size | Number of bytes |
Image Data | Image data |
End Image Data:
Item | Message |
---|---|
Commit Flag | 0/1: Commit/Abandon |
Start ROM Image Descriptors
PIN Pad
Item | Description |
---|---|
Image design number | Image design number 1..3 |
PIN pad normal image | Image data includes normal buttons, initial message, PIN code display fonts and background image |
PIN pad buttons pushed image | Image data includes pushed buttons, error message and background image |
PIN pad type | Keypad type 1..3 |
Key layout | Round Robin or specific key layout 0..5 |
Slide Show
Item | Description |
---|---|
Image format | Bitmap (24bit color, 16bit color, Monochrome) |
Image resolution | 800 x 480 dots |
Key Pad
Item | Description |
---|---|
Image design number | Image design number 1..3 |
Normal Key Pad screen | Image data includes normal buttons, initial message and background image |
Button pushed Key Pad screen | Image data includes pushed buttons and background image |
KEY Pad type | Type 1..3 |
KEYs Enabled setting | The bitmask (1..9) allows individual keys/buttons to be enabled (1) or disabled (0): Bit 0: key1 Bit 1: key2 Bit 2: key3 etc. |
Signature Capture
Item | Description |
---|---|
Image design number | Image design number 1..3 |
Signature screen (Normal) | Image data includes normal buttons, initial message and background image |
Signature screen (button pushed) | Image data includes pushed buttons and background image |
KEYs Enabled setting | The bitmask (1..3) allows individual keys/buttons to be enabled (1) or disabled (0): Bit 0: key1 - CancelBit 1: key2 - ClearBit 2: key3 - OK |
Message Box
Item | Message |
---|---|
Message Box number | Message ID 1..10 |
Message screen | Message screen image data |
API Reference
Function | Description |
---|---|
getRomImageHash | Tablet get hash function |
writeRomImage | Tablet write ROM functions |
Code illustration
Upload Image
The code illustrates uploading a SlideShow image
uploadImage(...)
{
writeImage = true;
// get the hash of the image stored in ROM (if it exists)
tablet.setRomImageHash(operationModeType, imageType, imageNumber);
romImgHash = tablet.getRomImageHash();
if (romImgHash.result == 0)
{
// there is already an image on the tablet - check it is the right one// compute hash of the required image
imgHash = getImageHash(bitmapData.data(), bitmapData.size());
if (imgHash == romImgHash.hash)
{
// image matches, no need to write it again
writeImage = false;
}
}
if (writeImage)
{
romStartImageData = initializeSlideShow(encodingMode, imageType, imageNumber);
tablet.writeRomImage(romStartImageData, bitmapData.data(), bitmapData.size());
}
}