states_internal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Gerson Fernando Budke
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
22 #include <avr/io.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 #ifdef GPIOR0
33 #define AVR8_STATE_UART_USE_SRAM 0
34 #else
35 #define AVR8_STATE_UART_USE_SRAM 1
36 #endif
66 #if (AVR8_STATE_UART_USE_SRAM)
67 extern uint8_t avr8_state_uart_sram;
68 #define avr8_state_uart avr8_state_uart_sram
69 #else
70 #define avr8_state_uart GPIOR0
71 #endif
78 #ifdef GPIOR1
79 #define AVR8_STATE_IRQ_USE_SRAM 0
80 #else
81 #define AVR8_STATE_IRQ_USE_SRAM 1
82 #endif
99 #if (AVR8_STATE_IRQ_USE_SRAM)
100 extern uint8_t avr8_state_irq_count_sram;
101 #define avr8_state_irq_count avr8_state_irq_count_sram
102 #else
103 #define avr8_state_irq_count GPIOR1
104 #endif
107 #ifdef __cplusplus
108 }
109 #endif
110 
uint8_t avr8_state_uart_sram
UART state variable.
uint8_t avr8_state_irq_count_sram
IRQ state variable.