Dependents: DiscoLogger DISCO_L476VG_GlassLCD DISCO_L476VG_MicrophoneRecorder DISCO_L476VG_UART ... more
Drivers/BSP/Components/Common/magneto.h@5:4943b15cce9f, 2019-09-24 (annotated)
- Committer:
- jeromecoutant
- Date:
- Tue Sep 24 18:00:58 2019 +0200
- Revision:
- 5:4943b15cce9f
- Parent:
- 3:4c7d003a8259
Update BSP files with CubeL4 V1.14.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jerome Coutant
1:917af0ca86df
|
1
|
/**
|
|
Jerome Coutant
1:917af0ca86df
|
2
|
******************************************************************************
|
|
Jerome Coutant
1:917af0ca86df
|
3
|
* @file magneto.h
|
|
Jerome Coutant
1:917af0ca86df
|
4
|
* @author MCD Application Team
|
|
Jerome Coutant
1:917af0ca86df
|
5
|
* @brief This header file contains the functions prototypes for the MAGNETO driver.
|
|
Jerome Coutant
1:917af0ca86df
|
6
|
******************************************************************************
|
|
Jerome Coutant
1:917af0ca86df
|
7
|
* @attention
|
|
Jerome Coutant
1:917af0ca86df
|
8
|
*
|
|
jeromecoutant | 5:4943b15cce9f | 9 | * <h2><center>© Copyright (c) 2017 STMicroelectronics. |
jeromecoutant | 5:4943b15cce9f | 10 | * All rights reserved.</center></h2> |
Jerome Coutant
1:917af0ca86df
|
11
|
*
|
|
jeromecoutant | 5:4943b15cce9f | 12 | * This software component is licensed by ST under BSD 3-Clause license, |
jeromecoutant | 5:4943b15cce9f | 13 | * the "License"; You may not use this file except in compliance with the |
jeromecoutant | 5:4943b15cce9f | 14 | * License. You may obtain a copy of the License at: |
jeromecoutant | 5:4943b15cce9f | 15 | * opensource.org/licenses/BSD-3-Clause |
Jerome Coutant
1:917af0ca86df
|
16
|
*
|
|
Jerome Coutant
1:917af0ca86df
|
17
|
******************************************************************************
|
|
Jerome Coutant
1:917af0ca86df
|
18
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
19
|
|
|
Jerome Coutant
1:917af0ca86df
|
20
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
Jerome Coutant
1:917af0ca86df
|
21
|
#ifndef __MAGNETO_H
|
|
Jerome Coutant
1:917af0ca86df
|
22
|
#define __MAGNETO_H
|
|
Jerome Coutant
1:917af0ca86df
|
23
|
|
|
Jerome Coutant
1:917af0ca86df
|
24
|
#ifdef __cplusplus
|
|
Jerome Coutant
1:917af0ca86df
|
25
|
extern "C" {
|
|
Jerome Coutant
1:917af0ca86df
|
26
|
#endif
|
|
Jerome Coutant
1:917af0ca86df
|
27
|
|
|
Jerome Coutant
1:917af0ca86df
|
28
|
/* Includes ------------------------------------------------------------------*/
|
|
Jerome Coutant
1:917af0ca86df
|
29
|
#include <stdint.h>
|
|
Jerome Coutant
1:917af0ca86df
|
30
|
|
|
Jerome Coutant
1:917af0ca86df
|
31
|
/** @addtogroup BSP
|
|
Jerome Coutant
1:917af0ca86df
|
32
|
* @{
|
|
Jerome Coutant
1:917af0ca86df
|
33
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
34
|
|
|
Jerome Coutant
1:917af0ca86df
|
35
|
/** @addtogroup Components
|
|
Jerome Coutant
1:917af0ca86df
|
36
|
* @{
|
|
Jerome Coutant
1:917af0ca86df
|
37
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
38
|
|
|
Jerome Coutant
1:917af0ca86df
|
39
|
/** @addtogroup MAGNETO
|
|
Jerome Coutant
1:917af0ca86df
|
40
|
* @{
|
|
Jerome Coutant
1:917af0ca86df
|
41
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
42
|
|
|
Jerome Coutant
1:917af0ca86df
|
43
|
/** @defgroup MAGNETO_Exported_Types
|
|
Jerome Coutant
1:917af0ca86df
|
44
|
* @{
|
|
Jerome Coutant
1:917af0ca86df
|
45
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
46
|
|
|
Jerome Coutant
1:917af0ca86df
|
47
|
/** @defgroup MAGNETO_Config_structure Magnetometer Configuration structure
|
|
Jerome Coutant
1:917af0ca86df
|
48
|
* @{
|
|
Jerome Coutant
1:917af0ca86df
|
49
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
50
|
typedef struct
|
|
Jerome Coutant
1:917af0ca86df
|
51
|
{
|
|
Jerome Coutant
1:917af0ca86df
|
52
|
uint8_t Register1;
|
|
Jerome Coutant
1:917af0ca86df
|
53
|
uint8_t Register2;
|
|
Jerome Coutant
1:917af0ca86df
|
54
|
uint8_t Register3;
|
|
Jerome Coutant
1:917af0ca86df
|
55
|
uint8_t Register4;
|
|
Jerome Coutant
1:917af0ca86df
|
56
|
uint8_t Register5;
|
|
Jerome Coutant
1:917af0ca86df
|
57
|
}MAGNETO_InitTypeDef;
|
|
Jerome Coutant
1:917af0ca86df
|
58
|
/**
|
|
Jerome Coutant
1:917af0ca86df
|
59
|
* @}
|
|
Jerome Coutant
1:917af0ca86df
|
60
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
61
|
|
|
Jerome Coutant
1:917af0ca86df
|
62
|
/** @defgroup MAGNETO_Driver_structure Magnetometer Driver structure
|
|
Jerome Coutant
1:917af0ca86df
|
63
|
* @{
|
|
Jerome Coutant
1:917af0ca86df
|
64
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
65
|
typedef struct
|
|
Jerome Coutant
1:917af0ca86df
|
66
|
{
|
|
Jerome Coutant
1:917af0ca86df
|
67
|
void (*Init)(MAGNETO_InitTypeDef);
|
|
Jerome Coutant
1:917af0ca86df
|
68
|
void (*DeInit)(void);
|
|
Jerome Coutant
1:917af0ca86df
|
69
|
uint8_t (*ReadID)(void);
|
|
Jerome Coutant
1:917af0ca86df
|
70
|
void (*Reset)(void);
|
|
Jerome Coutant
1:917af0ca86df
|
71
|
void (*LowPower)(uint16_t);
|
|
Jerome Coutant
1:917af0ca86df
|
72
|
void (*ConfigIT)(void);
|
|
Jerome Coutant
1:917af0ca86df
|
73
|
void (*EnableIT)(uint8_t);
|
|
Jerome Coutant
1:917af0ca86df
|
74
|
void (*DisableIT)(uint8_t);
|
|
Jerome Coutant
1:917af0ca86df
|
75
|
uint8_t (*ITStatus)(uint16_t);
|
|
Jerome Coutant
1:917af0ca86df
|
76
|
void (*ClearIT)(void);
|
|
Jerome Coutant
1:917af0ca86df
|
77
|
void (*FilterConfig)(uint8_t);
|
|
Jerome Coutant
1:917af0ca86df
|
78
|
void (*FilterCmd)(uint8_t);
|
|
Jerome Coutant
1:917af0ca86df
|
79
|
void (*GetXYZ)(int16_t *);
|
|
Jerome Coutant
1:917af0ca86df
|
80
|
}MAGNETO_DrvTypeDef;
|
|
Jerome Coutant
1:917af0ca86df
|
81
|
/**
|
|
Jerome Coutant
1:917af0ca86df
|
82
|
* @}
|
|
Jerome Coutant
1:917af0ca86df
|
83
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
84
|
|
|
Jerome Coutant
1:917af0ca86df
|
85
|
/**
|
|
Jerome Coutant
1:917af0ca86df
|
86
|
* @}
|
|
Jerome Coutant
1:917af0ca86df
|
87
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
88
|
|
|
Jerome Coutant
1:917af0ca86df
|
89
|
/**
|
|
Jerome Coutant
1:917af0ca86df
|
90
|
* @}
|
|
Jerome Coutant
1:917af0ca86df
|
91
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
92
|
|
|
Jerome Coutant
1:917af0ca86df
|
93
|
/**
|
|
Jerome Coutant
1:917af0ca86df
|
94
|
* @}
|
|
Jerome Coutant
1:917af0ca86df
|
95
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
96
|
|
|
Jerome Coutant
1:917af0ca86df
|
97
|
/**
|
|
Jerome Coutant
1:917af0ca86df
|
98
|
* @}
|
|
Jerome Coutant
1:917af0ca86df
|
99
|
*/
|
|
Jerome Coutant
1:917af0ca86df
|
100
|
|
|
Jerome Coutant
1:917af0ca86df
|
101
|
#ifdef __cplusplus
|
|
Jerome Coutant
1:917af0ca86df
|
102
|
}
|
|
Jerome Coutant
1:917af0ca86df
|
103
|
#endif
|
|
Jerome Coutant
1:917af0ca86df
|
104
|
|
|
Jerome Coutant
1:917af0ca86df
|
105
|
#endif /* __MAGNETO_H */
|
|
Jerome Coutant
1:917af0ca86df
|
106
|
|
|
Jerome Coutant
1:917af0ca86df
|
107
|
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|