mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
84 lines
1.7 KiB
C
84 lines
1.7 KiB
C
/*
|
|
* Copyright (C) 2015 Lari Lehtomäki
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
/**
|
|
* @defgroup boards_nucleo-f401 Nucleo-F401
|
|
* @ingroup boards
|
|
* @brief Board specific files for the nucleo-f401 board
|
|
* @{
|
|
*
|
|
* @file
|
|
* @brief Board specific definitions for the nucleo-f401 board
|
|
*
|
|
* @author Lari Lehtomäki <lari@lehtomaki.fi>
|
|
*/
|
|
|
|
#ifndef BOARD_H_
|
|
#define BOARD_H_
|
|
|
|
#include "cpu.h"
|
|
#include "periph_conf.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* @name Define the nominal CPU core clock in this board
|
|
*/
|
|
#define F_CPU CLOCK_CORECLOCK
|
|
|
|
/**
|
|
* @name xtimer configuration
|
|
* @{
|
|
*/
|
|
#define XTIMER TIMER_0
|
|
#define XTIMER_CHAN (0)
|
|
#define XTIMER_OVERHEAD (6)
|
|
#define XTIMER_BACKOFF (5)
|
|
/** @} */
|
|
|
|
/**
|
|
* @name LED pin definitions
|
|
* @{
|
|
*/
|
|
#define LED_GREEN_PORT (GPIOA)
|
|
#define LED_GREEN_PIN (5)
|
|
#define LED_GREEN_GPIO GPIO_PIN(PORT_A,5)
|
|
/** @} */
|
|
|
|
/**
|
|
* @name Macros for controlling the on-board LEDs.
|
|
* @{
|
|
*/
|
|
#define LED_RED_ON
|
|
#define LED_RED_OFF
|
|
#define LED_RED_TOGGLE
|
|
|
|
#define LED_GREEN_ON (LED_GREEN_PORT->BSRRL = (1<<LED_GREEN_PIN))
|
|
#define LED_GREEN_OFF (LED_GREEN_PORT->BSRRH = (1<<LED_GREEN_PIN))
|
|
#define LED_GREEN_TOGGLE (LED_GREEN_PORT->ODR ^= (1<<LED_GREEN_PIN))
|
|
|
|
#define LED_ORANGE_ON
|
|
#define LED_ORANGE_OFF
|
|
#define LED_ORANGE_TOGGLE
|
|
/** @} */
|
|
|
|
|
|
/**
|
|
* @brief Initialize board specific hardware, including clock, LEDs and std-IO
|
|
*/
|
|
void board_init(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* BOARD_H_ */
|
|
/** @} */
|