RTEMS CPU Kit with SuperCore  4.11.3
Typedefs | Functions | Variables
bspIo.h File Reference

Interface to Kernel Print Methods. More...

#include <stdarg.h>
Include dependency graph for bspIo.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef void(* BSP_output_char_function_type) (char c)
 This type defines the prototype for the BSP provided method to print a single character. More...
 
typedef int(* BSP_polling_getchar_function_type) (void)
 This type defines the prototype for the BSP provided method to input a single character. More...
 
typedef int(* rtems_printk_plugin_t) (void *, const char *format,...)
 Type definition for function which can be plugged in to certain reporting routines to redirect the output. More...
 

Functions

int getchark (void)
 Get Character (kernel I/O) More...
 
void vprintk (const char *fmt, va_list ap)
 Variable Argument printk() More...
 
void printk (const char *fmt,...)
 Kernel Print. More...
 
void putk (const char *s)
 Kernel Put String. More...
 
void rtems_putc (char c)
 Kernel Put Character. More...
 
int printk_plugin (void *context, const char *fmt,...)
 Reporting Methods printk() Plugin. More...
 
int rtems_printf_plugin (void *context, const char *fmt,...)
 Reporting Methods printf() Plugin. More...
 

Variables

BSP_output_char_function_type BSP_output_char
 This variable points to the BSP provided method to output a character for the purposes of debug output.
 
BSP_polling_getchar_function_type BSP_poll_char
 This variable points to the BSP provided method to input a character for the purposes of debug input.
 

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.

◆ rtems_printk_plugin_t

typedef int(* rtems_printk_plugin_t) (void *, const char *format,...)

Type definition for function which can be plugged in to certain reporting routines to redirect the output.

Methods following this prototype may be passed into RTEMS reporting functions that allow their output to be redirected. In particular, the cpu usage, period usage, and stack usage reporting functions use this.

If the user provides their own "printf plugin", then they may redirect those reports as they see fit.

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.

References BSP_poll_char.

◆ printk()

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

Kernel Print.

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

Parameters
[in]fmtis a printf()-style format string

Kernel Print.

References vprintk().

Referenced by _CPU_Exception_frame_print(), _POSIX_Message_queue_Delete(), and rtems_test_fatal_extension().

◆ printk_plugin()

int printk_plugin ( void *  context,
const char *  fmt,
  ... 
)

Reporting Methods printk() Plugin.

Parameters
[in]contextpoints to a user defined context.
[in]fmtis a printf()-style format string
Returns
The number of characters printed.

References vprintk().

Referenced by rtems_cpu_usage_top(), rtems_rate_monotonic_report_statistics(), rtems_stack_checker_report_usage(), and rtems_test_fatal_extension().

◆ putk()

void putk ( const char *  s)

Kernel Put String.

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

Parameters
[in]sis the string to print

Kernel Put String.

puts) function requiring minimal infrastrure.

◆ rtems_printf_plugin()

int rtems_printf_plugin ( void *  context,
const char *  fmt,
  ... 
)

Reporting Methods printf() Plugin.

This is a standard plug-in to support using printf() for output instead of printk().

Parameters
[in]contextpoints to a user defined context.
[in]fmtis a printf()-style format string
Returns
The number of characters printed.

◆ rtems_putc()

void rtems_putc ( char  c)

Kernel Put Character.

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

Parameters
[in]cis the character to print

◆ vprintk()

void 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

Variable Argument printk()

Arguments: as in printf: fmt - format string, ... - unnamed arguments.

Referenced by printk(), and printk_plugin().