sub_gpio_write

Top  Previous  Next
Got to SUB-20 page

Synopsis

int   sub_gpio_write( sub_handle hndl, int set, int* get, int mask )

 

Set GPIO output status. For GPIO in output state function will set output driver to drive "1"-high, "0"-low. For GPIO in input state function will "1"-enable, "0"-disable weak pull-up on corresponding GPIO pin.

Parameters

set - Bits 0..31 of set parameter correspond to GPIO0..GPIO31 output statuses.

*get - Pointer to store current GPIO output status read from SUB-20.

mask - Bit in set parameter will take effect only if corresponding mask bit is "1". With mask=0 function will only read current GPIO output status.

Return value

On success function returns 0. Otherwise error code.

See also

Error Codes