1 /*
2  * Copyright (c) 2016, Freescale Semiconductor, Inc.
3  * Copyright 2016-2017 NXP
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 
9 /**
10  * @file virtual_shield.h
11 * @brief The virtual_shield.h file declares mapping of NXP sensor pins
12          to I2C addresses and standard Arduino pin names.
13   Within the NXP KSDK, Arduino pin names are defined as a function of
14   MCU pin names in the <base_board>.h file found in the "board" folder of
15   your project.
16 
17   This file does not map to real world hardware.  You may need to modify it
18   (specifically device addresses) to match your hardware.
19 */
20 
21 #ifndef _VIRTUAL_SHIELD_H_
22 #define _VIRTUAL_SHIELD_H_
23 
24 /* The shield name */
25 #define SHIELD_NAME "VIRTUAL_SENSOR_SHIELD"
26 
27 // FXOS8700 Sensor Information
28 /*
29    In order to route INT1 signal from FXOS8700 to the K64F,
30    Pins 1-2 of Jumper J3 on the FRDM-FXS-MULT2-B should be connected.
31    In order to route INT2 signal from FXOS8700 to the K64F,
32    Pins 1-2 of Jumper J4 on the FRDM-FXS-MULT2-B should be connected.
33 */
34 #define FXOS8700_I2C_ADDR 0x1E
35 #define FXOS8700_INT1 D2
36 #define FXOS8700_INT2 D4
37 
38 // FXAS21002 Sensor Information
39 /*
40    In order to route INT1 signal from FXAS21002 to the K64F,
41    Pins 1-2 of Jumper J6 on the FRDM-FXS-MULT2-B should be connected.
42 */
43 #define FXAS21002_I2C_ADDR 0x20
44 #define FXAS21002_INT1 D5
45 
46 // MAG3110 Sensor Information
47 /*
48    In order to route INT1 signal from MAG3110 to the K64F,
49    Pins 2-3 of Jumper J3 on the FRDM-FXS-MULT2-B should be connected.
50 */
51 #define MAG3110_I2C_ADDR 0x0E
52 #define MAG3110_INT1 D2
53 
54 // MPL3115 Sensor Information
55 /*
56    In order to route INT1 signal from MPL3115 to the K64F,
57    Pins 2-3 of Jumper J5 on the FRDM-FXS-MULT2-B should be connected.
58 */
59 #define MPL3115_I2C_ADDR 0x60
60 #define MPL3115_INT1 D8
61 
62 // MMA8652 Sensor Information
63 /*
64    In order to route INT1 signal from MMA8652 to the K64F,
65    Pins 2-3 of Jumper J4 on the FRDM-FXS-MULT2-B should be connected.
66 */
67 #define MMA8652_I2C_ADDR 0x1D
68 #define MMA8652_INT1 D4
69 
70 // FXLS8471Q Sensor Information
71 /*
72    In order to route INT1 signal from FXLS8471Q to the FRDM-K64F,
73    Pins 2-3 of Jumper J6 on the FRDM-FXS-MULT2-B should be connected.
74 */
75 #define FXLS8471_INT1 D5
76 #define FXLS8471_SPI_CS D10
77 
78 // FXLS8962 Sensor Information
79 #define FXLS8962_I2C_ADDR 0x18
80 #define FXLS8962_CS D10
81 #define FXLS8962_MOSI D11
82 #define FXLS8962_MISO D12
83 #define FXLS8962_SCLK D13
84 #define FXLS8962_INT1 D2
85 #define FXLS8962_INT2 A0
86 // FXLC95000 Sensor Information
87 #define FXLC95000_I2C_ADDR 0x4D // Does not match NXP shield boards
88 #define FXLC95000_CS A2
89 #define FXLC95000_INT1 D2
90 #define FXLC95000_PDB_B D8
91 #define FXLC95000_SSB_IO3 D10
92 #define FXLC95000_RST_GPIO A3
93 
94 // MMA9553 Sensor Information
95 #define MMA9553_I2C_ADDR 0x4C
96 #define MMA9553_SSB_IO3 D10
97 
98 // MMA8491 Sensor Information
99 #define MMA8491_I2C_ADDR 0x55
100 #define MMA8491_EN A1
101 #define MMA8491_XOUT D2
102 #define MMA8491_YOUT D5
103 #define MMA8491_ZOUT D8
104 
105 #define RESET_GPIO A3
106 
107 ///@name Shield Parameters
108 /// Use this section to define the shield board: 3 bit code 0 to 7 inclusive
109 /// transmitted in bits 7-5 for display purposes only.
110 /// Since this is a virtual shield, we use the MULTIB display option as an easy default.
111 ///@{
112 #define SHIELD_MULTIB 0
113 #define SHIELD_NONE 1
114 #define SHIELD_AGM01 2
115 #define SHIELD_AGM02 3
116 #define THIS_SHIELD SHIELD_MULTIB
117 
118 // spare 5 to 7 inclusive
119 ///@}
120 
121 #endif /* _VIRTUAL_SHIELD_H_ */
122