paa5100je_params.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2025 TU Dresden
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #include "board.h"
19 #include "paa5100je.h"
20 #include "paa5100je_constants.h"
21 #include "periph/spi.h"
22 #include "saul_reg.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
31 #ifndef CONFIG_PAA5100JE_QUALITY_THRESHOLD
32 # define CONFIG_PAA5100JE_QUALITY_THRESHOLD (0x19)
33 #endif
34 
38 #ifndef CONFIG_PAA5100JE_TIMEOUT_MS
39 # define CONFIG_PAA5100JE_TIMEOUT_MS (1000U)
40 #endif
41 
45 #ifndef CONFIG_PAA5100JE_SCALE_DENOMINATOR
46 # define CONFIG_PAA5100JE_SCALE_DENOMINATOR (100)
47 #endif
48 
53 #ifndef PAA5100JE_PARAM_SPI
54 # define PAA5100JE_PARAM_SPI (SPI_DEV(0))
55 #endif
56 
57 #ifndef PAA5100JE_PARAM_SPI_CLK
58 # define PAA5100JE_PARAM_SPI_CLK (SPI_CLK_400KHZ)
59 #endif
60 
61 #ifndef PAA5100JE_PARAM_CS
62 # define PAA5100JE_PARAM_CS (GPIO_PIN(1, 2))
63 #endif
64 
65 #ifndef PAA5100JE_PARAM_VAR
66 # define PAA5100JE_PARAM_VAR PAA5100JE
67 #endif
68 
72 #ifndef PAA5100JE_PARAMS
73 # define PAA5100JE_PARAMS { .spi = PAA5100JE_PARAM_SPI, \
74  .clk = PAA5100JE_PARAM_SPI_CLK, \
75  .cs = PAA5100JE_PARAM_CS, \
76  .var = PAA5100JE_PARAM_VAR }
77 #endif
78 
82 #ifndef PAA5100JE_SAUL_INFO
83 # define PAA5100JE_SAUL_INFO { .name = "Flow Sensor (PAA5100JE/PMW3901)" }
84 #endif
85 
92 {
94 };
95 
100 {
102 };
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 
Internal addresses, registers and constants.
static const paa5100je_params_t paa5100je_params[]
Default configuration parameters.
#define PAA5100JE_SAUL_INFO
Default driver SAUL registry information.
#define PAA5100JE_PARAMS
Default sensor parameters.
static const saul_reg_info_t paa5100je_saul_info[]
Additional meta information to keep in the SAUL registry.
SAUL registry interface definition.
Low-level SPI peripheral driver interface definition.
Device initialization parameters.
Definition: paa5100je.h:73
Additional data to collect for each entry.
Definition: saul_reg.h:48