This is a port of the mruby/c tutorial Chapter 03 to the mbed environment.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

console.c File Reference

console.c File Reference

console I/O module. More...

Go to the source code of this file.

Functions

static void format_output_str (const char *value, int align, int w, char pad)
static void format_output_int (int32_t value, int align, int w, int base, char pad)
static void format_output_uint (uint32_t value, int align, int w, int base, char pad)
void console_putchar (char c)
void console_print (const char *str)
void console_printf (const char *fmt,...)

Detailed Description

console I/O module.

  Copyright (C) 2015 Kyushu Institute of Technology.
  Copyright (C) 2015 Shimane IT Open-Innovation Center.
  This file is distributed under BSD 3-Clause License.
  

Definition in file console.c.


Function Documentation

void console_print ( const char *  str )

output string

Parameters:
strstr

Definition at line 126 of file console.c.

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

output formatted string

Parameters:
fmtformat string.
Note:

Definition at line 138 of file console.c.

void console_putchar ( char  c )

output a character

Parameters:
ccharacter

Definition at line 115 of file console.c.

static void format_output_int ( int32_t  value,
int  align,
int  w,
int  base,
char  pad 
) [static]

output int value with format

Parameters:
valueoutput value
alignleft(-1) or right(1)
wwidth
basen base
padpadding character

Definition at line 58 of file console.c.

static void format_output_str ( const char *  value,
int  align,
int  w,
char  pad 
) [static]

output string with format

Parameters:
valueoutput value
alignleft(-1) or right(1)
wwidth
basen base
padpadding character

Definition at line 30 of file console.c.

static void format_output_uint ( uint32_t  value,
int  align,
int  w,
int  base,
char  pad 
) [static]

output unsigned int value with format

Parameters:
valueoutput value
alignleft(-1) or right(1)
wwidth
basen base
padpadding character

Definition at line 95 of file console.c.