<commit_before>/*
 * Copyright (C) 2014 Freie Universität Berlin
 *
 * 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_arduino-due
 * @{
 *
 * @file
 * @brief       Peripheral MCU configuration for the Arduino Due board
 *
 * @author      <NAME>  <hauke.petersen@fu-berlin.de>
 * @author      <NAME> <peter.kietzmann@haw-hamburg.de>
 * @author      <NAME> <andreas.pauli@haw-hamburg.de>
 */

#ifndef PERIPH_CONF_H_
#define PERIPH_CONF_H_

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @name Timer peripheral configuration
 * @{
 */
#define TIMER_NUMOF         (3U)
#define TIMER_0_EN          1
#define TIMER_1_EN          1
#define TIMER_2_EN          1

/* Timer 0 configuration */
#define TIMER_0_DEV         TC0
#define TIMER_0_CHANNELS    6
#define TIMER_0_MAX_VALUE   (0xffffffff)
#define TIMER_0_ISR1        isr_tc0
#define TIMER_0_ISR2        isr_tc1

/* Timer 1 configuration */
#define TIMER_1_DEV         TC1
#define TIMER_1_CHANNELS    6
#define TIMER_1_MAX_VALUE   (0xffffffff)
#define TIMER_1_ISR1        isr_tc3
#define TIMER_1_ISR2        isr_tc4

/* Timer 2 configuration */
#define TIMER_2_DEV         TC2
#define TIMER_2_CHANNELS    6
#define TIMER_2_MAX_VALUE   (0xffffffff)
#define TIMER_2_ISR1        isr_tc6
#define TIMER_2_ISR2        isr_tc7
/** @} */

/**
 * @name UART configuration
 * @{
 */
#define UART_NUMOF          (4U)
#define UART_0_EN           1
#define UART_1_EN           1
#define UART_2_EN           1
#define UART_3_EN           1
#define UART_IRQ_PRIO       1

/* UART 0 device configuration */
#define UART_0_DEV          UART
#define UART_0_CLKEN()      (PMC->PMC_PCER0 |= (1 << ID_UART))
#define UART_0_CLKDIS()     (PMC->PMC_PCER0 &= ~(1 << ID_UART))
#define UART_0_IRQ          UART_IRQn
#define UART_0_ISR          isr_uart
/* UART 0 pin configuration */
#define UART_0_PORT         PIOA
#define UART_0_PINS         (PIO_PA8 | PIO_PA9)

/* UART 1 device configuration */
#define UART_1_DEV          USART0
#define UART_1_CLKEN()      (PMC->PMC_PCER0 |= (1 << ID_USART0))
#define UART_1_CLKDIS()     (PMC->PMC_PCER0 &= ~(1 << ID_USART0))
#define UART_1_IRQ          USART0_IRQn
#define UART_1_ISR          isr_usart0
/* UART 1 pin configuration */
#define UART_1_PORT         PIOA
#define UART_1_PINS         (PIO_PA10 | PIO_PA11)

/* UART 1 device configuration */
#define UART_2_DEV          USART1
#define UART_2_CLKEN()      (PMC->PMC_PCER0 |= (1 << ID_USART1))<commit_msg>boards/arduino-due: adapted to UART changes<commit_after>/*
 * Copyright (C) 2014 <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     boards_arduino-due
 * @{
 *
 * @file
 * @brief       Peripheral MCU configuration for the Arduino Due board
 *
 * @author      <NAME>  <<EMAIL>>
 * @author      <NAME> <<EMAIL>>
 * @author      Andreas "Paul" Pauli <<EMAIL>>
 */

#ifndef PERIPH_CONF_H_
#define PERIPH_CONF_H_

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @name Timer peripheral configuration
 * @{
 */
#define TIMER_NUMOF         (3U)
#define TIMER_0_EN          1
#define TIMER_1_EN          1
#define TIMER_2_EN          1

/* Timer 0 configuration */
#define TIMER_0_DEV         TC0
#define TIMER_0_CHANNELS    6
#define TIMER_0_MAX_VALUE   (0xffffffff)
#define TIMER_0_ISR1        isr_tc0
#define TIMER_0_ISR2        isr_tc1

/* Timer 1 configuration */
#define TIMER_1_DEV         TC1
#define TIMER_1_CHANNELS    6
#define TIMER_1_MAX_VALUE   (0xffffffff)
#define TIMER_1_ISR1        isr_tc3
#define TIMER_1_ISR2        isr_tc4

/* Timer 2 configuration */
#define TIMER_2_DEV         TC2
#define TIMER_2_CHANNELS    6
#define TIMER_2_MAX_VALUE   (0xffffffff)
#define TIMER_2_ISR1        isr_tc6
#define TIMER_2_ISR2        isr_tc7
/** @} */

/**
 * @name UART configuration
 * @{
 */
#define UART_NUMOF          (4U)
#define UART_0_EN           1
#define UART_1_EN           1
#define UART_2_EN           1
#define UART_3_EN           1

/* UART 0 device configuration */
#define UART_0_DEV          UART
#define UART_0_CLKEN()      (PMC->PMC_PCER0 |= (1 << ID_UART))
#define UART_0_CLKDIS()     (PMC->PMC_PCER0 &= ~(1 << ID_UART))
#define UART_0_IRQ          UART_IRQn
#define UART_0_ISR          isr_uart
/* UART 0 pin configuration */
#define UART_0_PORT         PIOA
#define UART_0_PINS         (PIO_PA8 | PIO_PA9)

/* UART 1 device configuration */
#define UART_1_DEV          USART0
#define UART_1_CLKEN()      (PMC->PMC_PCER0 |= (1 << ID_USART0))
#define UART_1_CLKDIS()     (PMC->PMC_PCER0 &= ~(1 << ID_USART0))
#define UART_1_IRQ          USART0_IRQn
#define UART_1_ISR          isr_usart0
/* UART 1 pin configuration */
#define UART_1_PORT         PIOA
#define UART_1_PINS         (PIO_PA10 | PIO_PA11)

/* UART 1 device configuration */
#define UART_2_DEV          USART1
#define UART_2_CLKEN()      (PMC->PMC_PCER0 |= (1 << ID_USART1))
{'fraction_non_alphanumeric': 0.09748427672955975, 'fraction_numerical': 0.04147012578616352, 'mean_word_length': 2.7282051282051283, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, 'substrings_counts': 6, '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': '3092544', 'n_tokens_mistral': 2064, 'n_tokens_neox': 1952, 'n_words': 474}