fsl_lpi2c.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015, Freescale Semiconductor, Inc.
3  * Copyright 2016-2020 NXP
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  */
8 #ifndef _FSL_LPI2C_H_
9 #define _FSL_LPI2C_H_
10 
11 #include <stddef.h>
12 #include "fsl_device_registers.h"
13 #include "fsl_common.h"
14 
15 /*******************************************************************************
16  * Definitions
17  ******************************************************************************/
18 
27 #define FSL_LPI2C_DRIVER_VERSION (MAKE_VERSION(2, 1, 11))
28 
31 #ifndef I2C_RETRY_TIMES
32 #define I2C_RETRY_TIMES 0U /* Define to zero means keep waiting until the flag is assert/deassert. */
33 #endif
34 
36 enum
37 {
50 };
51 
76 enum
77 {
89 };
90 
92 typedef enum _lpi2c_direction
93 {
94  kLPI2C_Write = 0U,
97 
100 {
106  0x4U,
108  0x5U,
110  0x6U,
113 
116 {
120 
123 {
127 
137 typedef struct _lpi2c_master_config
138 {
140  bool enableDoze;
141  bool debugEnable;
142  bool ignoreAck;
144  uint32_t baudRate_Hz;
145  uint32_t busIdleTimeout_ns;
146  uint32_t pinLowTimeout_ns;
149  struct
150  {
151  bool enable;
154  } hostRequest;
156 
159 {
164  0x4U,
166  0x5U,
168  0x6U,
170  0x7U
172 
174 typedef struct _lpi2c_match_config
175 {
178  uint32_t match0;
179  uint32_t match1;
181 
182 /* Forward declaration of the transfer descriptor and handle typedefs. */
185 
197  lpi2c_master_handle_t *handle,
198  status_t completionStatus,
199  void *userData);
200 
208 {
213 };
214 
221 {
222  uint32_t flags;
224  uint16_t slaveAddress;
226  uint32_t subaddress;
227  size_t subaddressSize;
228  void *data;
229  size_t dataSize;
230 };
231 
237 {
238  uint8_t state;
239  uint16_t remainingBytes;
240  uint8_t *buf;
241  uint16_t commandBuffer[7];
244  void *userData;
245 };
246 
269 {
283 };
284 
287 {
292 
302 typedef struct _lpi2c_slave_config
303 {
304  bool enableSlave;
305  uint8_t address0;
306  uint8_t address1;
311  struct
312  {
313  bool enableAck;
319  bool enableTx;
321  bool enableRx;
324  } sclStall;
325  bool ignoreAck;
329  uint32_t dataValidDelay_ns;
330  uint32_t clockHoldTime_ns;
332 
344 {
358 
360 typedef struct _lpi2c_slave_transfer
361 {
363  uint8_t receivedAddress;
364  uint8_t *data;
365  size_t dataSize;
370 
371 /* Forward declaration. */
373 
385 
391 {
393  bool isBusy;
394  bool wasTransmit;
395  uint32_t eventMask;
396  uint32_t transferredCount;
398  void *userData;
399 };
400 
403 /*******************************************************************************
404  * API
405  ******************************************************************************/
406 
407 #if defined(__cplusplus)
408 extern "C" {
409 #endif
410 
418 
444 
458 void LPI2C_MasterInit(LPI2C_Type *base, const lpi2c_master_config_t *masterConfig, uint32_t sourceClock_Hz);
459 
468 void LPI2C_MasterDeinit(LPI2C_Type *base);
469 
477 
478 /* Not static so it can be used from fsl_lpi2c_edma.c. */
479 status_t LPI2C_MasterCheckAndClearError(LPI2C_Type *base, uint32_t status);
480 
481 /* Not static so it can be used from fsl_lpi2c_edma.c. */
483 
491 static inline void LPI2C_MasterReset(LPI2C_Type *base)
492 {
493  base->MCR = LPI2C_MCR_RST_MASK;
494  base->MCR = 0;
495 }
496 
503 static inline void LPI2C_MasterEnable(LPI2C_Type *base, bool enable)
504 {
505  base->MCR = (base->MCR & ~LPI2C_MCR_MEN_MASK) | LPI2C_MCR_MEN(enable);
506 }
507 
512 
525 static inline uint32_t LPI2C_MasterGetStatusFlags(LPI2C_Type *base)
526 {
527  return base->MSR;
528 }
529 
550 static inline void LPI2C_MasterClearStatusFlags(LPI2C_Type *base, uint32_t statusMask)
551 {
552  base->MSR = statusMask;
553 }
554 
559 
570 static inline void LPI2C_MasterEnableInterrupts(LPI2C_Type *base, uint32_t interruptMask)
571 {
572  base->MIER |= interruptMask;
573 }
574 
585 static inline void LPI2C_MasterDisableInterrupts(LPI2C_Type *base, uint32_t interruptMask)
586 {
587  base->MIER &= ~interruptMask;
588 }
589 
597 static inline uint32_t LPI2C_MasterGetEnabledInterrupts(LPI2C_Type *base)
598 {
599  return base->MIER;
600 }
601 
606 
614 static inline void LPI2C_MasterEnableDMA(LPI2C_Type *base, bool enableTx, bool enableRx)
615 {
616  base->MDER = LPI2C_MDER_TDDE(enableTx) | LPI2C_MDER_RDDE(enableRx);
617 }
618 
625 static inline uint32_t LPI2C_MasterGetTxFifoAddress(LPI2C_Type *base)
626 {
627  return (uint32_t)&base->MTDR;
628 }
629 
636 static inline uint32_t LPI2C_MasterGetRxFifoAddress(LPI2C_Type *base)
637 {
638  return (uint32_t)&base->MRDR;
639 }
640 
645 
657 static inline void LPI2C_MasterSetWatermarks(LPI2C_Type *base, size_t txWords, size_t rxWords)
658 {
659  base->MFCR = LPI2C_MFCR_TXWATER(txWords) | LPI2C_MFCR_RXWATER(rxWords);
660 }
661 
671 static inline void LPI2C_MasterGetFifoCounts(LPI2C_Type *base, size_t *rxCount, size_t *txCount)
672 {
673  if (NULL != txCount)
674  {
675  *txCount = (base->MFSR & LPI2C_MFSR_TXCOUNT_MASK) >> LPI2C_MFSR_TXCOUNT_SHIFT;
676  }
677  if (NULL != rxCount)
678  {
679  *rxCount = (base->MFSR & LPI2C_MFSR_RXCOUNT_MASK) >> LPI2C_MFSR_RXCOUNT_SHIFT;
680  }
681 }
682 
687 
702 void LPI2C_MasterSetBaudRate(LPI2C_Type *base, uint32_t sourceClock_Hz, uint32_t baudRate_Hz);
703 
713 static inline bool LPI2C_MasterGetBusIdleState(LPI2C_Type *base)
714 {
715  return ((base->MSR & LPI2C_MSR_BBF_MASK) >> LPI2C_MSR_BBF_SHIFT) == 1U ? true : false;
716 }
717 
733 status_t LPI2C_MasterStart(LPI2C_Type *base, uint8_t address, lpi2c_direction_t dir);
734 
751 static inline status_t LPI2C_MasterRepeatedStart(LPI2C_Type *base, uint8_t address, lpi2c_direction_t dir)
752 {
753  return LPI2C_MasterStart(base, address, dir);
754 }
755 
773 status_t LPI2C_MasterSend(LPI2C_Type *base, void *txBuff, size_t txSize);
774 
788 status_t LPI2C_MasterReceive(LPI2C_Type *base, void *rxBuff, size_t rxSize);
789 
804 
821 
826 
845  lpi2c_master_handle_t *handle,
847  void *userData);
848 
860  lpi2c_master_handle_t *handle,
861  lpi2c_master_transfer_t *transfer);
862 
872 
885 
890 
899 
911 
944 
957 void LPI2C_SlaveInit(LPI2C_Type *base, const lpi2c_slave_config_t *slaveConfig, uint32_t sourceClock_Hz);
958 
967 void LPI2C_SlaveDeinit(LPI2C_Type *base);
968 
974 static inline void LPI2C_SlaveReset(LPI2C_Type *base)
975 {
976  base->SCR = LPI2C_SCR_RST_MASK;
977  base->SCR = 0;
978 }
979 
986 static inline void LPI2C_SlaveEnable(LPI2C_Type *base, bool enable)
987 {
988  base->SCR = (base->SCR & ~LPI2C_SCR_SEN_MASK) | LPI2C_SCR_SEN(enable);
989 }
990 
995 
1008 static inline uint32_t LPI2C_SlaveGetStatusFlags(LPI2C_Type *base)
1009 {
1010  return base->SSR;
1011 }
1012 
1030 static inline void LPI2C_SlaveClearStatusFlags(LPI2C_Type *base, uint32_t statusMask)
1031 {
1032  base->SSR = statusMask;
1033 }
1034 
1039 
1050 static inline void LPI2C_SlaveEnableInterrupts(LPI2C_Type *base, uint32_t interruptMask)
1051 {
1052  base->SIER |= interruptMask;
1053 }
1054 
1065 static inline void LPI2C_SlaveDisableInterrupts(LPI2C_Type *base, uint32_t interruptMask)
1066 {
1067  base->SIER &= ~interruptMask;
1068 }
1069 
1076 static inline uint32_t LPI2C_SlaveGetEnabledInterrupts(LPI2C_Type *base)
1077 {
1078  return base->SIER;
1079 }
1080 
1085 
1095 static inline void LPI2C_SlaveEnableDMA(LPI2C_Type *base, bool enableAddressValid, bool enableRx, bool enableTx)
1096 {
1098  LPI2C_SDER_AVDE(enableAddressValid) | LPI2C_SDER_RDDE(enableRx) | LPI2C_SDER_TDDE(enableTx);
1099 }
1100 
1105 
1115 static inline bool LPI2C_SlaveGetBusIdleState(LPI2C_Type *base)
1116 {
1117  return ((base->SSR & LPI2C_SSR_BBF_MASK) >> LPI2C_SSR_BBF_SHIFT) == 1U ? true : false;
1118 }
1119 
1130 static inline void LPI2C_SlaveTransmitAck(LPI2C_Type *base, bool ackOrNack)
1131 {
1132  base->STAR = LPI2C_STAR_TXNACK(!ackOrNack);
1133 }
1134 
1144 static inline uint32_t LPI2C_SlaveGetReceivedAddress(LPI2C_Type *base)
1145 {
1146  return base->SASR & LPI2C_SASR_RADDR_MASK;
1147 }
1148 
1158 status_t LPI2C_SlaveSend(LPI2C_Type *base, void *txBuff, size_t txSize, size_t *actualTxSize);
1159 
1169 status_t LPI2C_SlaveReceive(LPI2C_Type *base, void *rxBuff, size_t rxSize, size_t *actualRxSize);
1170 
1175 
1193  lpi2c_slave_handle_t *handle,
1195  void *userData);
1196 
1221 status_t LPI2C_SlaveTransferNonBlocking(LPI2C_Type *base, lpi2c_slave_handle_t *handle, uint32_t eventMask);
1222 
1233 
1243 
1248 
1257 
1262 #if defined(__cplusplus)
1263 }
1264 #endif
1265 
1266 #endif /* _FSL_LPI2C_H_ */
_lpi2c_master_handle::remainingBytes
uint16_t remainingBytes
Definition: fsl_lpi2c.h:239
_lpi2c_master_transfer_flags
_lpi2c_master_transfer_flags
Transfer option flags.
Definition: fsl_lpi2c.h:207
fsl_common.h
LPI2C_SlaveGetStatusFlags
static uint32_t LPI2C_SlaveGetStatusFlags(LPI2C_Type *base)
Gets the LPI2C slave status flags.
Definition: fsl_lpi2c.h:1008
kLPI2C_2PinOpenDrainWithSeparateSlave
@ kLPI2C_2PinOpenDrainWithSeparateSlave
Definition: fsl_lpi2c.h:105
lpi2c_master_config_t
struct _lpi2c_master_config lpi2c_master_config_t
Structure with settings to initialize the LPI2C master module.
_lpi2c_master_config::hostRequest
struct _lpi2c_master_config::@353 hostRequest
LPI2C_MCR_RST_MASK
#define LPI2C_MCR_RST_MASK
Definition: MIMXRT1052.h:25190
_lpi2c_data_match_config_mode
_lpi2c_data_match_config_mode
LPI2C master data match configuration modes.
Definition: fsl_lpi2c.h:158
LPI2C_MasterGetDefaultConfig
void LPI2C_MasterGetDefaultConfig(lpi2c_master_config_t *masterConfig)
Provides a default configuration for the LPI2C master peripheral.
Definition: fsl_lpi2c.c:356
LPI2C_MSR_PLTF_MASK
#define LPI2C_MSR_PLTF_MASK
Definition: MIMXRT1052.h:25278
_lpi2c_slave_config::enableSlave
bool enableSlave
Definition: fsl_lpi2c.h:304
_lpi2c_master_transfer::data
void * data
Definition: fsl_lpi2c.h:228
lpi2c_host_request_source_t
enum _lpi2c_host_request_source lpi2c_host_request_source_t
LPI2C master host request selection.
kLPI2C_SlaveFifoErrFlag
@ kLPI2C_SlaveFifoErrFlag
Definition: fsl_lpi2c.h:277
_lpi2c_slave_handle::transfer
lpi2c_slave_transfer_t transfer
Definition: fsl_lpi2c.h:392
LPI2C_SSR_BBF_MASK
#define LPI2C_SSR_BBF_MASK
Definition: MIMXRT1052.h:25791
_lpi2c_master_config::pinLowTimeout_ns
uint32_t pinLowTimeout_ns
Definition: fsl_lpi2c.h:146
LPI2C_Type::MCR
__IO uint32_t MCR
Definition: MIMXRT1052.h:25098
lpi2c_direction_t
enum _lpi2c_direction lpi2c_direction_t
Direction of master and slave transfers.
_lpi2c_master_config::baudRate_Hz
uint32_t baudRate_Hz
Definition: fsl_lpi2c.h:144
LPI2C_SlaveDeinit
void LPI2C_SlaveDeinit(LPI2C_Type *base)
Deinitializes the LPI2C slave peripheral.
Definition: fsl_lpi2c.c:1582
_lpi2c_master_config::pinConfig
lpi2c_master_pin_config_t pinConfig
Definition: fsl_lpi2c.h:143
_lpi2c_master_transfer::subaddress
uint32_t subaddress
Definition: fsl_lpi2c.h:226
_lpi2c_slave_config::addressMatchMode
lpi2c_slave_address_match_t addressMatchMode
Definition: fsl_lpi2c.h:307
NULL
#define NULL
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c:92
kLPI2C_2PinOpenDrain
@ kLPI2C_2PinOpenDrain
Definition: fsl_lpi2c.h:101
LPI2C_SlaveReset
static void LPI2C_SlaveReset(LPI2C_Type *base)
Performs a software reset of the LPI2C slave peripheral.
Definition: fsl_lpi2c.h:974
_lpi2c_slave_config::@354::enableRx
bool enableRx
Definition: fsl_lpi2c.h:321
kLPI2C_1stWordEqualsM0And2ndWordEqualsM1
@ kLPI2C_1stWordEqualsM0And2ndWordEqualsM1
Definition: fsl_lpi2c.h:163
_lpi2c_slave_transfer::receivedAddress
uint8_t receivedAddress
Definition: fsl_lpi2c.h:363
LPI2C_SlaveGetBusIdleState
static bool LPI2C_SlaveGetBusIdleState(LPI2C_Type *base)
Returns whether the bus is idle.
Definition: fsl_lpi2c.h:1115
_lpi2c_slave_config::filterDozeEnable
bool filterDozeEnable
Definition: fsl_lpi2c.h:308
LPI2C_Type::MSR
__IO uint32_t MSR
Definition: MIMXRT1052.h:25099
kLPI2C_SlaveAddressMatch1Flag
@ kLPI2C_SlaveAddressMatch1Flag
Definition: fsl_lpi2c.h:279
lpi2c_slave_transfer_callback_t
void(* lpi2c_slave_transfer_callback_t)(LPI2C_Type *base, lpi2c_slave_transfer_t *transfer, void *userData)
Slave event callback function pointer type.
Definition: fsl_lpi2c.h:384
LPI2C_MasterEnableInterrupts
static void LPI2C_MasterEnableInterrupts(LPI2C_Type *base, uint32_t interruptMask)
Enables the LPI2C master interrupt requests.
Definition: fsl_lpi2c.h:570
lpi2c_slave_config_t
struct _lpi2c_slave_config lpi2c_slave_config_t
Structure with settings to initialize the LPI2C slave module.
_lpi2c_slave_handle::wasTransmit
bool wasTransmit
Definition: fsl_lpi2c.h:394
kLPI2C_SlaveTransmitAckEvent
@ kLPI2C_SlaveTransmitAckEvent
Definition: fsl_lpi2c.h:350
kLPI2C_MasterArbitrationLostFlag
@ kLPI2C_MasterArbitrationLostFlag
Definition: fsl_lpi2c.h:83
LPI2C_SlaveTransferHandleIRQ
void LPI2C_SlaveTransferHandleIRQ(LPI2C_Type *base, lpi2c_slave_handle_t *handle)
Reusable routine to handle slave interrupts.
Definition: fsl_lpi2c.c:1985
kLPI2C_SlaveStopDetectFlag
@ kLPI2C_SlaveStopDetectFlag
Definition: fsl_lpi2c.h:275
kLPI2C_4PinPushPull
@ kLPI2C_4PinPushPull
Definition: fsl_lpi2c.h:104
LPI2C_Type::SASR
__I uint32_t SASR
Definition: MIMXRT1052.h:25129
LPI2C_MasterStart
status_t LPI2C_MasterStart(LPI2C_Type *base, uint8_t address, lpi2c_direction_t dir)
Sends a START signal and slave address on the I2C bus.
Definition: fsl_lpi2c.c:634
LPI2C_SSR_AM0F_MASK
#define LPI2C_SSR_AM0F_MASK
Definition: MIMXRT1052.h:25756
kLPI2C_SlaveAddressMatch0Flag
@ kLPI2C_SlaveAddressMatch0Flag
Definition: fsl_lpi2c.h:278
LPI2C_MasterReceive
status_t LPI2C_MasterReceive(LPI2C_Type *base, void *rxBuff, size_t rxSize)
Performs a polling receive transfer on the I2C bus.
Definition: fsl_lpi2c.c:736
_lpi2c_host_request_polarity
_lpi2c_host_request_polarity
LPI2C master host request pin polarity configuration.
Definition: fsl_lpi2c.h:122
LPI2C_MasterDeinit
void LPI2C_MasterDeinit(LPI2C_Type *base)
Deinitializes the LPI2C master peripheral.
Definition: fsl_lpi2c.c:477
kLPI2C_1stWordEqualsM0OrM1
@ kLPI2C_1stWordEqualsM0OrM1
Definition: fsl_lpi2c.h:161
LPI2C_MFCR_TXWATER
#define LPI2C_MFCR_TXWATER(x)
Definition: MIMXRT1052.h:25592
LPI2C_CheckForBusyBus
status_t LPI2C_CheckForBusyBus(LPI2C_Type *base)
Make sure the bus isn't already busy.
Definition: fsl_lpi2c.c:319
_lpi2c_match_config::matchMode
lpi2c_data_match_config_mode_t matchMode
Definition: fsl_lpi2c.h:176
LPI2C_MSR_BBF_SHIFT
#define LPI2C_MSR_BBF_SHIFT
Definition: MIMXRT1052.h:25300
lpi2c_master_pin_config_t
enum _lpi2c_master_pin_config lpi2c_master_pin_config_t
LPI2C pin configuration.
LPI2C_MasterTransferCreateHandle
void LPI2C_MasterTransferCreateHandle(LPI2C_Type *base, lpi2c_master_handle_t *handle, lpi2c_master_transfer_callback_t callback, void *userData)
Creates a new handle for the LPI2C master non-blocking APIs.
Definition: fsl_lpi2c.c:965
LPI2C_STAR_TXNACK
#define LPI2C_STAR_TXNACK(x)
Definition: MIMXRT1052.h:26064
_lpi2c_master_transfer::slaveAddress
uint16_t slaveAddress
Definition: fsl_lpi2c.h:224
LPI2C_SDER_RDDE_MASK
#define LPI2C_SDER_RDDE_MASK
Definition: MIMXRT1052.h:25897
_lpi2c_master_config::sclGlitchFilterWidth_ns
uint8_t sclGlitchFilterWidth_ns
Definition: fsl_lpi2c.h:148
LPI2C_MSR_EPF_MASK
#define LPI2C_MSR_EPF_MASK
Definition: MIMXRT1052.h:25243
kLPI2C_SlaveRepeatedStartDetectFlag
@ kLPI2C_SlaveRepeatedStartDetectFlag
Definition: fsl_lpi2c.h:274
kLPI2C_SlaveRepeatedStartEvent
@ kLPI2C_SlaveRepeatedStartEvent
Definition: fsl_lpi2c.h:351
LPI2C_Type::MDER
__IO uint32_t MDER
Definition: MIMXRT1052.h:25101
LPI2C_SlaveTransmitAck
static void LPI2C_SlaveTransmitAck(LPI2C_Type *base, bool ackOrNack)
Transmits either an ACK or NAK on the I2C bus in response to a byte from the master.
Definition: fsl_lpi2c.h:1130
kLPI2C_MasterPinLowTimeoutFlag
@ kLPI2C_MasterPinLowTimeoutFlag
Definition: fsl_lpi2c.h:85
kStatus_LPI2C_FifoError
@ kStatus_LPI2C_FifoError
Definition: fsl_lpi2c.h:41
LPI2C_SSR_AM1F_MASK
#define LPI2C_SSR_AM1F_MASK
Definition: MIMXRT1052.h:25763
LPI2C_MDER_RDDE
#define LPI2C_MDER_RDDE(x)
Definition: MIMXRT1052.h:25390
LPI2C_MFCR_RXWATER
#define LPI2C_MFCR_RXWATER(x)
Definition: MIMXRT1052.h:25597
LPI2C_SlaveGetDefaultConfig
void LPI2C_SlaveGetDefaultConfig(lpi2c_slave_config_t *slaveConfig)
Provides a default configuration for the LPI2C slave peripheral.
Definition: fsl_lpi2c.c:1490
kLPI2C_AnyWordEqualsM0OrM1
@ kLPI2C_AnyWordEqualsM0OrM1
Definition: fsl_lpi2c.h:162
lpi2c_slave_transfer_event_t
enum _lpi2c_slave_transfer_event lpi2c_slave_transfer_event_t
Set of events sent to the callback for non blocking slave transfers.
LPI2C_Type::MTDR
__O uint32_t MTDR
Definition: MIMXRT1052.h:25115
_lpi2c_slave_config::dataValidDelay_ns
uint32_t dataValidDelay_ns
Definition: fsl_lpi2c.h:329
_lpi2c_master_config::sdaGlitchFilterWidth_ns
uint8_t sdaGlitchFilterWidth_ns
Definition: fsl_lpi2c.h:147
LPI2C_MasterSetBaudRate
void LPI2C_MasterSetBaudRate(LPI2C_Type *base, uint32_t sourceClock_Hz, uint32_t baudRate_Hz)
Sets the I2C bus frequency for master transactions.
Definition: fsl_lpi2c.c:533
_lpi2c_master_config
Structure with settings to initialize the LPI2C master module.
Definition: fsl_lpi2c.h:137
kLPI2C_MasterFifoErrFlag
@ kLPI2C_MasterFifoErrFlag
Definition: fsl_lpi2c.h:84
kLPI2C_MasterNackDetectFlag
@ kLPI2C_MasterNackDetectFlag
Definition: fsl_lpi2c.h:82
kLPI2C_MasterDataMatchFlag
@ kLPI2C_MasterDataMatchFlag
Definition: fsl_lpi2c.h:86
kLPI2C_SlaveRxReadyFlag
@ kLPI2C_SlaveRxReadyFlag
Definition: fsl_lpi2c.h:271
kLPI2C_SlaveTransmitAckFlag
@ kLPI2C_SlaveTransmitAckFlag
Definition: fsl_lpi2c.h:273
_lpi2c_master_handle::transfer
lpi2c_master_transfer_t transfer
Definition: fsl_lpi2c.h:242
LPI2C_SSR_BBF_SHIFT
#define LPI2C_SSR_BBF_SHIFT
Definition: MIMXRT1052.h:25792
kLPI2C_TransferRepeatedStartFlag
@ kLPI2C_TransferRepeatedStartFlag
Definition: fsl_lpi2c.h:211
kStatus_LPI2C_Timeout
@ kStatus_LPI2C_Timeout
Definition: fsl_lpi2c.h:49
_lpi2c_master_handle::buf
uint8_t * buf
Definition: fsl_lpi2c.h:240
kStatus_LPI2C_ArbitrationLost
@ kStatus_LPI2C_ArbitrationLost
Definition: fsl_lpi2c.h:43
LPI2C_MSR_NDF_MASK
#define LPI2C_MSR_NDF_MASK
Definition: MIMXRT1052.h:25257
LPI2C_SlaveEnable
static void LPI2C_SlaveEnable(LPI2C_Type *base, bool enable)
Enables or disables the LPI2C module as slave.
Definition: fsl_lpi2c.h:986
kLPI2C_MasterBusBusyFlag
@ kLPI2C_MasterBusBusyFlag
Definition: fsl_lpi2c.h:88
_lpi2c_slave_config::address1
uint8_t address1
Definition: fsl_lpi2c.h:306
_lpi2c_master_handle
Driver handle for master non-blocking APIs.
Definition: fsl_lpi2c.h:236
LPI2C_SSR_TDF_MASK
#define LPI2C_SSR_TDF_MASK
Definition: MIMXRT1052.h:25700
_lpi2c_slave_config::enableGeneralCall
bool enableGeneralCall
Definition: fsl_lpi2c.h:310
LPI2C_MasterCheckAndClearError
status_t LPI2C_MasterCheckAndClearError(LPI2C_Type *base, uint32_t status)
Convert provided flags to status code, and clear any errors if present.
Definition: fsl_lpi2c.c:217
_lpi2c_slave_config::ignoreAck
bool ignoreAck
Definition: fsl_lpi2c.h:325
kLPI2C_HostRequestInputTrigger
@ kLPI2C_HostRequestInputTrigger
Definition: fsl_lpi2c.h:118
_lpi2c_slave_handle::transferredCount
uint32_t transferredCount
Definition: fsl_lpi2c.h:396
fsl_device_registers.h
kLPI2C_MasterBusyFlag
@ kLPI2C_MasterBusyFlag
Definition: fsl_lpi2c.h:87
LPI2C_Type::SSR
__IO uint32_t SSR
Definition: MIMXRT1052.h:25120
kStatusGroup_LPI2C
@ kStatusGroup_LPI2C
Definition: fsl_common.h:76
LPI2C_Type::MFCR
__IO uint32_t MFCR
Definition: MIMXRT1052.h:25113
LPI2C_MFSR_TXCOUNT_MASK
#define LPI2C_MFSR_TXCOUNT_MASK
Definition: MIMXRT1052.h:25602
LPI2C_MCR_MEN_MASK
#define LPI2C_MCR_MEN_MASK
Definition: MIMXRT1052.h:25183
kLPI2C_SlaveBitErrFlag
@ kLPI2C_SlaveBitErrFlag
Definition: fsl_lpi2c.h:276
lpi2c_data_match_config_t
struct _lpi2c_match_config lpi2c_data_match_config_t
LPI2C master data match configuration structure.
MAKE_STATUS
#define MAKE_STATUS(group, code)
Construct a status code value from a group and code number.
Definition: fsl_common.h:43
kLPI2C_SlaveCompletionEvent
@ kLPI2C_SlaveCompletionEvent
Definition: fsl_lpi2c.h:352
kLPI2C_SlaveAddressValidFlag
@ kLPI2C_SlaveAddressValidFlag
Definition: fsl_lpi2c.h:272
LPI2C_SlaveReceive
status_t LPI2C_SlaveReceive(LPI2C_Type *base, void *rxBuff, size_t rxSize, size_t *actualRxSize)
Performs a polling receive transfer on the I2C bus.
Definition: fsl_lpi2c.c:1730
_lpi2c_slave_transfer::dataSize
size_t dataSize
Definition: fsl_lpi2c.h:365
LPI2C_SlaveEnableDMA
static void LPI2C_SlaveEnableDMA(LPI2C_Type *base, bool enableAddressValid, bool enableRx, bool enableTx)
Enables or disables the LPI2C slave peripheral DMA requests.
Definition: fsl_lpi2c.h:1095
LPI2C_Type::SDER
__IO uint32_t SDER
Definition: MIMXRT1052.h:25122
_lpi2c_match_config::rxDataMatchOnly
bool rxDataMatchOnly
Definition: fsl_lpi2c.h:177
LPI2C_MasterTransferHandleIRQ
void LPI2C_MasterTransferHandleIRQ(LPI2C_Type *base, lpi2c_master_handle_t *handle)
Reusable routine to handle master interrupts.
Definition: fsl_lpi2c.c:1408
kLPI2C_MatchAddress0
@ kLPI2C_MatchAddress0
Definition: fsl_lpi2c.h:288
kLPI2C_Read
@ kLPI2C_Read
Definition: fsl_lpi2c.h:95
_lpi2c_slave_config::@354::enableAddress
bool enableAddress
Definition: fsl_lpi2c.h:323
_lpi2c_match_config::match0
uint32_t match0
Definition: fsl_lpi2c.h:178
_lpi2c_slave_config::address0
uint8_t address0
Definition: fsl_lpi2c.h:305
LPI2C_Type::MFSR
__I uint32_t MFSR
Definition: MIMXRT1052.h:25114
kLPI2C_MasterRxReadyFlag
@ kLPI2C_MasterRxReadyFlag
Definition: fsl_lpi2c.h:79
kLPI2C_1stWordAndM1EqualsM0AndM1
@ kLPI2C_1stWordAndM1EqualsM0AndM1
Definition: fsl_lpi2c.h:167
kLPI2C_Write
@ kLPI2C_Write
Definition: fsl_lpi2c.h:94
kStatus_LPI2C_BitError
@ kStatus_LPI2C_BitError
Definition: fsl_lpi2c.h:42
LPI2C_SCR_RST_MASK
#define LPI2C_SCR_RST_MASK
Definition: MIMXRT1052.h:25661
kLPI2C_TransferNoStartFlag
@ kLPI2C_TransferNoStartFlag
Definition: fsl_lpi2c.h:210
kLPI2C_SlaveBusyFlag
@ kLPI2C_SlaveBusyFlag
Definition: fsl_lpi2c.h:281
kStatus_LPI2C_Idle
@ kStatus_LPI2C_Idle
Definition: fsl_lpi2c.h:39
kStatus_LPI2C_NoTransferInProgress
@ kStatus_LPI2C_NoTransferInProgress
Definition: fsl_lpi2c.h:46
LPI2C_SlaveGetReceivedAddress
static uint32_t LPI2C_SlaveGetReceivedAddress(LPI2C_Type *base)
Returns the slave address sent by the I2C master.
Definition: fsl_lpi2c.h:1144
LPI2C_SlaveTransferCreateHandle
void LPI2C_SlaveTransferCreateHandle(LPI2C_Type *base, lpi2c_slave_handle_t *handle, lpi2c_slave_transfer_callback_t callback, void *userData)
Creates a new handle for the LPI2C slave non-blocking APIs.
Definition: fsl_lpi2c.c:1818
kLPI2C_MasterStopDetectFlag
@ kLPI2C_MasterStopDetectFlag
Definition: fsl_lpi2c.h:81
_lpi2c_slave_config::@354::enableTx
bool enableTx
Definition: fsl_lpi2c.h:319
_lpi2c_slave_config::filterEnable
bool filterEnable
Definition: fsl_lpi2c.h:309
kLPI2C_4PinPushPullWithInvertedOutput
@ kLPI2C_4PinPushPullWithInvertedOutput
Definition: fsl_lpi2c.h:111
LPI2C_SDER_RDDE
#define LPI2C_SDER_RDDE(x)
Definition: MIMXRT1052.h:25903
_lpi2c_slave_config::sclGlitchFilterWidth_ns
uint32_t sclGlitchFilterWidth_ns
Definition: fsl_lpi2c.h:328
LPI2C_SSR_BEF_MASK
#define LPI2C_SSR_BEF_MASK
Definition: MIMXRT1052.h:25742
LPI2C_MSR_TDF_MASK
#define LPI2C_MSR_TDF_MASK
Definition: MIMXRT1052.h:25229
LPI2C_MasterClearStatusFlags
static void LPI2C_MasterClearStatusFlags(LPI2C_Type *base, uint32_t statusMask)
Clears the LPI2C master status flag state.
Definition: fsl_lpi2c.h:550
LPI2C_SlaveGetEnabledInterrupts
static uint32_t LPI2C_SlaveGetEnabledInterrupts(LPI2C_Type *base)
Returns the set of currently enabled LPI2C slave interrupt requests.
Definition: fsl_lpi2c.h:1076
kLPI2C_HostRequestExternalPin
@ kLPI2C_HostRequestExternalPin
Definition: fsl_lpi2c.h:117
count
size_t count
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/tests/test_common/ma_test_common.c:31
_lpi2c_master_handle::completionCallback
lpi2c_master_transfer_callback_t completionCallback
Definition: fsl_lpi2c.h:243
LPI2C_MasterRepeatedStart
static status_t LPI2C_MasterRepeatedStart(LPI2C_Type *base, uint8_t address, lpi2c_direction_t dir)
Sends a repeated START signal and slave address on the I2C bus.
Definition: fsl_lpi2c.h:751
_lpi2c_slave_transfer::transferredCount
size_t transferredCount
Definition: fsl_lpi2c.h:368
LPI2C_MasterGetBusIdleState
static bool LPI2C_MasterGetBusIdleState(LPI2C_Type *base)
Returns whether the bus is idle.
Definition: fsl_lpi2c.h:713
_lpi2c_master_transfer::direction
lpi2c_direction_t direction
Definition: fsl_lpi2c.h:225
kLPI2C_SlaveReceiveEvent
@ kLPI2C_SlaveReceiveEvent
Definition: fsl_lpi2c.h:348
LPI2C_SSR_RSF_MASK
#define LPI2C_SSR_RSF_MASK
Definition: MIMXRT1052.h:25728
LPI2C_MSR_ALF_MASK
#define LPI2C_MSR_ALF_MASK
Definition: MIMXRT1052.h:25264
LPI2C_SlaveInit
void LPI2C_SlaveInit(LPI2C_Type *base, const lpi2c_slave_config_t *slaveConfig, uint32_t sourceClock_Hz)
Initializes the LPI2C slave peripheral.
Definition: fsl_lpi2c.c:1526
kStatus_LPI2C_Nak
@ kStatus_LPI2C_Nak
Definition: fsl_lpi2c.h:40
LPI2C_SlaveEnableInterrupts
static void LPI2C_SlaveEnableInterrupts(LPI2C_Type *base, uint32_t interruptMask)
Enables the LPI2C slave interrupt requests.
Definition: fsl_lpi2c.h:1050
_lpi2c_master_config::enableMaster
bool enableMaster
Definition: fsl_lpi2c.h:139
_lpi2c_master_config::busIdleTimeout_ns
uint32_t busIdleTimeout_ns
Definition: fsl_lpi2c.h:145
LPI2C_Type::STAR
__IO uint32_t STAR
Definition: MIMXRT1052.h:25130
LPI2C_Type::SCR
__IO uint32_t SCR
Definition: MIMXRT1052.h:25119
LPI2C_MSR_RDF_MASK
#define LPI2C_MSR_RDF_MASK
Definition: MIMXRT1052.h:25236
_lpi2c_slave_handle::userData
void * userData
Definition: fsl_lpi2c.h:398
_lpi2c_slave_handle::isBusy
bool isBusy
Definition: fsl_lpi2c.h:393
kLPI2C_2PinOutputOnlyWithSeparateSlave
@ kLPI2C_2PinOutputOnlyWithSeparateSlave
Definition: fsl_lpi2c.h:107
LPI2C_MasterGetEnabledInterrupts
static uint32_t LPI2C_MasterGetEnabledInterrupts(LPI2C_Type *base)
Returns the set of currently enabled LPI2C master interrupt requests.
Definition: fsl_lpi2c.h:597
_lpi2c_host_request_source
_lpi2c_host_request_source
LPI2C master host request selection.
Definition: fsl_lpi2c.h:115
kLPI2C_MasterTxReadyFlag
@ kLPI2C_MasterTxReadyFlag
Definition: fsl_lpi2c.h:78
lpi2c_host_request_polarity_t
enum _lpi2c_host_request_polarity lpi2c_host_request_polarity_t
LPI2C master host request pin polarity configuration.
_lpi2c_slave_config::clockHoldTime_ns
uint32_t clockHoldTime_ns
Definition: fsl_lpi2c.h:330
_lpi2c_slave_handle
LPI2C slave handle structure.
Definition: fsl_lpi2c.h:390
_lpi2c_slave_config
Structure with settings to initialize the LPI2C slave module.
Definition: fsl_lpi2c.h:302
LPI2C_MasterSetWatermarks
static void LPI2C_MasterSetWatermarks(LPI2C_Type *base, size_t txWords, size_t rxWords)
Sets the watermarks for LPI2C master FIFOs.
Definition: fsl_lpi2c.h:657
LPI2C_SCR_SEN_MASK
#define LPI2C_SCR_SEN_MASK
Definition: MIMXRT1052.h:25654
_lpi2c_master_handle::userData
void * userData
Definition: fsl_lpi2c.h:244
LPI2C_MasterReset
static void LPI2C_MasterReset(LPI2C_Type *base)
Performs a software reset.
Definition: fsl_lpi2c.h:491
LPI2C_Type::SIER
__IO uint32_t SIER
Definition: MIMXRT1052.h:25121
lpi2c_slave_transfer_t
struct _lpi2c_slave_transfer lpi2c_slave_transfer_t
LPI2C slave transfer structure.
_lpi2c_match_config::match1
uint32_t match1
Definition: fsl_lpi2c.h:179
_lpi2c_slave_config::sclStall
struct _lpi2c_slave_config::@354 sclStall
LPI2C_MFSR_TXCOUNT_SHIFT
#define LPI2C_MFSR_TXCOUNT_SHIFT
Definition: MIMXRT1052.h:25603
kLPI2C_HostRequestPinActiveHigh
@ kLPI2C_HostRequestPinActiveHigh
Definition: fsl_lpi2c.h:125
LPI2C_MFSR_RXCOUNT_SHIFT
#define LPI2C_MFSR_RXCOUNT_SHIFT
Definition: MIMXRT1052.h:25608
LPI2C_MasterGetFifoCounts
static void LPI2C_MasterGetFifoCounts(LPI2C_Type *base, size_t *rxCount, size_t *txCount)
Gets the current number of words in the LPI2C master FIFOs.
Definition: fsl_lpi2c.h:671
LPI2C_Type
Definition: MIMXRT1052.h:25094
kLPI2C_2PinPushPullWithSeparateSlave
@ kLPI2C_2PinPushPullWithSeparateSlave
Definition: fsl_lpi2c.h:109
_lpi2c_direction
_lpi2c_direction
Direction of master and slave transfers.
Definition: fsl_lpi2c.h:92
LPI2C_SlaveClearStatusFlags
static void LPI2C_SlaveClearStatusFlags(LPI2C_Type *base, uint32_t statusMask)
Clears the LPI2C status flag state.
Definition: fsl_lpi2c.h:1030
LPI2C_MSR_DMF_MASK
#define LPI2C_MSR_DMF_MASK
Definition: MIMXRT1052.h:25285
_lpi2c_master_transfer::dataSize
size_t dataSize
Definition: fsl_lpi2c.h:229
LPI2C_SSR_TAF_MASK
#define LPI2C_SSR_TAF_MASK
Definition: MIMXRT1052.h:25721
kLPI2C_SlaveBusBusyFlag
@ kLPI2C_SlaveBusBusyFlag
Definition: fsl_lpi2c.h:282
LPI2C_MSR_SDF_MASK
#define LPI2C_MSR_SDF_MASK
Definition: MIMXRT1052.h:25250
kLPI2C_AnyWordEqualsM0AndNextWordEqualsM1
@ kLPI2C_AnyWordEqualsM0AndNextWordEqualsM1
Definition: fsl_lpi2c.h:165
LPI2C_MasterTransferNonBlocking
status_t LPI2C_MasterTransferNonBlocking(LPI2C_Type *base, lpi2c_master_handle_t *handle, lpi2c_master_transfer_t *transfer)
Performs a non-blocking transaction on the I2C bus.
Definition: fsl_lpi2c.c:1264
LPI2C_MasterTransferGetCount
status_t LPI2C_MasterTransferGetCount(LPI2C_Type *base, lpi2c_master_handle_t *handle, size_t *count)
Returns number of bytes transferred so far.
Definition: fsl_lpi2c.c:1319
_lpi2c_master_config::debugEnable
bool debugEnable
Definition: fsl_lpi2c.h:141
_lpi2c_slave_handle::eventMask
uint32_t eventMask
Definition: fsl_lpi2c.h:395
_lpi2c_slave_config::@354::enableAck
bool enableAck
Definition: fsl_lpi2c.h:313
_lpi2c_match_config
LPI2C master data match configuration structure.
Definition: fsl_lpi2c.h:174
LPI2C_MasterSend
status_t LPI2C_MasterSend(LPI2C_Type *base, void *txBuff, size_t txSize)
Performs a polling send transfer on the I2C bus.
Definition: fsl_lpi2c.c:816
LPI2C_SDER_TDDE
#define LPI2C_SDER_TDDE(x)
Definition: MIMXRT1052.h:25896
LPI2C_MSR_MBF_MASK
#define LPI2C_MSR_MBF_MASK
Definition: MIMXRT1052.h:25292
LPI2C_SlaveSend
status_t LPI2C_SlaveSend(LPI2C_Type *base, void *txBuff, size_t txSize, size_t *actualTxSize)
Performs a polling send transfer on the I2C bus.
Definition: fsl_lpi2c.c:1649
kStatus_LPI2C_DmaRequestFail
@ kStatus_LPI2C_DmaRequestFail
Definition: fsl_lpi2c.h:48
LPI2C_MDER_TDDE
#define LPI2C_MDER_TDDE(x)
Definition: MIMXRT1052.h:25383
LPI2C_MasterDisableInterrupts
static void LPI2C_MasterDisableInterrupts(LPI2C_Type *base, uint32_t interruptMask)
Disables the LPI2C master interrupt requests.
Definition: fsl_lpi2c.h:585
LPI2C_Type::MIER
__IO uint32_t MIER
Definition: MIMXRT1052.h:25100
LPI2C_SCR_SEN
#define LPI2C_SCR_SEN(x)
Definition: MIMXRT1052.h:25660
_lpi2c_master_handle::state
uint8_t state
Definition: fsl_lpi2c.h:238
LPI2C_MFSR_RXCOUNT_MASK
#define LPI2C_MFSR_RXCOUNT_MASK
Definition: MIMXRT1052.h:25607
kLPI2C_SlaveAllEvents
@ kLPI2C_SlaveAllEvents
Definition: fsl_lpi2c.h:355
lpi2c_data_match_config_mode_t
enum _lpi2c_data_match_config_mode lpi2c_data_match_config_mode_t
LPI2C master data match configuration modes.
_lpi2c_master_config::@353::enable
bool enable
Definition: fsl_lpi2c.h:151
kLPI2C_SlaveTransmitEvent
@ kLPI2C_SlaveTransmitEvent
Definition: fsl_lpi2c.h:346
LPI2C_SlaveTransferGetCount
status_t LPI2C_SlaveTransferGetCount(LPI2C_Type *base, lpi2c_slave_handle_t *handle, size_t *count)
Gets the slave transfer status during a non-blocking transfer.
Definition: fsl_lpi2c.c:1927
_lpi2c_slave_config::enableReceivedAddressRead
bool enableReceivedAddressRead
Definition: fsl_lpi2c.h:326
LPI2C_MasterGetRxFifoAddress
static uint32_t LPI2C_MasterGetRxFifoAddress(LPI2C_Type *base)
Gets LPI2C master receive data register address for DMA transfer.
Definition: fsl_lpi2c.h:636
LPI2C_SSR_GCF_MASK
#define LPI2C_SSR_GCF_MASK
Definition: MIMXRT1052.h:25770
LPI2C_SDER_AVDE
#define LPI2C_SDER_AVDE(x)
Definition: MIMXRT1052.h:25910
kLPI2C_SlaveTxReadyFlag
@ kLPI2C_SlaveTxReadyFlag
Definition: fsl_lpi2c.h:270
LPI2C_MasterConfigureDataMatch
void LPI2C_MasterConfigureDataMatch(LPI2C_Type *base, const lpi2c_data_match_config_t *config)
Configures LPI2C master data match feature.
Definition: fsl_lpi2c.c:502
LPI2C_MasterStop
status_t LPI2C_MasterStop(LPI2C_Type *base)
Sends a STOP signal on the I2C bus.
Definition: fsl_lpi2c.c:675
_lpi2c_slave_flags
_lpi2c_slave_flags
LPI2C slave peripheral flags.
Definition: fsl_lpi2c.h:268
_lpi2c_slave_transfer::completionStatus
status_t completionStatus
Definition: fsl_lpi2c.h:366
kLPI2C_2PinPushPull
@ kLPI2C_2PinPushPull
Definition: fsl_lpi2c.h:103
_lpi2c_master_handle::commandBuffer
uint16_t commandBuffer[7]
Definition: fsl_lpi2c.h:241
_lpi2c_master_config::enableDoze
bool enableDoze
Definition: fsl_lpi2c.h:140
LPI2C_SASR_RADDR_MASK
#define LPI2C_SASR_RADDR_MASK
Definition: MIMXRT1052.h:26042
LPI2C_MSR_FEF_MASK
#define LPI2C_MSR_FEF_MASK
Definition: MIMXRT1052.h:25271
kLPI2C_AnyWordAndM1EqualsM0AndM1
@ kLPI2C_AnyWordAndM1EqualsM0AndM1
Definition: fsl_lpi2c.h:169
LPI2C_MasterTransferAbort
void LPI2C_MasterTransferAbort(LPI2C_Type *base, lpi2c_master_handle_t *handle)
Terminates a non-blocking LPI2C master transmission early.
Definition: fsl_lpi2c.c:1383
LPI2C_MasterEnableDMA
static void LPI2C_MasterEnableDMA(LPI2C_Type *base, bool enableTx, bool enableRx)
Enables or disables LPI2C master DMA requests.
Definition: fsl_lpi2c.h:614
kLPI2C_TransferDefaultFlag
@ kLPI2C_TransferDefaultFlag
Definition: fsl_lpi2c.h:209
kLPI2C_TransferNoStopFlag
@ kLPI2C_TransferNoStopFlag
Definition: fsl_lpi2c.h:212
_lpi2c_slave_transfer::event
lpi2c_slave_transfer_event_t event
Definition: fsl_lpi2c.h:362
LPI2C_MasterTransferBlocking
status_t LPI2C_MasterTransferBlocking(LPI2C_Type *base, lpi2c_master_transfer_t *transfer)
Performs a master polling transfer on the I2C bus.
Definition: fsl_lpi2c.c:854
_lpi2c_slave_address_match
_lpi2c_slave_address_match
LPI2C slave address match options.
Definition: fsl_lpi2c.h:286
config
static sai_transceiver_t config
Definition: imxrt1050/imxrt1050-evkb/source/pv_audio_rec.c:75
kLPI2C_MasterEndOfPacketFlag
@ kLPI2C_MasterEndOfPacketFlag
Definition: fsl_lpi2c.h:80
LPI2C_SlaveDisableInterrupts
static void LPI2C_SlaveDisableInterrupts(LPI2C_Type *base, uint32_t interruptMask)
Disables the LPI2C slave interrupt requests.
Definition: fsl_lpi2c.h:1065
LPI2C_SSR_FEF_MASK
#define LPI2C_SSR_FEF_MASK
Definition: MIMXRT1052.h:25749
LPI2C_SDER_AVDE_MASK
#define LPI2C_SDER_AVDE_MASK
Definition: MIMXRT1052.h:25904
LPI2C_MasterGetTxFifoAddress
static uint32_t LPI2C_MasterGetTxFifoAddress(LPI2C_Type *base)
Gets LPI2C master transmit data register address for DMA transfer.
Definition: fsl_lpi2c.h:625
kLPI2C_2PinOutputOnly
@ kLPI2C_2PinOutputOnly
Definition: fsl_lpi2c.h:102
LPI2C_MasterInit
void LPI2C_MasterInit(LPI2C_Type *base, const lpi2c_master_config_t *masterConfig, uint32_t sourceClock_Hz)
Initializes the LPI2C master peripheral.
Definition: fsl_lpi2c.c:389
_lpi2c_slave_transfer
LPI2C slave transfer structure.
Definition: fsl_lpi2c.h:360
_lpi2c_master_transfer::flags
uint32_t flags
Definition: fsl_lpi2c.h:222
LPI2C_MasterEnable
static void LPI2C_MasterEnable(LPI2C_Type *base, bool enable)
Enables or disables the LPI2C module as master.
Definition: fsl_lpi2c.h:503
LPI2C_SSR_SDF_MASK
#define LPI2C_SSR_SDF_MASK
Definition: MIMXRT1052.h:25735
_lpi2c_master_config::@353::polarity
lpi2c_host_request_polarity_t polarity
Definition: fsl_lpi2c.h:153
_lpi2c_slave_transfer::data
uint8_t * data
Definition: fsl_lpi2c.h:364
LPI2C_SSR_AVF_MASK
#define LPI2C_SSR_AVF_MASK
Definition: MIMXRT1052.h:25714
LPI2C_Type::MRDR
__I uint32_t MRDR
Definition: MIMXRT1052.h:25117
LPI2C_MSR_BBF_MASK
#define LPI2C_MSR_BBF_MASK
Definition: MIMXRT1052.h:25299
_lpi2c_slave_transfer_event
_lpi2c_slave_transfer_event
Set of events sent to the callback for non blocking slave transfers.
Definition: fsl_lpi2c.h:343
status_t
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:189
kLPI2C_MatchAddress0ThroughAddress1
@ kLPI2C_MatchAddress0ThroughAddress1
Definition: fsl_lpi2c.h:290
_lpi2c_master_transfer::subaddressSize
size_t subaddressSize
Definition: fsl_lpi2c.h:227
_lpi2c_master_pin_config
_lpi2c_master_pin_config
LPI2C pin configuration.
Definition: fsl_lpi2c.h:99
lpi2c_master_transfer_callback_t
void(* lpi2c_master_transfer_callback_t)(LPI2C_Type *base, lpi2c_master_handle_t *handle, status_t completionStatus, void *userData)
Master completion callback function pointer type.
Definition: fsl_lpi2c.h:196
LPI2C_SSR_RDF_MASK
#define LPI2C_SSR_RDF_MASK
Definition: MIMXRT1052.h:25707
LPI2C_MasterGetStatusFlags
static uint32_t LPI2C_MasterGetStatusFlags(LPI2C_Type *base)
Gets the LPI2C master status flags.
Definition: fsl_lpi2c.h:525
kLPI2C_SlaveAddressMatchEvent
@ kLPI2C_SlaveAddressMatchEvent
Definition: fsl_lpi2c.h:345
LPI2C_SDER_TDDE_MASK
#define LPI2C_SDER_TDDE_MASK
Definition: MIMXRT1052.h:25890
kLPI2C_MatchDisabled
@ kLPI2C_MatchDisabled
Definition: fsl_lpi2c.h:160
_lpi2c_slave_handle::callback
lpi2c_slave_transfer_callback_t callback
Definition: fsl_lpi2c.h:397
kStatus_LPI2C_PinLowTimeout
@ kStatus_LPI2C_PinLowTimeout
Definition: fsl_lpi2c.h:44
lpi2c_slave_address_match_t
enum _lpi2c_slave_address_match lpi2c_slave_address_match_t
LPI2C slave address match options.
kLPI2C_HostRequestPinActiveLow
@ kLPI2C_HostRequestPinActiveLow
Definition: fsl_lpi2c.h:124
LPI2C_SlaveTransferAbort
void LPI2C_SlaveTransferAbort(LPI2C_Type *base, lpi2c_slave_handle_t *handle)
Aborts the slave non-blocking transfers.
Definition: fsl_lpi2c.c:1957
kLPI2C_SlaveGeneralCallFlag
@ kLPI2C_SlaveGeneralCallFlag
Definition: fsl_lpi2c.h:280
_lpi2c_master_transfer
Non-blocking transfer descriptor structure.
Definition: fsl_lpi2c.h:220
_lpi2c_slave_config::sdaGlitchFilterWidth_ns
uint32_t sdaGlitchFilterWidth_ns
Definition: fsl_lpi2c.h:327
kStatus_LPI2C_Busy
@ kStatus_LPI2C_Busy
Definition: fsl_lpi2c.h:38
_lpi2c_master_config::ignoreAck
bool ignoreAck
Definition: fsl_lpi2c.h:142
LPI2C_SlaveTransferNonBlocking
status_t LPI2C_SlaveTransferNonBlocking(LPI2C_Type *base, lpi2c_slave_handle_t *handle, uint32_t eventMask)
Starts accepting slave transfers.
Definition: fsl_lpi2c.c:1875
_lpi2c_master_config::@353::source
lpi2c_host_request_source_t source
Definition: fsl_lpi2c.h:152
LPI2C_MCR_MEN
#define LPI2C_MCR_MEN(x)
Definition: MIMXRT1052.h:25189
LPI2C_SSR_SBF_MASK
#define LPI2C_SSR_SBF_MASK
Definition: MIMXRT1052.h:25784
kLPI2C_MatchAddress0OrAddress1
@ kLPI2C_MatchAddress0OrAddress1
Definition: fsl_lpi2c.h:289


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:13:56