mkernel 0.0.1
Micro-kernel framework, everything as a module
mkmodtty.c
Go to the documentation of this file.
1
17#include "module.h"
18#include "mkmod.h"
19#include "gettext.h"
20#define _(String) gettext (String)
21
22#include <stdio.h>
23
24#include "debug/assert.h"
25#include "debug/memory.h"
26
27/* List exposed module functions */static void mkmod_function();
29 mkmod_function
30};
31
32static moduleinfo_t moduleinfo = {
33 "MyModule",
34 "MyModule description",
35 0,
36 1,
37 0,
38 "First and Lastname",
39 "email@address.tld",
40 "http://www.mymodule.com",
41 "GPLv3"
42};
43
45{
47 return &moduleinfo;
48}
49
50uint8_t onUnload()
51{
53 return 0;
54}
55
56static void mkmod_function()
57{
59
60 printf(_("Hello from mkmod_function\n"));
61}
62
Debugging macros.
#define DBG_TRACE
Checkpoint on stderr.
Definition: assert.h:118
Tracks memory allocation and leaks when compiled without NDEBUG.
ABI interface shared between module class and application.
#define _(String)
Definition: mkmodtty.c:20
mkmod_api_t module_api
Definition: mkmodtty.c:28
uint8_t onUnload()
Definition: mkmodtty.c:50
moduleinfo_t * onLoad()
Definition: mkmodtty.c:44
Internal ABI shared by all modules with modmgr.