-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathexample.cpp
41 lines (33 loc) · 1.09 KB
/
example.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifdef DONT_INCLUDE_EXAMPLE_PLEASE
#include "../device.h"
namespace flashcart_core {
using ntrcard::sendCommand;
using platform::logMessage;
using platform::showProgress;
class Example : Flashcart {
public:
// Name & Size of Flash Memory
Example() : Flashcart("Example Name", "Example", 0x400000) { }
const char* getAuthor() { return "your name"; }
const char* getDescription() {
return "something helpful\n"
"use\n"
"newlines";
}
/*
called when the user selects this flashcart
return false to error
return true otherwise
*/
bool initialize() {
return true;
}
void shutdown() { }
bool readFlash(uint32_t address, uint32_t length, uint8_t *buffer) { return true; }
bool writeFlash(uint32_t address, uint32_t length, const uint8_t *buffer) { return true; }
bool injectNtrBoot(uint8_t *blowfish_key, uint8_t *firm, uint32_t firm_size) { return true; }
};
// adds your cart to the list
Example example;
}
#endif