CliCommandExecuteCallback

Type Alias CliCommandExecuteCallback 

Source
pub type CliCommandExecuteCallback = Option<unsafe extern "C" fn(pipe: *mut PipeSide, args: *mut FuriString, context: *mut c_void)>;
Expand description

CLI command execution callback pointer

This callback will be called from a separate thread spawned just for your command. The pipe will be installed as the thread’s stdio, so you can use printf, getchar and other standard functions to communicate with the user.

§Arguments

  • [in] - pipe Pipe that can be used to send and receive data. If CliCommandFlagDontAttachStdio was not set, you can also use standard C functions (printf, getc, etc.) to access this pipe.
  • [in] - args String with what was passed after the command
  • [in] - context Whatever you provided to cli_add_command

Aliased Type§

pub enum CliCommandExecuteCallback {
    None,
    Some(unsafe extern "C" fn(*mut PipeSide, *mut FuriString, *mut c_void)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut PipeSide, *mut FuriString, *mut c_void))

Some value of type T.