Simple Operating System
io.h File Reference

Standard input output library. More...

#include "types.h"
Include dependency graph for io.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

union  Key
 Key information, got from buffer. More...
 

Typedefs

typedef union Key Key
 Key information, got from buffer.
 

Functions

void putc (Byte character)
 Put character. More...
 
void puts (const int string)
 Put string. More...
 
void puti (int num)
 Put int. More...
 
void printf (const int str,...)
 C-like printf function. More...
 
Key getc (void)
 Wait for key in buffer, get it and clear buffer. More...
 
Key getKeyBuff (void)
 Get key from buffer. More...
 

Detailed Description

Standard input output library.

Todo:
add cursorColor and setCursorColor(Color color)

Definition in file io.h.

Function Documentation

◆ getc()

Key getc ( void  )

Wait for key in buffer, get it and clear buffer.

Returns
Key

Definition at line 83 of file io.h.

◆ getKeyBuff()

Key getKeyBuff ( void  )

Get key from buffer.

to clear buffer use getc

Returns
Key from buffer

Definition at line 96 of file io.h.

◆ printf()

void printf ( const int  str,
  ... 
)

C-like printf function.

See https://cplusplus.com/reference/cstdio/printf/

Parameters
strstring to be printed with specifiers
...additional arguments depending on specifiers
Bug:
s cannot be string literal like "something" as argument in ...

Definition at line 72 of file io.h.

◆ putc()

void putc ( Byte  character)

Put character.

Parameters
character

Definition at line 31 of file io.h.

◆ puti()

void puti ( int  num)

Put int.

will put signed integer, to use uint see u in printf()

Parameters
num

Definition at line 52 of file io.h.

◆ puts()

void puts ( const int  string)

Put string.

Parameters
string

Definition at line 42 of file io.h.