-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdebug_raw.h
65 lines (51 loc) · 1.65 KB
/
debug_raw.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
#pragma once
#include <stdint.h>
//C and C++
static inline void DebugPin5High() {
volatile uint32_t *GPIOD_BSRR = (volatile uint32_t *)(0x50005018);
*GPIOD_BSRR = (1 << 3);
}
static inline void DebugPin5Low() {
volatile uint32_t *GPIOD_BSRR = (volatile uint32_t *)(0x50005018);
*GPIOD_BSRR = (1 << (3 + 16));
}
static inline void DebugPin4High() {
volatile uint32_t *GPIOE_BSRR = (volatile uint32_t *)(0x50006018);
*GPIOE_BSRR = (1 << 4);
}
static inline void DebugPin4Low() {
volatile uint32_t *GPIOE_BSRR = (volatile uint32_t *)(0x50006018);
*GPIOE_BSRR = (1 << (4 + 16));
}
static inline void DebugPin3High() {
volatile uint32_t *GPIOG_BSRR = (volatile uint32_t *)(0x50008018);
*GPIOG_BSRR = (1 << 11);
}
static inline void DebugPin3Low() {
volatile uint32_t *GPIOG_BSRR = (volatile uint32_t *)(0x50008018);
*GPIOG_BSRR = (1 << (11 + 16));
}
static inline void DebugPin2High() {
volatile uint32_t *GPIOE_BSRR = (volatile uint32_t *)(0x50006018);
*GPIOE_BSRR = (1 << 2);
}
static inline void DebugPin2Low() {
volatile uint32_t *GPIOE_BSRR = (volatile uint32_t *)(0x50006018);
*GPIOE_BSRR = (1 << (2 + 16));
}
static inline void DebugPin1High() {
volatile uint32_t *GPIOA_BSRR = (volatile uint32_t *)(0x50002018);
*GPIOA_BSRR = (1 << 14);
}
static inline void DebugPin1Low() {
volatile uint32_t *GPIOA_BSRR = (volatile uint32_t *)(0x50002018);
*GPIOA_BSRR = (1 << (14 + 16));
}
static inline void DebugPin0High() {
volatile uint32_t *GPIOB_BSRR = (volatile uint32_t *)(0x50003018);
*GPIOB_BSRR = (1 << 10);
}
static inline void DebugPin0Low() {
volatile uint32_t *GPIOB_BSRR = (volatile uint32_t *)(0x50003018);
*GPIOB_BSRR = (1 << (10 + 16));
}