RTEMS  5.0.0
Typedefs | Functions | Variables
bspIo.h File Reference

Interface to Kernel Print Methods. More...

#include <rtems/score/basedefs.h>
#include <stdarg.h>

Go to the source code of this file.

Typedefs

typedef void(* BSP_output_char_function_type) (char c)
 
typedef int(* BSP_polling_getchar_function_type) (void)
 

Functions

int getchark (void)
 Get Character (kernel I/O) More...
 
int vprintk (const char *fmt, va_list ap)
 Variable Argument printk() More...
 
int rtems_printk_printer (void *ignored, const char *format, va_list ap)
 
int printk (const char *fmt,...) RTEMS_PRINTFLIKE(1
 Kernel Print. More...
 
int int putk (const char *s)
 Kernel Put String. More...
 
void rtems_putc (char c)
 Kernel Put Character. More...
 

Variables

BSP_output_char_function_type BSP_output_char
 
BSP_polling_getchar_function_type BSP_poll_char
 

Detailed Description

Interface to Kernel Print Methods.

This include file defines the interface to kernel print methods.

Typedef Documentation

◆ BSP_output_char_function_type

typedef void(* BSP_output_char_function_type) (char c)

This type defines the prototype for the BSP provided method to print a single character. It is assumed to be polled.

◆ BSP_polling_getchar_function_type

typedef int(* BSP_polling_getchar_function_type) (void)

This type defines the prototype for the BSP provided method to input a single character. It is assumed to be polled.

Function Documentation

◆ getchark()

int getchark ( void  )

Get Character (kernel I/O)

This method polls for a key in the simplest possible fashion from whatever the debug console device is.

Returns
If a character is available, it is returned. Otherwise this method returns -1.
Note
This method uses the BSP_poll_char pointer to a BSP provided method.

◆ printk()

int printk ( const char *  fmt,
  ... 
)

Kernel Print.

This method allows the user to perform a debug printk(). It performs a character translation from "\n" to "\r\n".

Parameters
[in]fmtis a printf()-style format string
Returns
The number of characters output.

◆ putk()

int int putk ( const char *  s)

Kernel Put String.

This method allows the user to perform a debug puts().

Parameters
[in]sis the string to print
Returns
The number of characters output.

Kernel putk (e.g. puts) function requiring minimal infrastrure.

◆ rtems_putc()

void rtems_putc ( char  c)

Kernel Put Character.

This method allows the user to perform a debug putc(). It performs a character translation from "\n" to "\r\n".

Parameters
[in]cis the character to print

◆ vprintk()

int vprintk ( const char *  fmt,
va_list  ap 
)

Variable Argument printk()

This method allows the user to access printk() functionality with a va_list style argument.

Parameters
[in]fmtis a printf()-style format string
[in]apis a va_list pointer to arguments
Returns
The number of characters output.

Variable Documentation

◆ BSP_output_char

This variable points to the BSP provided method to output a character for the purposes of debug output.

It must output only the specific character. It must not perform character translations, e.g. "\n" to "\r\n".

◆ BSP_poll_char

This variable points to the BSP provided method to input a character for the purposes of debug input.