Miosix
2.0alpha1
|
#include <console_device.h>
Public Member Functions | |
void | IRQset (intrusive_ref_ptr< Device > console) |
void | set (intrusive_ref_ptr< Device > console) |
intrusive_ref_ptr< Device > | get () |
intrusive_ref_ptr< Device > | IRQget () |
Static Public Member Functions | |
static DefaultConsole & | instance () |
This class holds the file object related to the console, that is set by the board support package, and used to populate /dev/console in DevFs
|
inline |
|
static |
|
inline |
void miosix::DefaultConsole::IRQset | ( | intrusive_ref_ptr< Device > | console | ) |
Called by the board support package, in particular IRQbspInit(), to pass to the kernel the console device. This device file is used as the default one for stdin/stdout/stderr. Notes: this has to be called in IRQbspInit(), since if it's called too late the console gets initialized with a NullFile. Also, calling this a second time to dynamically change the console device is probably a bad idea, as the device is cached around in the filesystem code and will result in some processes using the old device and some other the new one.
console | device file handling console I/O. Can only be called with interrupts disabled. |
|
inline |
Same as IRQset(), but can be called with interrupts enabled
console | device file handling console I/O. Can only be called with interrupts disabled. |