![]() |
ADI iSensor FX3 Firmware
v2.9.4-pub
Firmware for the Analog Devices EVAL-ADIS-FX3 IMU Evaluation Platform. This firmware can be compiled using the Cypress EZ USB Suite IDE
|
Implementation file for USB-I2C interfacing module. More...
#include "I2cFunctions.h"
Functions | |
CyU3PReturnStatus_t | AdiI2CReadHandler (uint16_t RequestLength) |
Handler for I2C read command from control endpoint. More... | |
CyU3PReturnStatus_t | AdiI2CWriteHandler (uint16_t RequestLength) |
Handler for I2C write command from control endpoint. More... | |
CyU3PReturnStatus_t | AdiI2CInit (uint32_t BitRate, CyBool_t isDMA) |
Init I2C peripheral. More... | |
uint32_t | I2CParseUSBBuffer (uint32_t *timeout, uint32_t *numBytes, CyU3PI2cPreamble_t *preamble) |
Parses I2C command data from the USB Buffer. Used for read/write/stream. More... | |
Variables | |
uint8_t | USBBuffer [4096] |
uint8_t | BulkBuffer [12288] |
CyU3PDmaBuffer_t | ManualDMABuffer |
CyU3PDmaChannel | ChannelToPC |
BoardState | FX3State |
Implementation file for USB-I2C interfacing module.
Copyright (c) 2018-2020 Analog Devices, Inc. All Rights Reserved. This software is proprietary to Analog Devices, Inc. and its licensors.
THIS SOFTWARE UTILIZES LIBRARIES DEVELOPED AND MAINTAINED BY CYPRESS INC. THE LICENSE INCLUDED IN THIS REPOSITORY DOES NOT EXTEND TO CYPRESS PROPERTY.
Use of this file is governed by the license agreement included in this repository.
CyU3PReturnStatus_t AdiI2CInit | ( | uint32_t | BitRate, |
CyBool_t | isDMA | ||
) |
Init I2C peripheral.
BitRate | Bit rate to configure I2C peripheral for (100KHz - 1MHz) |
isDMA | If the I2C peripheral should be configured for DMA |
CyU3PReturnStatus_t AdiI2CReadHandler | ( | uint16_t | RequestLength | ) |
Handler for I2C read command from control endpoint.
RequestLength | Number of bytes received over control endpoint |
This function uses the I2C peripheral in register mode to perform a single transfer. The number of bytes read in a single transfer can be 0 bytes - 12KB.
CyU3PReturnStatus_t AdiI2CWriteHandler | ( | uint16_t | RequestLength | ) |
Handler for I2C write command from control endpoint.
RequestLength | Number of bytes received over control endpoint |
This function uses the I2C peripheral in register mode to perform a single transfer. The number of bytes written in a single transfer is limited to ~4070.
uint32_t I2CParseUSBBuffer | ( | uint32_t * | timeout, |
uint32_t * | numBytes, | ||
CyU3PI2cPreamble_t * | preamble | ||
) |
Parses I2C command data from the USB Buffer. Used for read/write/stream.
timeout | Timeout value for I2C transaction. Return by reference. |
numBytes | Number of bytes field in USBBuffer. Return by reference |
preamble | I2C preamble struct stored in USBBuffer. Return by reference |
|
extern |
DMA channel for BULK-IN endpoint 0x82 (FX3 to PC)
|
extern |
Struct. which stores all run time configurable FX3 settings
|
extern |
DMA buffer structure for output buffer
|
extern |
Reference to needed globals (defined in main)