/*
 * Copyright (C) 2020-2021 Aloysius Indrayanto
 *
 * This file is part of the eCxx library, see LICENSE file for the license details.
 */


#ifndef INCLUDE_ECXX_PLATFORM_SPECIFIC_CONFIG_H
#error "this file cannot be included directly"
#endif
#undef INCLUDE_ECXX_PLATFORM_SPECIFIC_CONFIG_H


#ifndef ECXX_PLATFORM_AVRX_CONFIG_H
#define ECXX_PLATFORM_AVRX_CONFIG_H


//
// Report a fatal error if the __AVR_ARCH_X__ macro is not defined here
//
#ifndef __AVR_ARCH_X__
    #error "the selected MCU is an AVRX and yet the __AVR_ARCH_X__ macro is not defined"
#endif


//
// Do not use PROGMEM, pgm_read_*(), etc. at all for AVRX ATmega**09 series
//
#if defined(__AVR_ATmega809__) || defined(__AVR_ATmega1609__) || defined(__AVR_ATmega3209__) || defined(__AVR_ATmega4809__)
    #define ECXX_AVRX_DO_NOT_USE_PROGMEM
#endif


//
// Needed for RAMSTART and RAMEND
//
#include <avr/io.h>


//
// Include the common implementation file
//
#define INCLUDE_ECXX_PLATFORM_SPECIFIC_AVR_COMMON_CONFIG_H
#include "../AVRCommon/Config.h"


#endif
