1
0
mirror of https://github.com/CTCaer/hekate.git synced 2024-12-24 12:14:11 +00:00

ianos: add regulator voltage set

This commit is contained in:
CTCaer 2021-04-11 10:18:47 +03:00
parent faf5651607
commit c2ff4bf623
2 changed files with 6 additions and 0 deletions

View File

@ -21,6 +21,7 @@
#include "elfload/elfload.h" #include "elfload/elfload.h"
#include <module.h> #include <module.h>
#include <mem/heap.h> #include <mem/heap.h>
#include <power/max7762x.h>
#include <storage/nx_sd.h> #include <storage/nx_sd.h>
#include <utils/types.h> #include <utils/types.h>
@ -43,6 +44,9 @@ static void _ianos_call_ep(moduleEntrypoint_t entrypoint, void *moduleConfig)
bdkParameters->memset = (memset_t)&memset; bdkParameters->memset = (memset_t)&memset;
bdkParameters->sharedHeap = &_heap; bdkParameters->sharedHeap = &_heap;
// Extra functions.
bdkParameters->reg_voltage_set = (reg_voltage_set_t)&max7762x_regulator_set_voltage;
entrypoint(moduleConfig, bdkParameters); entrypoint(moduleConfig, bdkParameters);
} }

View File

@ -25,6 +25,7 @@
typedef void (*cbMainModule_t)(const char *s); typedef void (*cbMainModule_t)(const char *s);
typedef void (*memcpy_t)(void *, void *, size_t); typedef void (*memcpy_t)(void *, void *, size_t);
typedef void (*memset_t)(void *, int, size_t); typedef void (*memset_t)(void *, int, size_t);
typedef int (*reg_voltage_set_t)(u32, u32);
typedef struct _bdkParams_t typedef struct _bdkParams_t
{ {
@ -33,6 +34,7 @@ typedef struct _bdkParams_t
heap_t *sharedHeap; heap_t *sharedHeap;
memcpy_t memcpy; memcpy_t memcpy;
memset_t memset; memset_t memset;
reg_voltage_set_t reg_voltage_set;
} *bdkParams_t; } *bdkParams_t;
// Module Entrypoint // Module Entrypoint