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.
|
* 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_HZ (32768UL)
|
||||||
#else
|
#else
|
||||||
#define XTIMER_HZ (250000UL)
|
#define XTIMER_HZ (250000UL)
|
||||||
|
|||||||
@ -85,7 +85,7 @@ static const spi_dev_t spi_config[] = {
|
|||||||
* or two regular timers in cascade mode.
|
* 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[] = {
|
static const timer_conf_t timer_config[] = {
|
||||||
{
|
{
|
||||||
.timer = {
|
.timer = {
|
||||||
@ -113,7 +113,7 @@ static const timer_conf_t timer_config[] = {
|
|||||||
};
|
};
|
||||||
#define TIMER_0_ISR isr_timer1
|
#define TIMER_0_ISR isr_timer1
|
||||||
|
|
||||||
#endif /* EFM32_USE_LETIMER */
|
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||||
|
|
||||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
#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.
|
* 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_HZ (32768UL)
|
||||||
#else
|
#else
|
||||||
#define XTIMER_HZ (250000UL)
|
#define XTIMER_HZ (250000UL)
|
||||||
|
|||||||
@ -145,7 +145,7 @@ static const spi_dev_t spi_config[] = {
|
|||||||
* or two regular timers in cascade mode.
|
* 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[] = {
|
static const timer_conf_t timer_config[] = {
|
||||||
{
|
{
|
||||||
.timer = {
|
.timer = {
|
||||||
@ -173,7 +173,7 @@ static const timer_conf_t timer_config[] = {
|
|||||||
};
|
};
|
||||||
#define TIMER_0_ISR isr_timer1
|
#define TIMER_0_ISR isr_timer1
|
||||||
|
|
||||||
#endif /* EFM32_USE_LETIMER */
|
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||||
|
|
||||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|||||||
@ -33,7 +33,7 @@ extern "C" {
|
|||||||
* @name Xtimer configuration
|
* @name Xtimer configuration
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
#ifdef EFM32_USE_LETIMER
|
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||||
#define XTIMER_HZ (32768UL)
|
#define XTIMER_HZ (32768UL)
|
||||||
#define XTIMER_WIDTH (16)
|
#define XTIMER_WIDTH (16)
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -136,7 +136,7 @@ static const spi_dev_t spi_config[] = {
|
|||||||
* or two regular timers in cascade mode.
|
* 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[] = {
|
static const timer_conf_t timer_config[] = {
|
||||||
{
|
{
|
||||||
.timer = {
|
.timer = {
|
||||||
@ -164,7 +164,7 @@ static const timer_conf_t timer_config[] = {
|
|||||||
};
|
};
|
||||||
#define TIMER_0_ISR isr_wtimer1
|
#define TIMER_0_ISR isr_wtimer1
|
||||||
|
|
||||||
#endif /* EFM32_USE_LETIMER */
|
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||||
|
|
||||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
#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.
|
* 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_HZ (32768UL)
|
||||||
#define XTIMER_WIDTH (16)
|
#define XTIMER_WIDTH (16)
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -145,7 +145,7 @@ static const spi_dev_t spi_config[] = {
|
|||||||
* or two regular timers in cascade mode.
|
* 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[] = {
|
static const timer_conf_t timer_config[] = {
|
||||||
{
|
{
|
||||||
.timer = {
|
.timer = {
|
||||||
@ -173,7 +173,7 @@ static const timer_conf_t timer_config[] = {
|
|||||||
};
|
};
|
||||||
#define TIMER_0_ISR isr_timer1
|
#define TIMER_0_ISR isr_timer1
|
||||||
|
|
||||||
#endif /* EFM32_USE_LETIMER */
|
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||||
|
|
||||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
#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.
|
* 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_HZ (32768UL)
|
||||||
#define XTIMER_WIDTH (16)
|
#define XTIMER_WIDTH (16)
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -199,7 +199,7 @@ static const spi_dev_t spi_config[] = {
|
|||||||
* or two regular timers in cascade mode.
|
* 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[] = {
|
static const timer_conf_t timer_config[] = {
|
||||||
{
|
{
|
||||||
.timer = {
|
.timer = {
|
||||||
@ -227,7 +227,7 @@ static const timer_conf_t timer_config[] = {
|
|||||||
};
|
};
|
||||||
#define TIMER_0_ISR isr_timer1
|
#define TIMER_0_ISR isr_timer1
|
||||||
|
|
||||||
#endif /* EFM32_USE_LETIMER */
|
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||||
|
|
||||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
#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.
|
* 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_HZ (32768UL)
|
||||||
#define XTIMER_WIDTH (16)
|
#define XTIMER_WIDTH (16)
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -199,7 +199,7 @@ static const spi_dev_t spi_config[] = {
|
|||||||
* or two regular timers in cascade mode.
|
* 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[] = {
|
static const timer_conf_t timer_config[] = {
|
||||||
{
|
{
|
||||||
.timer = {
|
.timer = {
|
||||||
@ -227,7 +227,7 @@ static const timer_conf_t timer_config[] = {
|
|||||||
};
|
};
|
||||||
#define TIMER_0_ISR isr_timer1
|
#define TIMER_0_ISR isr_timer1
|
||||||
|
|
||||||
#endif /* EFM32_USE_LETIMER */
|
#endif /* CONFIG_EFM32_USE_LETIMER */
|
||||||
|
|
||||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|||||||
@ -20,6 +20,7 @@
|
|||||||
#ifndef PERIPH_CPU_H
|
#ifndef PERIPH_CPU_H
|
||||||
#define PERIPH_CPU_H
|
#define PERIPH_CPU_H
|
||||||
|
|
||||||
|
#include "kernel_defines.h"
|
||||||
#include "mutex.h"
|
#include "mutex.h"
|
||||||
|
|
||||||
#include "cpu_conf.h"
|
#include "cpu_conf.h"
|
||||||
@ -363,11 +364,11 @@ typedef struct {
|
|||||||
/**
|
/**
|
||||||
* @brief The implementation can use one LETIMER or two regular timers cascaded
|
* @brief The implementation can use one LETIMER or two regular timers cascaded
|
||||||
*/
|
*/
|
||||||
#ifndef EFM32_USE_LETIMER
|
#ifndef CONFIG_EFM32_USE_LETIMER
|
||||||
#define EFM32_USE_LETIMER 0
|
#define CONFIG_EFM32_USE_LETIMER 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EFM32_USE_LETIMER
|
#if IS_ACTIVE(CONFIG_EFM32_USE_LETIMER)
|
||||||
/**
|
/**
|
||||||
* @brief This timer implementation has two available channels
|
* @brief This timer implementation has two available channels
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user