2014-10-28 09:58:25 +01:00
|
|
|
/*
|
2014-11-19 16:34:45 +01:00
|
|
|
* Copyright (C) 2014 INRIA
|
|
|
|
* Copyright (C) 2014 Freie Universität Berlin
|
2014-10-28 09:58:25 +01:00
|
|
|
*
|
2014-11-19 16:34:45 +01:00
|
|
|
* 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.
|
2014-10-28 09:58:25 +01:00
|
|
|
*/
|
|
|
|
|
2013-11-09 00:43:35 +01:00
|
|
|
/**
|
2015-02-12 13:39:08 +01:00
|
|
|
* @defgroup boards_mbed_lpc1768 mbed LPC1768 development kit
|
2014-07-31 20:34:28 +02:00
|
|
|
* @ingroup boards
|
2014-11-19 16:34:45 +01:00
|
|
|
* @brief Support for the mbed LPC1762 board
|
2013-11-09 00:43:35 +01:00
|
|
|
* @{
|
2014-11-19 16:34:45 +01:00
|
|
|
*
|
|
|
|
* @file
|
|
|
|
* @brief Board specific definitions for the mbed_lpc1768 board
|
|
|
|
*
|
|
|
|
* @author Oliver Hahm <oliver.hahm@inria.fr>
|
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
2013-11-09 00:43:35 +01:00
|
|
|
*/
|
|
|
|
|
2015-04-23 05:00:54 +02:00
|
|
|
#ifndef BOARD_H_
|
|
|
|
#define BOARD_H_
|
2014-11-19 16:34:45 +01:00
|
|
|
|
2013-11-09 00:43:35 +01:00
|
|
|
#include <stdint.h>
|
2014-11-19 16:34:45 +01:00
|
|
|
|
2013-11-09 00:43:35 +01:00
|
|
|
#include "bitarithm.h"
|
2014-11-19 16:34:45 +01:00
|
|
|
#include "cpu.h"
|
2013-11-09 00:43:35 +01:00
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2014-11-19 16:34:45 +01:00
|
|
|
/**
|
|
|
|
* @name LED pin definitions
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define LED_PORT LPC_GPIO1
|
|
|
|
#define LED1_PIN BIT18
|
|
|
|
#define LED2_PIN BIT20
|
|
|
|
#define LED3_PIN BIT21
|
|
|
|
#define LED4_PIN BIT23
|
|
|
|
/** @} */
|
2013-11-09 00:43:35 +01:00
|
|
|
|
2014-11-19 16:34:45 +01:00
|
|
|
/**
|
|
|
|
* @name Macros for controlling the on-board LEDs.
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
#define LED1_ON (LED_PORT->FIOSET = LED1_PIN)
|
|
|
|
#define LED1_OFF (LED_PORT->FIOCLR = LED1_PIN)
|
|
|
|
#define LED1_TOGGLE (LED_PORT->FIOPIN ^= LED1_PIN)
|
|
|
|
#define LED2_ON (LED_PORT->FIOSET = LED2_PIN)
|
|
|
|
#define LED2_OFF (LED_PORT->FIOCLR = LED2_PIN)
|
|
|
|
#define LED2_TOGGLE (LED_PORT->FIOPIN ^= LED2_PIN)
|
|
|
|
#define LED3_ON (LED_PORT->FIOSET = LED3_PIN)
|
|
|
|
#define LED3_OFF (LED_PORT->FIOCLR = LED3_PIN)
|
|
|
|
#define LED3_TOGGLE (LED_PORT->FIOPIN ^= LED3_PIN)
|
|
|
|
#define LED4_ON (LED_PORT->FIOSET = LED4_PIN)
|
|
|
|
#define LED4_OFF (LED_PORT->FIOCLR = LED4_PIN)
|
|
|
|
#define LED4_TOGGLE (LED_PORT->FIOPIN ^= LED4_PIN)
|
|
|
|
|
|
|
|
/* for compatibility to other boards */
|
|
|
|
#define LED_GREEN_ON LED1_ON
|
|
|
|
#define LED_GREEN_OFF LED1_OFF
|
|
|
|
#define LED_GREEN_TOGGLE LED1_TOGGLE
|
|
|
|
#define LED_RED_ON LED4_ON
|
|
|
|
#define LED_RED_OFF LED4_OFF
|
|
|
|
#define LED_RED_TOGGLE LED4_TOGGLE
|
|
|
|
/** @} */
|
|
|
|
|
2013-11-09 00:43:35 +01:00
|
|
|
/**
|
2014-11-19 16:34:45 +01:00
|
|
|
* @brief Initialize board specific hardware, include clocks, LEDs and stdio
|
2013-11-09 00:43:35 +01:00
|
|
|
*/
|
2014-11-19 16:34:45 +01:00
|
|
|
void board_init(void);
|
2013-11-09 00:43:35 +01:00
|
|
|
|
2014-10-13 15:25:50 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2015-04-23 05:00:54 +02:00
|
|
|
#endif /* BOARD_H_ */
|
2014-11-19 16:34:45 +01:00
|
|
|
/** @} */
|