libdragon
Loading...
Searching...
No Matches
Data Fields
stdio_t Struct Reference

Standard I/O hook structure. More...

#include <system.h>

Data Fields

int(* stdin_read )(char *data, unsigned int len)
 Function to call when performing a STDIN read.
 
int(* stdout_write )(char *data, unsigned int len)
 Function to call when performing a STDOUT write.
 
int(* stderr_write )(char *data, unsigned int len)
 Function to call when performing a STDERR write.
 

Detailed Description

Standard I/O hook structure.

This structure provides optional callback hooks for code wishing to respond to reads from STDIN or writes to STDOUT or STDERR. Any function that code does not wish to handle should be left as a null pointer.

Field Documentation

◆ stdin_read

int(* stdio_t::stdin_read) (char *data, unsigned int len)

Function to call when performing a STDIN read.

Parameters
[out]dataPointer to data buffer to place the read data
[in]lenLength of data in bytes expected to be read
Returns
Actual number of bytes read into data, not to exceed the original length.

◆ stdout_write

int(* stdio_t::stdout_write) (char *data, unsigned int len)

Function to call when performing a STDOUT write.

Parameters
[in]dataPointer to data buffer containing the data to write
[in]lenLength of data in bytes expected to be written
Returns
Actual number of bytes written from data, not to exceed the original length.

◆ stderr_write

int(* stdio_t::stderr_write) (char *data, unsigned int len)

Function to call when performing a STDERR write.

Parameters
[in]dataPointer to data buffer containing the data to write
[in]lenLength of data in bytes expected to be written
Returns
Actual number of bytes written from data, not to exceed the original length.

The documentation for this struct was generated from the following file: