improve gpio function call api