mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/efm32: use IS_ACTIVE for CONFIG_EFM32_USE_LETIMER
This commit is contained in:
parent
029ae8c7d2
commit
5c4db4a65b
@ -34,7 +34,7 @@ extern "C" {
|
||||
* The timer runs at 250 kHz to increase accuracy or 32768 Hz for LETIMER.
|
||||
* @{
|
||||
*/
|
||||
#ifdef EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
#define XTIMER_HZ (32768UL)
|
||||
#else
|
||||
#define XTIMER_HZ (250000UL)
|
||||
|
@ -85,7 +85,7 @@ static const spi_dev_t spi_config[] = {
|
||||
* or two regular timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
#if EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.timer = {
|
||||
@ -113,7 +113,7 @@ static const timer_conf_t timer_config[] = {
|
||||
};
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
|
||||
#endif /* EFM32_USE_LETIMER */
|
||||
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
@ -35,7 +35,7 @@ extern "C" {
|
||||
* The timer runs at 250 KHz to increase accuracy or 32768 Hz for LETIMER.
|
||||
* @{
|
||||
*/
|
||||
#ifdef EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
#define XTIMER_HZ (32768UL)
|
||||
#else
|
||||
#define XTIMER_HZ (250000UL)
|
||||
|
@ -145,7 +145,7 @@ static const spi_dev_t spi_config[] = {
|
||||
* or two regular timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
#if EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.timer = {
|
||||
@ -173,7 +173,7 @@ static const timer_conf_t timer_config[] = {
|
||||
};
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
|
||||
#endif /* EFM32_USE_LETIMER */
|
||||
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
@ -33,7 +33,7 @@ extern "C" {
|
||||
* @name Xtimer configuration
|
||||
* @{
|
||||
*/
|
||||
#ifdef EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
#define XTIMER_HZ (32768UL)
|
||||
#define XTIMER_WIDTH (16)
|
||||
#else
|
||||
|
@ -136,7 +136,7 @@ static const spi_dev_t spi_config[] = {
|
||||
* or two regular timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
#if EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.timer = {
|
||||
@ -164,7 +164,7 @@ static const timer_conf_t timer_config[] = {
|
||||
};
|
||||
#define TIMER_0_ISR isr_wtimer1
|
||||
|
||||
#endif /* EFM32_USE_LETIMER */
|
||||
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
@ -35,7 +35,7 @@ extern "C" {
|
||||
* The timer runs at 250 KHz to increase accuracy or 32768 Hz for LETIMER.
|
||||
* @{
|
||||
*/
|
||||
#ifdef EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
#define XTIMER_HZ (32768UL)
|
||||
#define XTIMER_WIDTH (16)
|
||||
#else
|
||||
|
@ -145,7 +145,7 @@ static const spi_dev_t spi_config[] = {
|
||||
* or two regular timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
#if EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.timer = {
|
||||
@ -173,7 +173,7 @@ static const timer_conf_t timer_config[] = {
|
||||
};
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
|
||||
#endif /* EFM32_USE_LETIMER */
|
||||
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
@ -35,7 +35,7 @@ extern "C" {
|
||||
* The timer runs at 250 KHz to increase accuracy or 32768 Hz for LETIMER.
|
||||
* @{
|
||||
*/
|
||||
#ifdef EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
#define XTIMER_HZ (32768UL)
|
||||
#define XTIMER_WIDTH (16)
|
||||
#else
|
||||
|
@ -199,7 +199,7 @@ static const spi_dev_t spi_config[] = {
|
||||
* or two regular timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
#if EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.timer = {
|
||||
@ -227,7 +227,7 @@ static const timer_conf_t timer_config[] = {
|
||||
};
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
|
||||
#endif /* EFM32_USE_LETIMER */
|
||||
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
@ -35,7 +35,7 @@ extern "C" {
|
||||
* The timer runs at 250 KHz to increase accuracy or 32768 Hz for LETIMER.
|
||||
* @{
|
||||
*/
|
||||
#ifdef EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
#define XTIMER_HZ (32768UL)
|
||||
#define XTIMER_WIDTH (16)
|
||||
#else
|
||||
|
@ -199,7 +199,7 @@ static const spi_dev_t spi_config[] = {
|
||||
* or two regular timers in cascade mode.
|
||||
* @{
|
||||
*/
|
||||
#if EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
static const timer_conf_t timer_config[] = {
|
||||
{
|
||||
.timer = {
|
||||
@ -227,7 +227,7 @@ static const timer_conf_t timer_config[] = {
|
||||
};
|
||||
#define TIMER_0_ISR isr_timer1
|
||||
|
||||
#endif /* EFM32_USE_LETIMER */
|
||||
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
@ -20,6 +20,7 @@
|
||||
#ifndef PERIPH_CPU_H
|
||||
#define PERIPH_CPU_H
|
||||
|
||||
#include "kernel_defines.h"
|
||||
#include "mutex.h"
|
||||
|
||||
#include "cpu_conf.h"
|
||||
@ -363,11 +364,11 @@ typedef struct {
|
||||
/**
|
||||
* @brief The implementation can use one LETIMER or two regular timers cascaded
|
||||
*/
|
||||
#ifndef EFM32_USE_LETIMER
|
||||
#define EFM32_USE_LETIMER 0
|
||||
#ifndef CONFIG_EFM32_USE_LETIMER
|
||||
#define CONFIG_EFM32_USE_LETIMER 0
|
||||
#endif
|
||||
|
||||
#ifdef EFM32_USE_LETIMER
|
||||
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||
/**
|
||||
* @brief This timer implementation has two available channels
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user