Moxa MPC-122Y-K-ECDIS [46/47] Mpc122k_set_backlight function

Moxa MPC-122Y-K-ECDIS [46/47] Mpc122k_set_backlight function
MPC-122-K Hardware ECDIS Library and API Development
C-2
Installation
The ECDIS API is included on the CD ROM. Copy the file to your development machine and use the appropriate
Windows tool to extract the zip file to your target folder. Note that the ECDIS API is only for Windows systems.
Source Tree
The following files will be extracted from the zip file.
mxecdis Working Directories
MXECRGB.sys driver for retrieving the RGB table
mxecdis.dll ECDIS DLL
mxecdis.lib ECDIS API LIB
MXECDISRGB.h API header file for retrieving the RGB table
MXMPC122K.h backlight API header file
sample ECDIS API demo program source folder
You can refer to files in the sample directory to help using the ECDIS API in your own programs.
ECDIS Library
Programming functions for backlight settings and RGB table retrieval are introduced in this section.
Backlight Function
In an ECDIS system, each color table (DAY, DUSK, or NIGHT) has its own backlight value. This section
describes how to use the function to set the backlight.
mpc122k_set_backlight function
This function is used to configure the backlight of the MPC-122-K-ECDIS.
int mpc122k_set_backlight(int backlight);
Inputs
backlight Specifies the backlight value ranged from 0 ~ 100.
Return Value
Returns 0, if successful;
Returns -1 in case of error
ECDIS RGB Data Structure
ECDIS RGB functions provide the method used to retrieve the RGB tables from an MPC-122-K-ECDIS computer.
This data structure defines the RGB tables and backlight values for DAY, DUSK, and NIGHT.
#define MAX_COLOR_TOKEN 63
typedef struct _ECDIS_RGB
{
unsigned char DATE_TIME[12]; /* YYYYmmddHHMM, ASCII, 24h */
unsigned char RGB_TB_DAY[MAX_COLOR_TOKEN][3];
unsigned char RGB_TB_DUSK[MAX_COLOR_TOKEN][3];
unsigned char RGB_TB_NIGHT[MAX_COLOR_TOKEN][3];
unsigned char RGB_BKL[3];
} ECDIS_RGB, *PECDIS_RGB;

Содержание

Похожие устройства

Скачать