wip mod04 ex01

This commit is contained in:
hugogogo
2025-03-11 18:41:21 +01:00
parent 692ad7f3ce
commit bb785d5209
4 changed files with 74 additions and 22 deletions

View File

@@ -36,16 +36,16 @@
#define PULLUP_ON(elem) SET(CONCAT(PORT, GET_PORT(elem)), GET_BIT(elem))
#define PULLUP_OFF(elem) CLEAR(CONCAT(PORT, GET_PORT(elem)), GET_BIT(elem))
// Bit definitions
#define D1 0
#define D2 1
#define D3 2
#define D4 4
#define SW1 2
#define SW2 4
#define D5B 3
#define D5R 5
#define D5G 6
// Bit definitions (<pin number> // <pin name>)
#define D1 0 // PB0
#define D2 1 // PB1
#define D3 2 // PB2
#define D4 4 // PB4
#define SW1 2 // PD2
#define SW2 4 // PD4
#define D5B 3 // PD3
#define D5R 5 // PD5
#define D5G 6 // PD6
// Elements (port, bit)
#define LED1 (B, D1)