BE220C USER MANUAL
- 64 -
3.4 GPIO Control
3.4.1 How to Control GPIO for BE220C
Bolymin provides a DLL file “
pGPIO_220A.dll
”,which is already included in your WinCE OS as a
hidden file, to control the General Purpose Input and Ouput(GPIO) signal. In BEGA220A, there
are 12 user defined GPIO. User may read current value of all GPIO of BEGA220A, change
values of GP output signal and set the attribute of GPIO by functions in “
pGPIO_220A.dll
”.
User may use GPIO control functions by following procedures:
STEP 1.
Add
“pGPIO_220A.h”
into project.
STEP 2.
Load “
pGPIO_220A.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.
Below 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);
BOOL (*m_pIsOutput)(int);
void (*m_pSetIOAttribute)(int, BOOL);
m_hModule=::LoadLibrary(_T("
pGPIO_220A.dll
"));
m_pGetGPInput = (BOOL (*)(int))::GetProcAddress(m_hModule,_T("GetGPInput"));
m_pSetGPOutput = (void (*)(int, BOOL))::GetProcAddress(m_hModule,_T("SetGPOutput"));
m_pIsOutput = (BOOL (*)(int))::GetProcAddress(m_hModule,_T("IsOutput"));
m_pSetIOAttribute = (void (*)(int, BOOL))::GetProcAddress(m_hModule,_T("SetIOAttribute"));
m_pSetIOAttribute(GIO_KEY1, GA_INPUT);
m_bPOUT1 = m_pGetGPInput(GIO_KEY1);
m_pSetIOAttribute(GIO_KEY1, GA_OUTPUT);
if (m_pIsOutput(GIO_KEY1))
m_pSetGPOutput(GIO_KEY1, TRUE);
Load “
pGPIO_220A.dll
” and get the address of
GPIO control functions.
Execute GPIO control functions.
Содержание BE220C
Страница 3: ...BE220C USER MANUAL 3 History of Version Version Contents Date Note 01 Original version 2013 12 18 Spec...
Страница 9: ...BE220C USER MANUAL 9 1 2 Specifications 1 2 1 System Functional Blocks...
Страница 11: ...BE220C USER MANUAL 11 1 3 Mechanical Specifications 1 3 1 Module Specifications...
Страница 18: ...BE220C USER MANUAL 18 STEP7 Enter URL at the Address box...
Страница 44: ...BE220C USER MANUAL 44 STEP4 After assembly finished as illustrated Front view Bottom view...
Страница 45: ...BE220C USER MANUAL 45 Side view...
Страница 49: ...BE220C USER MANUAL 49 3 Click Continue button 4 Click Finish button Now BE220C may connect to PC by ActiveSync...
Страница 50: ...BE220C USER MANUAL 50 5 Select No and click Next button to cancel the synchronization...
Страница 72: ...BE220C USER MANUAL 72 End of BE220C User Manual...