Loading...
Searching...
No Matches
hm330x_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Inria
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
20
21#include "board.h"
22#include "saul_reg.h"
23
24#include "hm330x.h"
25#include "hm330x_constants.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
38#ifndef HM330X_PARAM_I2C_DEV
39#define HM330X_PARAM_I2C_DEV I2C_DEV(0)
40#endif
44#ifndef HM330X_PARAM_RESET_PIN
45#define HM330X_PARAM_RESET_PIN GPIO_UNDEF
46#endif
50#ifndef HM330X_PARAM_SET_PIN
51#define HM330X_PARAM_SET_PIN GPIO_UNDEF
52#endif
56#ifndef HM330X_SAUL_INFO
57#define HM330X_SAUL_INFO { .name = "hm330x" }
58#endif
62#ifndef HM330X_PARAMS
63#define HM330X_PARAMS { .i2c = HM330X_PARAM_I2C_DEV, \
64 .reset_pin = HM330X_PARAM_RESET_PIN, \
65 .set_pin = HM330X_PARAM_SET_PIN }
66#endif
68
73{
75};
76
80#define HM330X_NUMOF ARRAY_SIZE(hm330x_params)
81
89
93#define HM330X_INFO_NUM ARRAY_SIZE(hm330x_saul_info)
94
95#ifdef __cplusplus
96}
97#endif
98
Internal addresses, registers and constants.
static const saul_reg_info_t hm330x_saul_info[]
Additional meta information to keep in the SAUL registry.
#define HM330X_SAUL_INFO
HM330X default SAUL information.
static const hm330x_params_t hm330x_params[]
Configuration struct.
#define HM330X_PARAMS
HM330X default parameters.
SAUL registry interface definition.
Device initialization parameters.
Definition hm330x.h:78
Additional data to collect for each entry.
Definition saul_reg.h:48