-
Notifications
You must be signed in to change notification settings - Fork 0
/
HardwareProfile.h
72 lines (52 loc) · 1.56 KB
/
HardwareProfile.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
#ifndef __HARDWAREPROFILE_H
#define __HARDWAREPROFILE_H
#define SystemClock 48000000
#define CpuClock 48000000
#define BAUDRATE 31250
#ifdef __18F14K50_H
#define USBBUFFERADDR 0x260
#define UARTBUFFERADDR 0x180
// A/D (minden láb digitális I/O)
#define ADINIT ANSEL = 0; ANSELH = 0
// USB
#define self_power 1
#define USB_BUS_SENSE 1
// LEDEK
#define LEDUSB(f) f(C, 0)
#define LEDIN(f) f(C, 3)
#define LEDOUT(f) f(C, 4)
// UART I/O (MIDI IN, MIDI OUT)
#define UARTRX(f) f(B, 5)
#define UARTTX(f) f(B, 7)
#define UTXBUFFERSIZE 64
#define URXBUFFERSIZE 64
// SPI debugger (opcionális, csak a fejlesztéshez kell)
#define SPIDEBUGCLK(f) f(B, 4)
#define SPIDEBUGDT(f) f(B, 6)
// Boot loader gomb
#define BOOTLOADER(f) f(B, 5)
#endif // #ifdef __18F14K50_H
#ifdef __18F2550_H
#define USBBUFFERADDR 0x500
#define UARTBUFFERADDR 0x700
// A/D (minden láb digitális I/O)
#define ADINIT ADCON1 = 0x0F
// USB
#define self_power 1
#define USB_BUS_SENSE 1
// LEDEK
#define LEDUSB(f) f(B, 2)
#define LEDIN(f) f(B, 3)
#define LEDOUT(f) f(B, 4)
// UART I/O (MIDI IN, MIDI OUT)
#define UARTRX(f) f(C, 7)
#define UARTTX(f) f(C, 6)
#define UTXBUFFERSIZE 128
#define URXBUFFERSIZE 128
// SPI debugger (opcionális, csak a fejlesztéshez kell)
#define SPIDEBUGCLK(f) f(B, 6)
#define SPIDEBUGDT(f) f(B, 7)
// Boot loader gomb
#define BOOTLOADER(f) f(C, 1)
#endif // __18F2550_H
#endif // __HARDWAREPROFILE_H