![Psion Teklogix OMNii HDK XT10 Скачать руководство пользователя страница 53](http://html1.mh-extra.com/html/psion-teklogix/omnii-hdk-xt10/omnii-hdk-xt10_user-manual_1622954053.webp)
Chapter 4: Software
Omnii HDK API Functions
Psion Teklogix Omnii HDK User Manual
43
Returns
•
ERROR_SUCCESS – if successful.
•
ERROR_INVALID_HANDLE – the specified handle is invalid.
•
ERROR_INVALID_PARAMETER – the specified pin is not valid, or the direction pointer
is null.
•
ERROR_INVALID_DATA - an exception was generated.
•
Other errors are possible.
Sample Code
4.7.4.10 Hdk7545_ExpansionSetPinMode
Syntax
DWORD Hdk7545_ExpansionSetPinMode( HANDLE hdk, DWORD pin, DWORD mode );
Parameters
•
hdk – [in] an open HDK handle.
•
pin – [in] the ID of the expansion connector pin. The pin parameter must be set to one of the
HDK7545_GPIO_PIN_EXPANSION_xxx values.
•
mode – [in] the new pin mode(s) to set (see description below).
Description
Changes the mode of the specified pin on the expansion connector. The mode can be set to either
'Hdk7545_PinMode_NoInterrupt' or to a combination of one or more of the following values:
Hdk7545_PinMode_InterruptLowHigh
[edge-triggered interrupts]
Hdk7545_PinMode_InterruptHighLow
[edge-triggered interrupts]
Hdk7545_PinMode_InterruptLow
[level-triggered interrupts]
Hdk7545_PinMode_InterruptHigh
[level-triggered interrupts]
DWORD GetDirection()
{
Hdk7545_Connector expansionSlot = Hdk7545_Connector_Expansion1;
HANDLE hdkHandle = INVALID_HANDLE_VALUE;
DWORD result = Hdk7545_Open(&hdkHandle, expansionSlot);
if( result != ERROR_SUCCESS ) {
return ERROR_NOT_SUPPORTED;
}
Hdk7545_PinDirection direction = Hdk7545_PinDirection_Output;
Hdk7545_ExpansionGetPinDirection(hdkHandle,
HDK7545_GPIO_PIN_EXPANSION_GPIO0_TXD, &direction);
RETAILMSG(1, (L"The pin direction for %u is %u\r\n",
HDK7545_GPIO_PIN_EXPANSION_GPIO0_TXD, direction));
Hdk7545_Close(&hdkHandle);
return ERROR_SUCCESS;
}
Содержание OMNii HDK XT10
Страница 4: ......
Страница 10: ......
Страница 12: ......
Страница 18: ......
Страница 20: ......
Страница 24: ......
Страница 26: ......
Страница 32: ......
Страница 72: ......
Страница 90: ......
Страница 92: ......
Страница 116: ......
Страница 124: ......
Страница 126: ......
Страница 130: ......
Страница 132: ......
Страница 154: ......
Страница 168: ......
Страница 170: ......
Страница 182: ......
Страница 184: ......
Страница 188: ......