Skip to content

Commit

Permalink
Merge pull request #3530 from kaspar030/update_msba2
Browse files Browse the repository at this point in the history
cpu: lpc2387: provide periph/* implementations, update to use newlib module.
  • Loading branch information
haukepetersen committed Aug 17, 2015
2 parents 4c2af1e + 5e51bf8 commit 3922b6c
Show file tree
Hide file tree
Showing 33 changed files with 854 additions and 520 deletions.
2 changes: 2 additions & 0 deletions boards/avsextrem/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_rtc
FEATURES_PROVIDED += periph_spi
FEATURES_MCU_GROUP = arm7
2 changes: 1 addition & 1 deletion boards/avsextrem/board_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void init_clks1(void)
/*---------------------------------------------------------------------------*/
void bl_init_ports(void)
{
SCS |= BIT0; // Set IO Ports to fast switching mode
gpio_init_ports();

/* UART0 */
PINSEL0 |= BIT4 + BIT6; // RxD0 and TxD0
Expand Down
22 changes: 16 additions & 6 deletions boards/avsextrem/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
extern "C" {
#endif

/**
* @brief Board LED defines
* @{
*/
#define LED_RED_PIN (BIT25)
#define LED_GREEN_PIN (BIT26)

Expand All @@ -41,14 +45,20 @@ extern "C" {
#define LED_RED_OFF (FIO3SET = LED_RED_PIN)
#define LED_RED_ON (FIO3CLR = LED_RED_PIN)
#define LED_RED_TOGGLE (FIO3PIN ^= LED_RED_PIN)
/** @} */

#ifdef MODULE_FAT
#define CFG_CONF_MEM_SIZE 0x7FFFFFFF
#define SYSLOG_CONF_NUM_INTERFACES 2
#else
#define SYSLOG_CONF_NUM_INTERFACES 1
#endif
/**
* @name Define UART device and baudrate for stdio
* @{
*/
#define STDIO UART_0
#define STDIO_BAUDRATE (115200U)
#define STDIO_RX_BUFSIZE (64U)
/** @} */

/**
* @brief Initialize the board's clock system
*/
void init_clks1(void);

#ifdef __cplusplus
Expand Down
12 changes: 12 additions & 0 deletions boards/avsextrem/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ extern "C" {
*/
#define RTC_NUMOF (1)

/**
* @brief uart configuration
*/
#define UART_NUMOF (1)
#define UART_0_EN (1)

/**
* @brief SPI configuration
*/
#define SPI_NUMOF (1)
#define SPI_0_EN (1)

#ifdef __cplusplus
}
#endif
Expand Down
3 changes: 0 additions & 3 deletions boards/msba2-common/Makefile.dep
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
ifneq (,$(filter ltc4150,$(USEMODULE)))
USEMODULE += gpioint
endif
7 changes: 5 additions & 2 deletions boards/msba2-common/Makefile.include
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
## the cpu to build for
export CPU = lpc2387

# Target triple for the build. Use arm-none-eabi if you are unsure.
export TARGET_TRIPLE ?= arm-none-eabi

# toolchain config
export PREFIX = arm-none-eabi-
#export PREFIX = arm-elf-
export PREFIX = $(if $(TARGET_TRIPLE),$(TARGET_TRIPLE)-)

export CC = $(PREFIX)gcc
export CXX = $(PREFIX)g++
export AR = $(PREFIX)ar
Expand Down
50 changes: 0 additions & 50 deletions boards/msba2-common/drivers/msba2-ltc4150.c

This file was deleted.

205 changes: 0 additions & 205 deletions boards/msba2-common/drivers/msba2-uart0.c

This file was deleted.

2 changes: 2 additions & 0 deletions boards/msba2/Makefile.features
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FEATURES_PROVIDED += periph_gpio
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_rtc
FEATURES_PROVIDED += periph_spi
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += config
FEATURES_MCU_GROUP = arm7
2 changes: 1 addition & 1 deletion boards/msba2/board_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void bl_blink(void)

void bl_init_ports(void)
{
SCS |= BIT0; // Set IO Ports to fast switching mode
gpio_init_ports();

/* UART0 */
PINSEL0 |= BIT4 + BIT6; // RxD0 and TxD0
Expand Down
17 changes: 17 additions & 0 deletions boards/msba2/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
extern "C" {
#endif

/**
* @brief Board LED defines
* @{
*/
#define LED_RED_PIN (BIT25)
#define LED_GREEN_PIN (BIT26)

Expand All @@ -38,7 +42,20 @@ extern "C" {
#define LED_RED_OFF (FIO3SET = LED_RED_PIN)
#define LED_RED_ON (FIO3CLR = LED_RED_PIN)
#define LED_RED_TOGGLE (FIO3PIN ^= LED_RED_PIN)
/** @} */

/**
* @name Define UART device and baudrate for stdio
* @{
*/
#define STDIO UART_0
#define STDIO_BAUDRATE (115200U)
#define STDIO_RX_BUFSIZE (64U)
/** @} */

/**
* @brief initialize the board's clock system
*/
void init_clks1(void);

#ifdef __cplusplus
Expand Down
Loading

0 comments on commit 3922b6c

Please sign in to comment.