<commit_before>/*
 * Copyright (C) 2014 Freie Universität Berlin, <NAME>
 *               2016 <NAME> <<EMAIL>>
 *               2018 <NAME> <<EMAIL>>
 *
 * 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     boards_mega-xplained
 * @brief       Support for the Mega Xplained board.
 * @{
 *
 * @file
 * @brief       Board specific definitions for the Mega Xplained board.
 *
 * @author      <NAME> <h.v.bruinehsen@fu-berlin.de>
 * @author      <NAME> <<EMAIL>>
 * @author      <NAME> <<EMAIL>>
 */

#ifndef BOARD_H
#define BOARD_H

#include "cpu.h"
#include "periph_cpu.h"
#include "mega-xplained_pinmap.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @name    STDIO configuration
 *
 * As the CPU is too slow to handle 115200 baud, we set the default
 * baudrate to 9600 for this board
 * @{
 */
#ifndef UART_STDIO_BAUDRATE
#define UART_STDIO_BAUDRATE (9600U)
#endif
/** @} */

/**
 * @brief   Use the UART 1 for STDIO on this board
 */
#define UART_STDIO_DEV       (UART_DEV(1))

/**
 * @name    Context swap defines
 *
 * Setup to use PD7 which is pin change interrupt 31 (PCINT31)
 * This emulates a software triggered interrupt
 * @{
 */
#define AVR_CONTEXT_SWAP_INIT do { \
            DDRD |= (1 << PD7); \
            PCICR |= (1 << PCIE3); \
            PCMSK3 |= (1 << PCINT31); \
} while (0)
#define AVR_CONTEXT_SWAP_INTERRUPT_VECT  PCINT3_vect
#define AVR_CONTEXT_SWAP_TRIGGER   PORTD ^= (1 << PD7)
/** @} */

/**
 * @name    xtimer configuration values
 *
 * Xtimer runs at 8MHz / 64 = 125kHz
 * @{
 */
#define XTIMER_DEV                  (0)
#define XTIMER_CHAN                 (0)
#define XTIMER_WIDTH                (16)
#define XTIMER_HZ                   (125000UL)
#define XTIMER_BACKOFF              (40)
/** @} */

/**
 * @name    LED pin definitions
 * @{
 */
/* LED0,2 currently unsupported due to lack of GPIO_OD support */<commit_msg>boards/mega-xplained: remove context swap defines<commit_after>/*
 * Copyright (C) 2014 Freie Universität Berlin, <NAME>
 *               2016 <NAME> <<EMAIL>>
 *               2018 <NAME> <<EMAIL>>
 *
 * 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     boards_mega-xplained
 * @brief       Support for the Mega Xplained board.
 * @{
 *
 * @file
 * @brief       Board specific definitions for the Mega Xplained board.
 *
 * @author      <NAME> <h.v.bruinehsen@fu-berlin.de>
 * @author      <NAME> <<EMAIL>>
 * @author      <NAME> <<EMAIL>>
 */

#ifndef BOARD_H
#define BOARD_H

#include "cpu.h"
#include "periph_cpu.h"
#include "mega-xplained_pinmap.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @name    STDIO configuration
 *
 * As the CPU is too slow to handle 115200 baud, we set the default
 * baudrate to 9600 for this board
 * @{
 */
#ifndef UART_STDIO_BAUDRATE
#define UART_STDIO_BAUDRATE (9600U)
#endif
/** @} */

/**
 * @brief   Use the UART 1 for STDIO on this board
 */
#define UART_STDIO_DEV       (UART_DEV(1))

/**
 * @name    xtimer configuration values
 *
 * Xtimer runs at 8MHz / 64 = 125kHz
 * @{
 */
#define XTIMER_DEV                  (0)
#define XTIMER_CHAN                 (0)
#define XTIMER_WIDTH                (16)
#define XTIMER_HZ                   (125000UL)
#define XTIMER_BACKOFF              (40)
/** @} */

/**
 * @name    LED pin definitions
 * @{
 */
/* LED0,2 currently unsupported due to lack of GPIO_OD support */
{'fraction_non_alphanumeric': 0.12298722931704609, 'fraction_numerical': 0.03248195446973903, 'mean_word_length': 2.4845261121856868, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5537154', 'n_tokens_mistral': 1333, 'n_tokens_neox': 1241, 'n_words': 379}