ISSDK  1.8
IoT Sensing Software Development Kit
mekmimx8qm.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018 NXP
3  * All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 /**
9  * @file mekmimx8qm.h
10  * @brief The mekmimx8qm.h file defines GPIO pin mappings and on-board sensors information for mekmimx8qm board
11 */
12 
13 #ifndef MEKMIMX8QM_H_
14 #define MEKMIMX8QM_H_
15 
16 #include "pin_mux.h"
17 #include "RTE_Device.h"
18 #include "gpio_driver.h"
19 #include "main/imx8qm_pads.h"
20 #include "svc/pad/pad_api.h"
21 
22 /* I2C_BB: Pin mapping and driver information for I2C0 routed on base board */
23 #define I2C_BB_SCL_PIN SC_P_HDMI_TX0_TS_SCL
24 #define I2C_BB_SDA_PIN SC_P_HDMI_TX0_TS_SDA
25 #define I2C_BB_DRIVER Driver_I2C2
26 #define I2C_BB_DEVICE_INDEX I2C2_INDEX
27 #define I2C_BB_SIGNAL_EVENT I2C2_SignalEvent_t
28 
29 /* UART: Driver information for default UART to communicate with HOST PC. */
30 #define HOST_S_DRIVER Driver_USART0
31 #define HOST_S_SIGNAL_EVENT HOST_SignalEvent_t
32 
33 /* On-Board FXOS8700 Sensor Information */
34 #define FXOS8700_BB_I2C_ADDR 0x1E
35 //#define FXOS8700_BB_INT1 PRS_INT1
36 //#define FXOS8700_BB_INT2 PRS_INT2
37 
38 /* On-Board FXAS21002 Sensor Information */
39 #define FXAS21002_BB_I2C_ADDR 0x20
40 //#define FXAS21002_BB_INT1 GY_INT1
41 //#define FXAS21002_BB_INT2 GY_INT2
42 
43 /* On-Board MPL3115 Sensor Information */
44 #define MPL3115_BB_I2C_ADDR 0x60
45 //#define MPL3115_BB_INT1 PSA_INT1
46 //#define MPL3115_BB_INT2 PSA_INT2
47 
48 /* @brief Ask use input to resume after specified samples have been processed. */
49 #define ASK_USER_TO_RESUME(x) \
50  static volatile bool askResume = true; \
51  static uint16_t samplesToProcess = x - 1; \
52  if (askResume && !samplesToProcess--) \
53  { \
54  PRINTF("\r\n Specified samples processed, press any key to continue... \r\n"); \
55  GETCHAR(); \
56  askResume = false; \
57  }
58 
59 /* Compatability mapping for mek-mimx8qm i2c/spi definitions */
60 #define I2C2 LPI2C2
61 #define I2C_Type LPI2C_Type
62 #define I2C_BASE_PTRS LPI2C_BASE_PTRS
63 #define SPI1 LPSPI1
64 #define SPI_Type LPSPI_Type
65 #define SPI_BASE_PTRS LPSPI_BASE_PTRS
66 
67 /* On-Board Sensor I2C address mapping for generic sensor examples */
68 #define FXAS21002_I2C_ADDR FXAS21002_BB_I2C_ADDR
69 #define FXOS8700_I2C_ADDR FXOS8700_BB_I2C_ADDR
70 #define MPL3115_I2C_ADDR MPL3115_BB_I2C_ADDR
71 
72 /* @brief dummy arguement to Power Mode Wait Wrapper. */
73 #define SMC NULL
74 
75 /* @brief Kinetis style Wrapper API for Power Mode Wait (Wait for Interrupt). */
76 status_t SMC_SetPowerModeWait(void *);
77 /* @brief Kinetis style Wrapper API for Power Mode VLPR (Wait for Interrupt). */
78 status_t SMC_SetPowerModeVlpr(void *);
79 
80 #endif /* MEKMIMX8QM_H_ */
status_t SMC_SetPowerModeWait(void *)
Configures the system to WAIT power mode. API name used from Kinetis family to maintain compatibility...
Definition: lpc54114.c:155
status_t SMC_SetPowerModeVlpr(void *)
Configures the system to VLPR power mode. API name used from Kinetis family to maintain compatibility...
Definition: lpc54114.c:169