| ICM40609D eMD Driver 2.0.0 Documentation of the eMD Driver API

- Main Page
- Modules
- Classes
- Files

- File List
- File Members

Icm406xxTransport.h
Go to the documentation of this file.
1 /*
2 * ________________________________________________________________________________________________________
3 * Copyright (c) 2015-2015 InvenSense Inc. All rights reserved.
4 *
5 * This software, related documentation and any modifications thereto (collectively “Software”) is subject
6 * to InvenSense and its licensors' intellectual property rights under U.S. and international copyright
7 * and other intellectual property rights laws.
8 *
9 * InvenSense and its licensors retain all intellectual property and proprietary rights in and to the Software
10 * and any use, reproduction, disclosure or distribution of the Software without an express license agreement
11 * from InvenSense is strictly prohibited.
12 *
13 * EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES, THE SOFTWARE IS
14 * PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
15 * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
16 * EXCEPT AS OTHERWISE PROVIDED IN A LICENSE AGREEMENT BETWEEN THE PARTIES, IN NO EVENT SHALL
17 * INVENSENSE BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY
18 * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
19 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
20 * OF THE SOFTWARE.
21 * ________________________________________________________________________________________________________
22 */
23
34 #ifndef _INV_ICM406XX_TRANSPORT_H_
35 #define _INV_ICM406XX_TRANSPORT_H_
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 #include <stdint.h>
42
43 /* forward declaration */
44 struct inv_icm406xx;
45
47 typedef enum {
48 ICM406XX_UI_I2C,
49 ICM406XX_UI_SPI4,
50 ICM406XX_UI_SPI3,
51 ICM406XX_AUX1_SPI3,
52 ICM406XX_AUX2_SPI3
53
54 } ICM406XX_SERIAL_IF_TYPE_t;
55
58 struct inv_icm406xx_serif {
59 void *context;
60 int (*read_reg)(void *context, uint8_t reg, uint8_t *buf, uint32_t len);
61 int (*write_reg)(void *context, uint8_t reg, const uint8_t *buf, uint32_t len);
62 uint32_t max_read;
63 uint32_t max_write;
64 ICM406XX_SERIAL_IF_TYPE_t serif_type;
65 };
66
73 int inv_icm406xx_read_reg(struct inv_icm406xx *s, uint8_t reg, uint32_t len, uint8_t *buf);
74
81 int inv_icm406xx_write_reg(struct inv_icm406xx *s, uint8_t reg, uint32_t len, const uint8_t *buf);
82
83 #ifdef __cplusplus
84 }
85 #endif
86
87 #endif /* _INV_ICM406XX_TRANSPORT_H_ */
88
ICM406XX_SERIAL_IF_TYPE_t
ICM406XX_SERIAL_IF_TYPE_t
enumeration of serial interfaces available on icm406xx
Definition: Icm406xxTransport.h:47
inv_icm406xx_read_reg
int inv_icm406xx_read_reg(struct inv_icm406xx *s, uint8_t reg, uint32_t len, uint8_t *buf)
Reads data from a register on Icm406xx.
Definition: Icm406xxTransport.c:28
inv_icm406xx_write_reg
int inv_icm406xx_write_reg(struct inv_icm406xx *s, uint8_t reg, uint32_t len, const uint8_t *buf)
Writes data to a register on Icm406xx.
Definition: Icm406xxTransport.c:43
inv_icm406xx
Icm406xx driver states definition.
Definition: Icm406xxDriver_HL.h:79
inv_icm406xx_serif
basesensor serial interface
Definition: Icm406xxTransport.h:58