Making core log level configurable via Kconfig entry.
This commit is contained in:
parent
5da4ad836f
commit
228b6f2f16
7 changed files with 15 additions and 7 deletions
|
|
@ -6,4 +6,8 @@ config BOARD_ENABLE_DCDC
|
|||
select SOC_DCDC_NRF52X
|
||||
default y
|
||||
|
||||
endif # BOARD_BPARASITE_NRF52833
|
||||
endif # BOARD_BPARASITE_NRF52833
|
||||
|
||||
config CORE_LOG_LEVEL
|
||||
int "Logging level in core prst library."
|
||||
default 2
|
||||
|
|
@ -11,4 +11,8 @@ config BOARD_ENABLE_DCDC_HV
|
|||
select SOC_DCDC_NRF52X_HV
|
||||
default y
|
||||
|
||||
endif # BOARD_BPARASITE_NRF52840
|
||||
endif # BOARD_BPARASITE_NRF52840
|
||||
|
||||
config CORE_LOG_LEVEL
|
||||
int "Logging level in core prst library."
|
||||
default 2
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
#include "prstlib/macros.h"
|
||||
|
||||
LOG_MODULE_REGISTER(adc, LOG_LEVEL_WRN);
|
||||
LOG_MODULE_REGISTER(adc, CONFIG_CORE_LOG_LEVEL);
|
||||
|
||||
// PWM spec for square wave. Input to the soil sensing circuit.
|
||||
static const struct pwm_dt_spec soil_pwm_dt =
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include "prstlib/led.h"
|
||||
#include "prstlib/macros.h"
|
||||
|
||||
LOG_MODULE_REGISTER(button, LOG_LEVEL_WRN);
|
||||
LOG_MODULE_REGISTER(button, CONFIG_CORE_LOG_LEVEL);
|
||||
|
||||
static struct gpio_dt_spec button =
|
||||
GPIO_DT_SPEC_GET(DT_NODELABEL(button0), gpios);
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "prstlib/macros.h"
|
||||
|
||||
LOG_MODULE_REGISTER(led, LOG_LEVEL_WRN);
|
||||
LOG_MODULE_REGISTER(led, CONFIG_CORE_LOG_LEVEL);
|
||||
|
||||
struct gpio_dt_spec led = GPIO_DT_SPEC_GET(DT_NODELABEL(led0), gpios);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
#include "prstlib/led.h"
|
||||
#include "prstlib/macros.h"
|
||||
|
||||
LOG_MODULE_REGISTER(sensors, LOG_LEVEL_WRN);
|
||||
LOG_MODULE_REGISTER(sensors, CONFIG_CORE_LOG_LEVEL);
|
||||
|
||||
int prst_sensors_read_all(prst_sensors_t *sensors) {
|
||||
RET_IF_ERR(prst_adc_batt_read(&sensors->batt));
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "prstlib/macros.h"
|
||||
|
||||
LOG_MODULE_REGISTER(shtc3, LOG_LEVEL_WRN);
|
||||
LOG_MODULE_REGISTER(shtc3, CONFIG_CORE_LOG_LEVEL);
|
||||
|
||||
static const struct i2c_dt_spec shtc3 = I2C_DT_SPEC_GET(DT_NODELABEL(shtc3));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue