Gpio And Keypad Control; How To Control Gpio Of Beta903A - Bolymin BETA903A User Manual

Mobile data terminal
Table of Contents

Advertisement

4.6.

GPIO And Keypad Control

4.6.1.

How to control GPIO of BETA903A

Bolymin provides a DLL file "pGPIO_903A.dll" to control the General Purpose Input and
Ouput(GPIO) signal. User could read current value of all GPIO of BETA903A and change values
of GP output signal by functions in "pGPIO_903A.dll".
User could use GPIO control functions by following procedures:
STEP 1. Add "pGPIO_903A.h" into project.
STEP 2. Load "pGPIO_903A.dll" by "Loadlibrary()" function.
STEP 3. Get the address of control functions by "GetProcAddress()" function.
STEP 4. Execute GPIO control functions by the address got at STEP3.
Here is a simple example code to use the GPIO control functions:
// variable declaration
HINSTANCE m_hModule;
BOOL (*m_pGetGPInput)(int);
void (*m_pSetGPOutput)(int, BOOL);
m_hModule=::LoadLibrary(_T("pGPIO_903A.dll"));
m_pGetGPInput = (BOOL (*)(int))::GetProcAddress(m_hModule,_T("GetGPInput"));
m_pSetGPOutput = (void (*)(int, BOOL))::GetProcAddress(m_hModule,_T("SetGPOutput"));
m_bPOUT1 = m_pGetGPInput(GO_POUT1);
m_pSetGPOutput(GO_BLIGHT_ENABLE, TRUE);
BETA903A USER MANUAL
Load "pGPIO_903A.dll" and get the
address of GPIO control functions.
Execute GPIO control functions.
- 90 -

Advertisement

Table of Contents
loading

Table of Contents