GadgetSeed  0.9.6
console.h ファイル

コンソールI/O [詳解]

#include "device.h"
console.h の依存先関係図:
被依存関係図:

[ソースコード]

型定義

typedef int(* io_write) (unsigned char *data, unsigned int count)
 
typedef int(* io_read) (unsigned char *data, unsigned int count)
 

関数

void register_console_in_dev (const struct st_device *in_dev)
 システム標準のコンソール入力デバイスを登録する [詳解]
 
void register_console_out_dev (const struct st_device *out_dev)
 システム標準のコンソール出力デバイスを登録する [詳解]
 
void init_console_device (void)
 全てのコンソール入出力デバイスを初期化する
 
int cputs (unsigned char *str, unsigned int count)
 標準出力より文字列を出力する [詳解]
 
int cgets (unsigned char *str, unsigned int count)
 標準入力より文字列を取得する [詳解]
 
int cputc (unsigned char td)
 標準出力より1文字を出力する [詳解]
 
int cgetc (unsigned char *rd)
 標準入力より1文字を取得する [詳解]
 
int cwait (unsigned int timeout)
 標準入力より入力を待つ [詳解]
 
int cgetcnw (unsigned char *rd)
 標準入力より1文字を取得する(待ち無し) [詳解]
 
void register_error_out_dev (const struct st_device *err_dev)
 システム標準のエラー出力デバイスを登録する [詳解]
 
int eputs (unsigned char *str, unsigned int len)
 エラー出力より文字列を出力する [詳解]
 
void set_console_in_device_ISR (struct st_device *dev)
 標準入力デバイスを設定する [詳解]
 
void set_console_out_device_ISR (struct st_device *dev)
 標準出力デバイスを設定する [詳解]
 
void set_error_out_device_ISR (struct st_device *dev)
 エラー出力デバイスを設定する [詳解]
 

詳解

コンソールI/O

日付
2007.03.17
著者
Takashi SHUDO

console.h に定義があります。

関数詳解

◆ cgetc()

int cgetc ( unsigned char *  rd)

標準入力より1文字を取得する

引数
[out]rd取得文字ポインタ
戻り値
!=0:入力文字有り

console.c197 行目に定義があります。

参照先 getc_device(), select_device(), st_tcb::stdin_dev.

呼び出し関係図:

◆ cgetcnw()

int cgetcnw ( unsigned char *  rd)

標準入力より1文字を取得する(待ち無し)

引数
[out]rd取得文字ポインタ
戻り値
!=0:取得文字有り

console.c235 行目に定義があります。

参照先 getc_device(), st_tcb::stdin_dev.

呼び出し関係図:

◆ cgets()

int cgets ( unsigned char *  str,
unsigned int  count 
)

標準入力より文字列を取得する

引数
[in]rd入力文字ポインタ
戻り値
!=0:取得文字有り

console.c175 行目に定義があります。

◆ cputc()

int cputc ( unsigned char  td)

標準出力より1文字を出力する

引数
[in]td文字
戻り値
出力した文字数

console.c163 行目に定義があります。

参照先 putc_device(), st_tcb::stdout_dev.

参照元 draw_lineedit().

呼び出し関係図:
被呼び出し関係図:

◆ cputs()

int cputs ( unsigned char *  str,
unsigned int  len 
)

標準出力より文字列を出力する

引数
[in]str文字列ポインタ
[in]len文字列のバイト数
戻り値
出力した文字数

console.c137 行目に定義があります。

参照元 tprintf().

被呼び出し関係図:

◆ cwait()

int cwait ( unsigned int  timeout)

標準入力より入力を待つ

引数
[in]timeoutタイムアウト時間(ms)
戻り値
!=0:入力文字有り

console.c219 行目に定義があります。

参照先 select_device(), st_tcb::stdin_dev.

呼び出し関係図:

◆ eputs()

int eputs ( unsigned char *  str,
unsigned int  len 
)

エラー出力より文字列を出力する

引数
[in]str文字列ポインタ
[in]len文字列のバイト数

console.c267 行目に定義があります。

参照元 eprintf().

被呼び出し関係図:

◆ register_console_in_dev()

void register_console_in_dev ( const struct st_device in_dev)

システム標準のコンソール入力デバイスを登録する

引数
[in]in_devコンソール入力デバイス

console.c100 行目に定義があります。

◆ register_console_out_dev()

void register_console_out_dev ( const struct st_device out_dev)

システム標準のコンソール出力デバイスを登録する

引数
[in]out_devコンソール出力デバイス

console.c110 行目に定義があります。

◆ register_error_out_dev()

void register_error_out_dev ( const struct st_device err_dev)

システム標準のエラー出力デバイスを登録する

引数
[in]err_devエラー出力デバイス

console.c255 行目に定義があります。

◆ set_console_in_device_ISR()

void set_console_in_device_ISR ( struct st_device dev)

標準入力デバイスを設定する

引数
[in]devデバイス

console.c292 行目に定義があります。

参照先 con_in_dev, st_tcb::stdin_dev.

◆ set_console_out_device_ISR()

void set_console_out_device_ISR ( struct st_device dev)

標準出力デバイスを設定する

引数
[in]devデバイス

console.c307 行目に定義があります。

参照先 con_out_dev, st_tcb::stdout_dev.

◆ set_error_out_device_ISR()

void set_error_out_device_ISR ( struct st_device dev)

エラー出力デバイスを設定する

引数
[in]devデバイス

console.c322 行目に定義があります。

参照先 con_err_dev, st_tcb::error_dev.