RTEMS: cpukit/include/rtems/bspIo.h File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
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)
int | vprintk (const char *fmt, va_list ap)
| Variable Argument printk()
int | rtems_printk_printer (void *ignored, const char *format, va_list ap)
int | printk (const char *fmt,...) RTEMS_PRINTFLIKE(1
| Kernel Print.
int int | putk (const char *s)
| Kernel Put String.
void | rtems_putc (char c)
| Kernel Put Character.
void | rtems_put_char (int c, void *arg)
| Puts the character via rtems_putc().

## 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] | fmt | is 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] | s | is the string to print

Returns
  The number of characters output.

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

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

  c | The character to put.
  arg | Ignored.

## ◆ 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] | c | is 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] | fmt | is a printf()-style format string
  [in] | ap | is a va_list pointer to arguments

Returns
  The number of characters output.

## Variable Documentation

## ◆ BSP_output_char

BSP_output_char_function_type BSP_output_char
| extern

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

BSP_polling_getchar_function_type BSP_poll_char
| extern

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