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
|
|
@ -7,3 +7,7 @@ config BOARD_ENABLE_DCDC
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif # BOARD_BPARASITE_NRF52833
|
endif # BOARD_BPARASITE_NRF52833
|
||||||
|
|
||||||
|
config CORE_LOG_LEVEL
|
||||||
|
int "Logging level in core prst library."
|
||||||
|
default 2
|
||||||
|
|
@ -12,3 +12,7 @@ config BOARD_ENABLE_DCDC_HV
|
||||||
default y
|
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"
|
#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.
|
// PWM spec for square wave. Input to the soil sensing circuit.
|
||||||
static const struct pwm_dt_spec soil_pwm_dt =
|
static const struct pwm_dt_spec soil_pwm_dt =
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include "prstlib/led.h"
|
#include "prstlib/led.h"
|
||||||
#include "prstlib/macros.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 =
|
static struct gpio_dt_spec button =
|
||||||
GPIO_DT_SPEC_GET(DT_NODELABEL(button0), gpios);
|
GPIO_DT_SPEC_GET(DT_NODELABEL(button0), gpios);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include "prstlib/macros.h"
|
#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);
|
struct gpio_dt_spec led = GPIO_DT_SPEC_GET(DT_NODELABEL(led0), gpios);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include "prstlib/led.h"
|
#include "prstlib/led.h"
|
||||||
#include "prstlib/macros.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) {
|
int prst_sensors_read_all(prst_sensors_t *sensors) {
|
||||||
RET_IF_ERR(prst_adc_batt_read(&sensors->batt));
|
RET_IF_ERR(prst_adc_batt_read(&sensors->batt));
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#include "prstlib/macros.h"
|
#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));
|
static const struct i2c_dt_spec shtc3 = I2C_DT_SPEC_GET(DT_NODELABEL(shtc3));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue