Skip to content

Commit 7a820de

Browse files
committed
added headers for the loader and platform main
1 parent dc63f2d commit 7a820de

File tree

5 files changed

+32
-20
lines changed

5 files changed

+32
-20
lines changed

loader/m6/main.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
1-
#include "../generic/check_compat.c"
2-
3-
#define LED 0xD20801E0
1+
#include "main.h"
42

5-
extern long *blob_chdk_core;
6-
extern long blob_chdk_core_size;
7-
8-
typedef struct {
9-
const char *str;
10-
const char *fw_str;
11-
void (*dcc_by_mva)(void *addr, long len);
12-
void (*ici_by_mva)(void *addr, long len);
13-
void (*core_unblock)(unsigned coreid);
14-
} ld_ver_t;
3+
#include "../generic/check_compat.c"
154

165
ld_ver_t fw = { "GM1.01A", //
176
(void*) 0xE03CFDF0, //

loader/m6/main.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#ifndef M6_LOADER_MAIN_H
2+
#define M6_LOADER_MAIN_H
3+
4+
#define LED 0xD20801E0
5+
6+
extern long *blob_chdk_core;
7+
extern long blob_chdk_core_size;
8+
9+
typedef struct {
10+
const char *str;
11+
const char *fw_str;
12+
void (*dcc_by_mva)(void *addr, long len);
13+
void (*ici_by_mva)(void *addr, long len);
14+
void (*core_unblock)(unsigned coreid);
15+
} ld_ver_t;
16+
17+
#endif

platform/m6/lib.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "lolevel.h"
33
#include "live_view.h"
44

5-
#define LED_PR 0xd20b0994 // green LED on the back
5+
#define LED 0xD20801E0 // green LED on the back
66

77
void shutdown_soft() {
88
_PostLogicalEventForNotPowerType(0x1005, 0);
@@ -20,7 +20,7 @@ void shutdown() {
2020
* @header debug_led.h
2121
*/
2222
void debug_led(int state) {
23-
volatile long *p = (void*) LED_PR;
23+
volatile long *p = (void*) LED;
2424
*p = ((state) ? 0x4d0002 : 0x4c0003);
2525
}
2626

platform/m6/main.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
#include "core.h"
44
#include "keyboard.h"
55

6-
extern int _GetLensCurrentFocalLength(void);
7-
extern int _GetLensWideFocalLength(void);
8-
extern long link_bss_start;
9-
extern long link_bss_end;
10-
extern void boot();
6+
#include "main.h"
117

128
void startup(int core) {
139
if (!core) { // core 0 only

platform/m6/main.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#ifndef M6_MAIN_H
2+
#define M6_MAIN_H
3+
4+
extern int _GetLensCurrentFocalLength(void);
5+
extern int _GetLensWideFocalLength(void);
6+
extern long link_bss_start;
7+
extern long link_bss_end;
8+
extern void boot();
9+
10+
#endif

0 commit comments

Comments
 (0)