Loading...
Searching...
No Matches
states_internal.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023 Gerson Fernando Budke
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include <avr/io.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
29#ifdef GPIOR0
30#define AVR8_STATE_UART_USE_SRAM 0
31#else
32#define AVR8_STATE_UART_USE_SRAM 1
33#endif
35
63#if (AVR8_STATE_UART_USE_SRAM)
64extern uint8_t avr8_state_uart_sram;
65#define avr8_state_uart avr8_state_uart_sram
66#else
67#define avr8_state_uart GPIOR0
68#endif
70
75#ifdef GPIOR1
76#define AVR8_STATE_IRQ_USE_SRAM 0
77#else
78#define AVR8_STATE_IRQ_USE_SRAM 1
79#endif
81
96#if (AVR8_STATE_IRQ_USE_SRAM)
97extern uint8_t avr8_state_irq_count_sram;
98#define avr8_state_irq_count avr8_state_irq_count_sram
99#else
100#define avr8_state_irq_count GPIOR1
101#endif
103
104#ifdef __cplusplus
105}
106#endif
107