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
Flash.h
Go to the documentation of this file.
1 
18 #ifndef FLASH_H_
19 #define FLASH_H_
20 
21 /* Includes */
22 #include "cyu3dma.h"
23 #include "cyu3error.h"
24 #include "cyu3i2c.h"
25 #include "main.h"
26 
27 /* Public function prototypes */
28 CyU3PReturnStatus_t AdiFlashInit();
29 void AdiFlashDeInit();
30 void AdiFlashWrite(uint32_t Address, uint16_t NumBytes, uint8_t* WriteBuf);
31 void AdiFlashRead(uint32_t Address, uint16_t NumBytes, uint8_t* ReadBuf);
32 void AdiFlashReadHandler(uint32_t Address, uint16_t NumBytes);
33 
35 #define FLASH_PAGE_SIZE 0x40
36 
38 #define FLASH_TIMEOUT_MS 5000
39 
40 #endif /* FLASH_H_ */
AdiFlashReadHandler
void AdiFlashReadHandler(uint32_t Address, uint16_t NumBytes)
Handles flash read requests from control endpoint.
Definition: Flash.c:198
AdiFlashInit
CyU3PReturnStatus_t AdiFlashInit()
Initializes flash memory interface module.
Definition: Flash.c:46
AdiFlashReadHandler
void AdiFlashReadHandler(uint32_t Address, uint16_t NumBytes)
Handles flash read requests from control endpoint.
Definition: Flash.c:198
BoardState::I2CBitRate
uint32_t I2CBitRate
Definition: main.h:195
FX3State
BoardState FX3State
Definition: main.c:112
Flash.h
Header file for FX3 flash interfacing module.
ADI_FLASH_WRITE_ENABLE_PIN
#define ADI_FLASH_WRITE_ENABLE_PIN
Definition: PinFunctions.h:88
AdiFlashRead
void AdiFlashRead(uint32_t Address, uint16_t NumBytes, uint8_t *ReadBuf)
Read a block of memory from flash, at the specified byte address.
Definition: Flash.c:178
BoardState
Struct to store the current board state (SPI config, USB speed, etc)
Definition: main.h:148
GetFlashDeviceAddress
static uint16_t GetFlashDeviceAddress(uint32_t ByteAddress)
Gets the flash devices address, based on the requested byte address.
Definition: Flash.c:361
AdiFlashWrite
void AdiFlashWrite(uint32_t Address, uint16_t NumBytes, uint8_t *WriteBuf)
Write a block of memory to flash, at the specified byte address.
Definition: Flash.c:154
AdiFlashRead
void AdiFlashRead(uint32_t Address, uint16_t NumBytes, uint8_t *ReadBuf)
Read a block of memory from flash, at the specified byte address.
Definition: Flash.c:178
AdiFlashWrite
void AdiFlashWrite(uint32_t Address, uint16_t NumBytes, uint8_t *WriteBuf)
Write a block of memory to flash, at the specified byte address.
Definition: Flash.c:154
flashRxHandle
static CyU3PDmaChannel flashRxHandle
Definition: Flash.c:34
AdiFlashDeInit
void AdiFlashDeInit()
De-init the flash memory interfacing module.
Definition: Flash.c:128
main.h
Main header file for the Analog Devices iSensor FX3 Demonstration Platform firmware.
flashTxHandle
static CyU3PDmaChannel flashTxHandle
Definition: Flash.c:31
FlashTransfer
static CyU3PReturnStatus_t FlashTransfer(uint32_t Address, uint16_t NumBytes, uint8_t *Buf, CyBool_t isRead)
Performs a transfer from the I2C flash memory.
Definition: Flash.c:229
AdiFlashDeInit
void AdiFlashDeInit()
De-init the flash memory interfacing module.
Definition: Flash.c:128
AdiFlashInit
CyU3PReturnStatus_t AdiFlashInit()
Initializes flash memory interface module.
Definition: Flash.c:46
AdiI2CInit
CyU3PReturnStatus_t AdiI2CInit(uint32_t BitRate, CyBool_t isDMA)
Init I2C peripheral.
Definition: I2cFunctions.c:130
USBBuffer
uint8_t USBBuffer[4096]
FLASH_PAGE_SIZE
#define FLASH_PAGE_SIZE
Definition: Flash.h:35