Minimal device system, implement terminal device and libterminal
All checks were successful
Build documentation / build-and-deploy (push) Successful in 55s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 55s
This commit is contained in:
1
libterminal/terminal/.gitignore
vendored
Normal file
1
libterminal/terminal/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.o
|
||||
8
libterminal/terminal/device.h
Normal file
8
libterminal/terminal/device.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef _LIBTERMINAL_TERMINAL_DEVICE_H
|
||||
#define _LIBTERMINAL_TERMINAL_DEVICE_H
|
||||
|
||||
#define TERMINAL_DEVICE 1
|
||||
|
||||
#include <m/terminal_device.h>
|
||||
|
||||
#endif // _LIBTERMINAL_TERMINAL_DEVICE_H
|
||||
3
libterminal/terminal/src.mk
Normal file
3
libterminal/terminal/src.mk
Normal file
@@ -0,0 +1,3 @@
|
||||
c += terminal/terminal.c
|
||||
|
||||
o += terminal/terminal.o
|
||||
8
libterminal/terminal/terminal.c
Normal file
8
libterminal/terminal/terminal.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include <stddef.h>
|
||||
#include <terminal/device.h>
|
||||
#include <terminal/terminal.h>
|
||||
#include <m/system.h>
|
||||
|
||||
void terminal_print (const char* string, size_t len) {
|
||||
device_do (TERMINAL_DEVICE, TERMINAL_PUTSTR, (void*)string, &len, NULL, NULL);
|
||||
}
|
||||
8
libterminal/terminal/terminal.h
Normal file
8
libterminal/terminal/terminal.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef _LIBTERMINAL_TERMINAL_TERMINAL_H
|
||||
#define _LIBTERMINAL_TERMINAL_TERMINAL_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
void terminal_print (const char* string, size_t len);
|
||||
|
||||
#endif // _LIBTERMINAL_TERMINAL_TERMINAL_H
|
||||
Reference in New Issue
Block a user