| nRF5 SDK v12.0.0 |

Choose documentation: | nRF5 SDK | S130 SoftDevice API | S132 SoftDevice API | S212 SoftDevice API | S332 SoftDevice API

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Macros
Capacitive Sensor
Capacitive Sensor Library

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 \
};