1#include "main-header.h"
8 if (loaderapiptr == NULL) {
13void *get_function_offset(
int num) {
14 if (loaderapiptr == NULL) {
15 printf(
"******** Loader callbacks deprecated for Function %i! ********** \r\n", num);
24 void * (*ptr)(
int num);
29 printf(
"******** Function %i not implemented in loader! ********** \r\n", num);
34uint32_t loader_get_version() {
35 if (!loader_has_api()) {
38 uint32_t *b = (uint32_t *)(0x08001000 + (4 * 3));
42 f = get_function_offset(11);
48void loader_set_last_function_ptr(
void *n) {
50 f = get_function_offset(17);
57void *loader_get_last_function_ptr() {
60 f = get_function_offset(5);
67int loader_get_last_reset_cause() {
69 f = get_function_offset(18);
77long loader_get_user_long() {
81void loader_set_user_long(
long l) {
83 f = get_function_offset(10);
87void loader_set_quickstart(
byte b) {
90void loader_set_update_node(
long l) {
92 f = get_function_offset(20);
98void loader_set_update_host(
const char *n) {
99 void (*f)(
const char *n);
100 f = get_function_offset(21);
107int loader_get_quickstart() {
111void loader_erase_config() {
113 f = get_function_offset(13);
120void *loader_get_app_base_address(
int index) {
123 f = get_function_offset(3);
129 return (
void *)0x08009000;
130 }
else if (index == 1) {
131 return (
void *)0x08034800;
135int loader_get_app_base_address_count() {
137 f = get_function_offset(2);
145int loader_set_latest_app(
void *z) {
147 f = get_function_offset(6);
153struct meta_header *loader_get_app_meta_address(
int index) {
156 f = get_function_offset(8);