-
Notifications
You must be signed in to change notification settings - Fork 3
/
hybrid_sensor.h
108 lines (90 loc) · 2.27 KB
/
hybrid_sensor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/**
******************************************************************************
* @file hybrid_sensor.h
* @author MCD Application Team
* @brief This header file contains the functions prototypes for the
* hybrid sensor driver
******************************************************************************
* @attention
*
* Copyright (c) 2021 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef HYBRID_SENSOR_H
#define HYBRID_SENSOR_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
/** @addtogroup BSP BSP
* @{
*/
/** @addtogroup COMPONENTS COMPONENTS
* @{
*/
/** @addtogroup COMMON COMMON
* @{
*/
/** @addtogroup HYBRID_SENSOR HYBRID SENSOR
* @{
*/
/** @addtogroup HYBRID_SENSOR_Public_Types HYBRID SENSOR Public types
* @{
*/
/**
* @brief HYBRID SENSOR driver structure definition
*/
typedef struct
{
int32_t (*Init)(void *);
int32_t (*DeInit)(void *);
int32_t (*ReadID)(void *, uint8_t *);
int32_t (*GetCapabilities)(void *, void *);
} HYBRID_SENSOR_CommonDrv_t;
typedef struct
{
int32_t (*Enable)(void *);
int32_t (*Disable)(void *);
int32_t (*GetOutputDataRate)(void *, float *);
int32_t (*SetOutputDataRate)(void *, float);
int32_t (*GetValue)(void *, float *);
} HYBRID_ENV_SENSOR_FuncDrv_t;
typedef struct
{
int32_t (*Enable)(void *);
int32_t (*Disable)(void *);
int32_t (*GetSensitivity)(void *, float *);
int32_t (*GetOutputDataRate)(void *, float *);
int32_t (*SetOutputDataRate)(void *, float);
int32_t (*GetFullScale)(void *, int32_t *);
int32_t (*SetFullScale)(void *, int32_t);
int32_t (*GetAxes)(void *, void *);
int32_t (*GetAxesRaw)(void *, void *);
} HYBRID_MOTION_SENSOR_FuncDrv_t;
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* HYBRID_SENSOR_H */