Introduce CPP macros for AVR IN/OUT registers

This commit is contained in:
2020-11-23 18:51:44 +01:00
parent 1e9512925d
commit 8a13a13a7c
7 changed files with 41 additions and 38 deletions

View File

@@ -1,14 +1,12 @@
#ifndef __LED_H__
#define __LED_H__
#define LED_PORT PORTA
#define LED_DIR DDRA
#define LED_PORT A
#define ANODES_PORT PORTD
#define ANODES_DIR DDRD
#define DIG0_ANODE (1<<PD5)
#define DIG1_ANODE (1<<PD6)
#define DIG2_ANODE (1<<PD7)
#define ANODES_PORT D
#define DIG0_ANODE 5
#define DIG1_ANODE 6
#define DIG2_ANODE 7
struct LED_DIGS
{