RTEMS
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...
 
void rtems_put_char (int c, void *arg)
 Puts the character via rtems_putc(). 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.

Definition in file bspIo.h.

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.

Definition at line 49 of file bspIo.h.

◆ 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.

Definition at line 55 of file bspIo.h.

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.

◆ rtems_put_char()

void rtems_put_char ( int  c,
void *  arg 
)

Puts the character via rtems_putc().

This is a compatibility function to support an internal API.

Parameters
cThe character to put.
argIgnored.

Definition at line 34 of file rtems_put_char.c.

◆ 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

Definition at line 28 of file rtems_putc.c.

◆ 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.

Definition at line 29 of file vprintk.c.

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".

Definition at line 99 of file printk_support.c.

◆ BSP_poll_char

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

Definition at line 113 of file printk_support.c.