mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
boards/nz32-sc151: use TIM5 common timer configuration
This requires including STM32 common include directoy as well
This commit is contained in:
parent
b1fa4fb2d9
commit
927f283d97
@ -2,6 +2,9 @@
|
||||
export CPU = stm32l1
|
||||
export CPU_MODEL = stm32l151rc
|
||||
|
||||
# we use shared STM32 configuration snippets
|
||||
INCLUDES += -I$(RIOTBOARD)/common/stm32/include
|
||||
|
||||
# define the default port depending on the host OS
|
||||
PORT_LINUX ?= /dev/ttyUSB0
|
||||
PORT_DARWIN ?= $(firstword $(sort $(wildcard /dev/tty.SLAB_USBtoUART*)))
|
||||
|
@ -20,6 +20,7 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "cfg_timer_tim5.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -49,25 +50,6 @@ extern "C" {
|
||||
#define CLOCK_APB2 (CLOCK_CORECLOCK / 1)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Timer configuration
|
||||
* @{
|
||||
*/
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.dev = TIM5,
|
||||
.max = 0xffffffff,
|
||||
.rcc_mask = RCC_APB1ENR_TIM5EN,
|
||||
.bus = APB1,
|
||||
.irqn = TIM5_IRQn
|
||||
}
|
||||
};
|
||||
|
||||
#define TIMER_0_ISR (isr_tim5)
|
||||
|
||||
#define TIMER_NUMOF (sizeof(timer_config) / sizeof(timer_config[0]))
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name UART configuration
|
||||
* @{
|
||||
|
Loading…
Reference in New Issue
Block a user