From d04c493ceb70d0dde7fff0d62b9a3e05a9d8cb9d Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Sun, 4 Jul 2021 17:42:30 +0200 Subject: [PATCH 1/2] boards/pic32-wifire: Add CLOCK_CORECLOCK Also sneak in use of MHZ() macro, so that reviews don't need to count zeros. --- boards/pic32-wifire/include/periph_conf.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/boards/pic32-wifire/include/periph_conf.h b/boards/pic32-wifire/include/periph_conf.h index 342a615041..3784f170eb 100644 --- a/boards/pic32-wifire/include/periph_conf.h +++ b/boards/pic32-wifire/include/periph_conf.h @@ -21,17 +21,25 @@ #define PERIPH_CONF_H #include "cpu.h" +#include "macros/units.h" #include "periph_cpu.h" #ifdef __cplusplus extern "C" { #endif +/** + * @name Clock configurations + * @{ + */ /** * @brief The peripheral clock is required for the UART Baud rate calculation * It is configured by the 'config' registers (see pic32_config_settings.c) */ -#define PERIPHERAL_CLOCK (100000000) /* Hz */ +#define PERIPHERAL_CLOCK MHZ(100) + +#define CLOCK_CORECLOCK MHZ(200) +/** @} */ /** * @name Timer definitions From 5a8e36769f43b46acbaa1bc321db3715f6b89b05 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Sun, 4 Jul 2021 17:59:21 +0200 Subject: [PATCH 2/2] boards/6lowpan-clicker: Add CLOCK_CORECLOCK Also sneak in use of MHZ() macro, so that reviews don't need to count zeros. --- boards/6lowpan-clicker/include/periph_conf.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/boards/6lowpan-clicker/include/periph_conf.h b/boards/6lowpan-clicker/include/periph_conf.h index 6c01001724..4681d09404 100644 --- a/boards/6lowpan-clicker/include/periph_conf.h +++ b/boards/6lowpan-clicker/include/periph_conf.h @@ -22,6 +22,7 @@ #define PERIPH_CONF_H #include "cpu.h" +#include "macros/units.h" #include "periph_cpu.h" #ifdef __cplusplus @@ -29,12 +30,19 @@ extern "C" { #endif +/** + * @name Clock configurations + * @{ + */ /** * @brief The peripheral clock is required for the UART Baud rate calculation * It is configured by the 'config' registers (see pic32_config_settings.c) * Note 120MHz is the max F for this device. */ -#define PERIPHERAL_CLOCK (96000000) /* Hz */ +#define PERIPHERAL_CLOCK MHZ(96) + +#define CLOCK_CORECLOCK MHZ(120) +/** @} */ /** * @name Timer definitions