Capacitive Sensor

nRF5 SDK v12.2.0

A set of macros to facilitate creation of a new capacitive sensor instance. More...

Macros

#define NRF_CSENSE_INTERNAL_BUTTON_DEF (name, p1)
#define NRF_CSENSE_INTERNAL_SLIDER_2_DEF (name, steps_no, p1, p2)
#define NRF_CSENSE_INTERNAL_SLIDER_3_DEF (name, steps_no, p1, p2, p3)
#define NRF_CSENSE_INTERNAL_SLIDER_4_DEF (name, steps_no, p1, p2, p3, p4)
#define NRF_CSENSE_INTERNAL_SLIDER_5_DEF (name, steps_no, p1, p2, p3, p4, p5)
#define NRF_CSENSE_INTERNAL_WHEEL_3_DEF (name, steps_no, p1, p2, p3)
#define NRF_CSENSE_INTERNAL_WHEEL_4_DEF (name, steps_no, p1, p2, p3, p4)
#define NRF_CSENSE_INTERNAL_WHEEL_5_DEF (name, steps_no, p1, p2, p3, p4, p5)

Detailed Description

A set of macros to facilitate creation of a new capacitive sensor instance.

Macro Definition Documentation

#define NRF_CSENSE_INTERNAL_BUTTON_DEF ( name,
p1
)
Value:
static nrf_csense_pad_t CONCAT_2 (name, _pad) = \
{ \
.p_next_pad = NULL, \
.threshold = GET_ARG_2 p1, \
.pad_index = 0, \
.analog_input_number = GET_ARG_1 p1 \
}; \
static nrf_csense_min_max_t CONCAT_2 (name, _minmax); \
static nrf_csense_instance_t name = \
{ \
.p_nrf_csense_pad = & CONCAT_2 (name, _pad), \
.min_max = & CONCAT_2 (name, _minmax), \
.steps = 1, \
.number_of_pads = 1, \
.is_active = false , \
.is_touched = false \
};
#define NRF_CSENSE_INTERNAL_SLIDER_2_DEF ( name,
steps_no,
p1,
p2
)
Value:
static nrf_csense_pad_t CONCAT_2 (name, _pad)[2] = \
{ \
{ \
.p_next_pad = & CONCAT_2 (name, _pad)[1], \
.threshold = GET_ARG_2 p1, \
.pad_index = 0, \
.analog_input_number = GET_ARG_1 p1 \
}, \
{ \
.p_next_pad = NULL, \
.threshold = GET_ARG_2 p2, \
.pad_index = 1, \
.analog_input_number = GET_ARG_1 p2 \
} \
}; \
\
static nrf_csense_min_max_t CONCAT_2 (name, _minmax)[2]; \
static nrf_csense_instance_t name = \
{ \
.p_nrf_csense_pad = CONCAT_2 (name, _pad), \
.min_max = CONCAT_2 (name, _minmax), \
.steps = steps_no, \
.number_of_pads = 2, \
.is_active = false , \
.is_touched = false \
};