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