Update boards/STM32_PRIMER2 for newer ChibiOS/RT

This commit is contained in:
NIIBE Yutaka
2013-02-18 16:32:21 +09:00
parent 605d8ef6c1
commit 38bbd38d14
4 changed files with 22 additions and 9 deletions

View File

@@ -15,6 +15,7 @@
* boards/OLIMEX_STM32_H103/*: Likewise. * boards/OLIMEX_STM32_H103/*: Likewise.
* boards/STBEE/*: Likewise. * boards/STBEE/*: Likewise.
* boards/STBEE_MINI/*: Likewise. * boards/STBEE_MINI/*: Likewise.
* boards/STM32_PRIMER2/*: Likewise.
Merge ec_p256 branch. Merge ec_p256 branch.
* src/Makefile.in: Add ECC files. * src/Makefile.in: Add ECC files.

View File

@@ -2,13 +2,11 @@
#include "ch.h" #include "ch.h"
#include "hal.h" #include "hal.h"
#include "../common/hwinit.c" /*
* Board-specific initialization code.
void */
hwinit1(void) void boardInit(void)
{ {
hwinit1_common ();
/* /*
* Clear LED and SHUTDOWN output. * Clear LED and SHUTDOWN output.
*/ */

View File

@@ -37,6 +37,8 @@
#define GPIO_LED GPIOE_LEDR #define GPIO_LED GPIOE_LEDR
#define IOPORT_LED GPIOE #define IOPORT_LED GPIOE
/* NeuG settings for ADC2. */
/* /*
* Board identifier. * Board identifier.
*/ */
@@ -91,6 +93,8 @@
/* /*
* Port A setup. * Port A setup.
* Everything input with pull-up except: * Everything input with pull-up except:
* PA0 - Digital input with PullUp. AN0
* PA1 - Digital input with PullUp. AN1
* PA2 - Alternate output (USART2 TX). * PA2 - Alternate output (USART2 TX).
* PA3 - Normal input (USART2 RX). * PA3 - Normal input (USART2 RX).
* PA8 - Input with pull-down (PBUTTON). * PA8 - Input with pull-down (PBUTTON).
@@ -158,4 +162,14 @@
#define VAL_GPIOGODR 0xFFFFFFFF #define VAL_GPIOGODR 0xFFFFFFFF
#endif #endif
#if !defined(_FROM_ASM_)
#ifdef __cplusplus
extern "C" {
#endif
void boardInit(void);
#ifdef __cplusplus
}
#endif
#endif /* _FROM_ASM_ */
#endif /* _BOARD_H_ */ #endif /* _BOARD_H_ */

View File

@@ -7,8 +7,8 @@
#define STM32_PLLMUL_VALUE 12 #define STM32_PLLMUL_VALUE 12
#define STM32_HPRE STM32_HPRE_DIV1 #define STM32_HPRE STM32_HPRE_DIV1
#define STM32_PPRE1 STM32_PPRE1_DIV2 #define STM32_PPRE1 STM32_PPRE1_DIV2
#define STM32_PPRE2 STM32_PPRE2_DIV2 #define STM32_PPRE2 STM32_PPRE2_DIV1
#define STM32_ADCPRE STM32_ADCPRE_DIV4 #define STM32_ADCPRE STM32_ADCPRE_DIV6
#define STM32_MCO STM32_MCO_NOCLOCK #define STM32_RTCSEL STM32_RTCSEL_NOCLOCK
#include "mcuconf-common.h" #include "mcuconf-common.h"