-
Notifications
You must be signed in to change notification settings - Fork 0
/
chip328lib.h
74 lines (63 loc) · 1.17 KB
/
chip328lib.h
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#ifndef CHIP328LIB_H // guardas de cabeçalho, impedem inclusões cíclicas
#define CHIP328LIB_H
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
extern uint8_t V[16];
extern uint16_t PC, SP_, I;
extern uint8_t DT, ST;
#if defined(__AVR_ATmega328P__)
extern uint8_t chip328MemSys[80];
#else
extern uint8_t chip328MemSys[80];
#endif
extern uint8_t chip328MemStack[16];
extern uint8_t chip328Memory[300];
#if defined(__AVR_ATmega328P__)
extern uint8_t chip328Display[256];
#else
extern uint8_t chip328Display[8][32];
#endif
#ifdef __cplusplus
extern "C" {
#endif
void chip328Begin();
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
uint8_t interfacePutPixel(uint8_t x, uint8_t y, uint8_t pixel);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
uint8_t interfaceGetKey();
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
void chip328Emulate();
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
uint8_t chip328MemoryRead(uint16_t address);
#ifdef __cplusplus
}
#endif
#ifdef __cplusplus
extern "C" {
#endif
void chip328MemoryWrite(uint16_t address, uint8_t data);
#ifdef __cplusplus
}
#endif
#endif