Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
CTCaer
GitHub Repository: CTCaer/hekate
Path: blob/master/bdk/module.h
3693 views
1
/*
2
* Common Module Header
3
* Copyright (c) 2018 M4xw
4
* Copyright (c) 2018-2026 CTCaer
5
*
6
* This program is free software; you can redistribute it and/or modify it
7
* under the terms and conditions of the GNU General Public License,
8
* version 2, as published by the Free Software Foundation.
9
*
10
* This program is distributed in the hope it will be useful, but WITHOUT
11
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
* more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
#ifndef _MODULE_H_
20
#define _MODULE_H_
21
22
#include <stddef.h>
23
#include <mem/heap.h>
24
25
#define IANOS_EXT1 0x314E4149
26
27
// Module Callback
28
typedef void (*cbMainModule_t)(const char *s);
29
typedef void (*memcpy_t)(void *, void *, size_t);
30
typedef void (*memset_t)(void *, int, size_t);
31
typedef int (*reg_voltage_set_t)(u32, u32);
32
33
typedef struct _bdkParams_t
34
{
35
void *gfx_con;
36
void *gfx_ctx;
37
heap_t *heap;
38
memcpy_t memcpy;
39
memset_t memset;
40
u32 extension_magic;
41
} bdk_params_t;
42
43
// Module Caller.
44
typedef void (*moduleEntrypoint)(void *, bdk_params_t *);
45
46
#endif
47
48