mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
e381317fbf
cpu, nrf5x_common: fix sign-compare in periph/flashpage drivers, periph_common: fix sign-compare in flashpage cpu, sam0_common: fix sign-compare error in periph/gpio cpu, cc2538: fix sign-compare in periph/timer cpu, sam3: fix sign-compare in periph/gpio cpu, stm32_common: fix sign-compare in periph/pwm cpu, stm32_common: fix sign-compare in periph/timer cpu, stm32_common: fix sign-compare in periph/flashpage cpu, nrf5x_common: fix sign-compare in radio/nrfmin cpu, samd21: fix sign-compare in periph/pwm cpu, ezr32wg: fix sign-compare in periph/gpio cpu, ezr32wg: fix sign-compare in periph/timer drivers, ethos: fix sign-compare sys, net: fix sign-compare cpu, atmega_common: fix sign-compare error cpu, msp430fxyz: fix sign-compare in periph/gpio boards, msb-430-common: fix sign-compare in board_init driver, cc2420: fix sign-compared sys/net: fix sign-compare in gnrc_tftp driver, pcd8544: fix sign-compare driver, pn532: fix sign-compare driver, sdcard_spi: fix sign-compare tests: fix sign_compare sys/net, lwmac: fix sign_compare pkg, lwip: fix sign-compare boards, waspmote: make CORECLOCK unsigned long to fix sign_compare error tests, sock_ip: fix sign compare tests, msg_avail: fix sign compare tests, sock_udp: fix sign compare boards: fix sign-compare for calliope and microbit matrix
125 lines
3.0 KiB
C
125 lines
3.0 KiB
C
/*
|
|
* Copyright (C) 2014 Freie Universität Berlin, Hinnerk van Bruinehsen
|
|
* Copyright (C) 2016 INRIA, Francisco Acosta
|
|
*
|
|
* 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_waspmote-pro
|
|
* @{
|
|
*
|
|
* @file
|
|
* @brief Peripheral MCU configuration for the Waspmote PRO v1.2 board
|
|
*
|
|
* @author Hinnerk van Bruinehsen <h.v.bruinehsen@fu-berlin.de>
|
|
* @author Francisco Acosta <francisco.acosta@inria.fr>
|
|
*/
|
|
|
|
#ifndef PERIPH_CONF_H
|
|
#define PERIPH_CONF_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @name Clock configuration
|
|
* @{
|
|
*/
|
|
#define CLOCK_CORECLOCK (14745600UL)
|
|
/** @} */
|
|
|
|
/**
|
|
* @name Timer peripheral configuration
|
|
*
|
|
* The ATmega1281 has 6 timers. Timer0 and Timer2 are 8 Bit Timers,
|
|
* Timer0 has special uses too and therefore we'll avoid using it.
|
|
*
|
|
* The timer driver only supports the four 16-bit timers (Timer1, Timer3,
|
|
* Timer4, Timer5), so those are the only ones we can use here.
|
|
*
|
|
* @{
|
|
*/
|
|
#define TIMER_NUMOF (2U)
|
|
|
|
#define TIMER_0 MEGA_TIMER1
|
|
#define TIMER_0_MASK &TIMSK1
|
|
#define TIMER_0_FLAG &TIFR1
|
|
#define TIMER_0_ISRA TIMER1_COMPA_vect
|
|
#define TIMER_0_ISRB TIMER1_COMPB_vect
|
|
#define TIMER_0_ISRC TIMER1_COMPC_vect
|
|
|
|
#define TIMER_1 MEGA_TIMER4
|
|
#define TIMER_1_MASK &TIMSK4
|
|
#define TIMER_1_FLAG &TIFR4
|
|
#define TIMER_1_ISRA TIMER4_COMPA_vect
|
|
#define TIMER_1_ISRB TIMER4_COMPB_vect
|
|
#define TIMER_1_ISRC TIMER4_COMPC_vect
|
|
/** @} */
|
|
|
|
/**
|
|
* @name UART configuration
|
|
*
|
|
* The UART devices have fixed pin mappings, so all we need to do, is to specify
|
|
* which devices we would like to use and their corresponding RX interrupts. See
|
|
* the reference manual for the fixed pin mapping.
|
|
*
|
|
* @{
|
|
*/
|
|
#define UART_NUMOF (2U)
|
|
|
|
#define UART_0 MEGA_UART0
|
|
#define UART_0_ISR USART0_RX_vect
|
|
|
|
#define UART_1 MEGA_UART1
|
|
#define UART_1_ISR USART1_RX_vect
|
|
|
|
/*
|
|
* UART speed constants for CLK=14745600
|
|
*/
|
|
#define UART_2400 (383)
|
|
#define UART_4800 (191)
|
|
#define UART_9600 (95)
|
|
#define UART_115200 (7)
|
|
/** @} */
|
|
|
|
/**
|
|
* @name SPI configuration
|
|
*
|
|
* The atmega1281 has only one hardware SPI with fixed pin configuration, so all
|
|
* we can do here, is to enable or disable it...
|
|
*
|
|
* The fixed pins used, are:
|
|
* MOSI - PB2 (waspmote SPI-UART socket MOSI)
|
|
* MISO - PB3 (waspmote SPI-UART socket MISO)
|
|
* SCK - PB1 (waspmote SPI-UART socket SCK)
|
|
* SS - PB0 (waspmote SD Card Chip Select) -> this pin is configured as output, but not used
|
|
*
|
|
* @{
|
|
*/
|
|
#define SPI_NUMOF 1 /* set to 0 to disable SPI */
|
|
/** @} */
|
|
|
|
/**
|
|
* @name I2C configuration
|
|
* @{
|
|
*/
|
|
#define I2C_NUMOF 1
|
|
/** @} */
|
|
|
|
/**
|
|
* @name ADC configuration
|
|
* @{
|
|
*/
|
|
#define ADC_NUMOF (8U)
|
|
/** @} */
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* PERIPH_CONF_H */
|