<commit_before>/*
 * Copyright (C) 2015 <NAME> <<EMAIL>>
 *               2014 Freie Universität Berlin, <NAME>
 *
 * This file is subject to the terms and conditions of the GNU Lesser
 * General Public License v2.1. See the file LICENSE in the top level
 * directory for more details.
 */

/**
 * @ingroup     cpu_atmega_common
 * @brief       Common implementations and headers for ATmega family based micro-controllers
 * @{
 *
 * @file
 * @brief       Basic definitions for the ATmega common module
 *
 * When ever you want to do something hardware related, that is accessing MCUs registers directly,
 * just include this file. It will then make sure that the MCU specific headers are included.
 *
 * @author      <NAME> <stefan.pfeiffer@fu-berlin.de>
 * @author      <NAME> <hauke.petersen@fu-berlin.de>
 * @author      <NAME> <h.v.bruinehsen@fu-berlin.de>
 * @author      <NAME> <<EMAIL>>
 */

#ifndef __ATMEGA_COMMON_H
#define __ATMEGA_COMMON_H

#include <stdio.h>
#include <stdint.h>

#include <avr/interrupt.h>
#include "cpu_conf.h"

/**
 * For downwards compatibility with old RIOT code.
 * TODO: remove once core was adjusted
 */
#include "irq.h"

#ifdef __cplusplus
extern "C" {
#endif

#define eINT            enableIRQ
#define dINT            disableIRQ

/**
 * @brief global in-ISR state variable
 */
extern volatile uint8_t __in_isr;

/**
 * @brief Flag entering of an ISR
 */
static inline void __enter_isr(void)
{
    __in_isr = 1;
}

/**
 * @brief Flag exiting of an ISR
 */
static inline void __exit_isr(void)
{
    __in_isr = 0;
}

/**
 * @brief Initialization of the CPU<commit_msg>cpu/atmega: remove dINT/eINT definitions<commit_after>/*
 * Copyright (C) 2015 <NAME> <<EMAIL>>
 *               2014 Freie Universität Berlin, <NAME>
 *
 * This file is subject to the terms and conditions of the GNU Lesser
 * General Public License v2.1. See the file LICENSE in the top level
 * directory for more details.
 */

/**
 * @ingroup     cpu_atmega_common
 * @brief       Common implementations and headers for ATmega family based micro-controllers
 * @{
 *
 * @file
 * @brief       Basic definitions for the ATmega common module
 *
 * When ever you want to do something hardware related, that is accessing MCUs registers directly,
 * just include this file. It will then make sure that the MCU specific headers are included.
 *
 * @author      <NAME> <stefan.pfeiffer@fu-berlin.de>
 * @author      <NAME> <hauke.petersen@fu-berlin.de>
 * @author      <NAME> <h.v.bruinehsen@fu-berlin.de>
 * @author      <NAME> <<EMAIL>>
 */

#ifndef __ATMEGA_COMMON_H
#define __ATMEGA_COMMON_H

#include <stdio.h>
#include <stdint.h>

#include <avr/interrupt.h>
#include "cpu_conf.h"

/**
 * For downwards compatibility with old RIOT code.
 * TODO: remove once core was adjusted
 */
#include "irq.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief global in-ISR state variable
 */
extern volatile uint8_t __in_isr;

/**
 * @brief Flag entering of an ISR
 */
static inline void __enter_isr(void)
{
    __in_isr = 1;
}

/**
 * @brief Flag exiting of an ISR
 */
static inline void __exit_isr(void)
{
    __in_isr = 0;
}

/**
 * @brief Initialization of the CPU
{'fraction_non_alphanumeric': 0.10837282780410742, 'fraction_numerical': 0.008214849921011059, 'mean_word_length': 3.2382864792503345, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5913956', 'n_tokens_mistral': 1082, 'n_tokens_neox': 1042, 'n_words': 356}