Acrosser AR-B6051 User Manual
Page 53
Return Value: If the function gets the value successfully, it returns 0, any other returned value
stands for error.
1. Syntax:
i32 setChLevel(u8 val )
Description: Set the status of GPIO Output pins.
Parameters:
This function takes an unsigned char as the parameter. The bit0 ~ bit3 in variable ‘val’ represent the
status of the output pins. The bit3 ~ bit7 in the variable ‘val’ are of no use and can be neglected.
For example:
u8 val = 0xf;
i32 result;
result = setChLevel(val);
if(result != 0)
printf(“Fail to set GPIO!\n”);
Return Value: If the function sets the values successfully, it returns 0, any other returned value stands
for error.
53