int ser_sr24_get_portmode( | |
ser_sr24 handle, | //serial board handle |
int port, | //serial board port whose configuration you want to read |
int property | //port property you want to know about |
); |
handle: |
|
port: |
|
property: |
|
int mode; /* the board has already been opened, and the handle stored in 'handle' */ mode = ser_sr24_get_portmode(handle, 1, SR24_DIRECTION); if(mode < 0) /* all error codes are negative */ { printf("Error getting portmode: %s\n", ser_sr24_error_string(mode)); } else if(mode == SR24_DIRECTION_INPUT) { printf("Port 1 is in input mode.\n"); } else if(mode == SR24_DIRECTION_OUTPUT) { printf("Port 1 is in output mode.\n"); }
object.GetPortMode( | |
ByVal port As Long | 'serial board port whose configuration you want to read |
ByVal property As PortProperty | 'port property you want to know about |
) As Long |
result = object.GetPortMode(3, SR24_DIRECTION) 'find out if Port 3 is in Input or Output mode
Back to Contents | Winford Engineering (2000) |