stmhal: Use rt_check_nargs to check number of arguments.