mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
boards/samr34-xpro: make use of helper macros
This commit is contained in:
parent
4a9130259a
commit
760b7f5057
@ -21,6 +21,7 @@
|
||||
#define PERIPH_CONF_H
|
||||
|
||||
#include "periph_cpu.h"
|
||||
#include "macros/units.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -29,7 +30,7 @@ extern "C" {
|
||||
/**
|
||||
* @brief GCLK reference speed
|
||||
*/
|
||||
#define CLOCK_CORECLOCK (48000000U)
|
||||
#define CLOCK_CORECLOCK MHZ(48)
|
||||
|
||||
/**
|
||||
* @brief Enable the internal DC/DC converter
|
||||
@ -57,6 +58,7 @@ static const tc32_conf_t timer_config[] = {
|
||||
#define TIMER_0_CHANNELS 2
|
||||
#define TIMER_0_ISR isr_tc0
|
||||
#define TIMER_NUMOF (sizeof(timer_config)/sizeof(timer_config[0]))
|
||||
#define TIMER_NUMOF ARRAY_SIZE(timer_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
@ -83,7 +85,7 @@ static const uart_conf_t uart_config[] = {
|
||||
/* interrupt function name mapping */
|
||||
#define UART_0_ISR isr_sercom0
|
||||
|
||||
#define UART_NUMOF (sizeof(uart_config) / sizeof(uart_config[0]))
|
||||
#define UART_NUMOF ARRAY_SIZE(uart_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
@ -109,7 +111,7 @@ static const spi_conf_t spi_config[] = {
|
||||
}
|
||||
};
|
||||
|
||||
#define SPI_NUMOF (sizeof(spi_config) / sizeof(spi_config[0]))
|
||||
#define SPI_NUMOF ARRAY_SIZE(spi_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
@ -127,7 +129,7 @@ static const i2c_conf_t i2c_config[] = {
|
||||
.flags = I2C_FLAG_NONE
|
||||
}
|
||||
};
|
||||
#define I2C_NUMOF (sizeof(i2c_config) / sizeof(i2c_config[0]))
|
||||
#define I2C_NUMOF ARRAY_SIZE(i2c_config)
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user