Implementation of CNTV2AxiSpiFlash class.
More...
#include "ntv2spiinterface.h"
#include <cmath>
#include <algorithm>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include "ntv2registersmb.h"
#include "ntv2mcsfile.h"
Go to the source code of this file.
|
static bool | verify_vectors (const std::vector< uint8_t > &dataWritten, const std::vector< uint8_t > &dataRead, bool verbose=(0)) |
|
void | print_flash_status (const string &label, uint32_t curValue, uint32_t maxValue, uint32_t &lastPercentage) |
|
void | print_flash_status_final (const string &label) |
|
bool | has_4k_start_sectors (const uint32_t reportedSectorSize) |
|
static uint32_t | size_for_sector_number (const uint32_t reportedSectorSize, const uint32_t sector) |
|
static uint32_t | erase_cmd_for_sector (const uint32_t reportedSectorSize, const uint32_t sector) |
|
static uint32_t | sector_for_address (uint32_t sectorSizeBytes, uint32_t address) |
|
static uint32_t | address_for_sector (uint32_t sectorSizeBytes, uint32_t sector) |
|
ProgramState | programstate_for_address (uint32_t address, int mode) |
|
uint32_t | make_spi_ready (CNTV2Card &device) |
|
Implementation of CNTV2AxiSpiFlash class.
- Copyright
- (C) 2017-2022 AJA Video Systems, Inc.
Definition in file ntv2spiinterface.cpp.
◆ wait_for_flash_status_ready
#define wait_for_flash_status_ready |
( |
| ) |
{ uint8_t fs=0x00; do { FlashReadStatus(fs); } while(fs & 0x1); } |
◆ address_for_sector()
static uint32_t address_for_sector |
( |
uint32_t |
sectorSizeBytes, |
|
|
uint32_t |
sector |
|
) |
| |
|
static |
◆ erase_cmd_for_sector()
static uint32_t erase_cmd_for_sector |
( |
const uint32_t |
reportedSectorSize, |
|
|
const uint32_t |
sector |
|
) |
| |
|
static |
◆ has_4k_start_sectors()
bool has_4k_start_sectors |
( |
const uint32_t |
reportedSectorSize | ) |
|
|
inline |
◆ make_spi_ready()
uint32_t make_spi_ready |
( |
CNTV2Card & |
device | ) |
|
|
inline |
◆ print_flash_status()
void print_flash_status |
( |
const string & |
label, |
|
|
uint32_t |
curValue, |
|
|
uint32_t |
maxValue, |
|
|
uint32_t & |
lastPercentage |
|
) |
| |
|
inline |
◆ print_flash_status_final()
void print_flash_status_final |
( |
const string & |
label | ) |
|
|
inline |
◆ programstate_for_address()
ProgramState programstate_for_address |
( |
uint32_t |
address, |
|
|
int |
mode |
|
) |
| |
|
inline |
◆ sector_for_address()
static uint32_t sector_for_address |
( |
uint32_t |
sectorSizeBytes, |
|
|
uint32_t |
address |
|
) |
| |
|
static |
◆ size_for_sector_number()
static uint32_t size_for_sector_number |
( |
const uint32_t |
reportedSectorSize, |
|
|
const uint32_t |
sector |
|
) |
| |
|
static |
◆ verify_vectors()
static bool verify_vectors |
( |
const std::vector< uint8_t > & |
dataWritten, |
|
|
const std::vector< uint8_t > & |
dataRead, |
|
|
bool |
verbose = (0) |
|
) |
| |
|
static |
◆ CYPRESS_FLASH_PAGE_PROGRAM_COMMAND
const uint32_t CYPRESS_FLASH_PAGE_PROGRAM_COMMAND = 0x12 |
◆ CYPRESS_FLASH_READ_CONFIG_COMMAND
const uint32_t CYPRESS_FLASH_READ_CONFIG_COMMAND = 0x35 |
◆ CYPRESS_FLASH_READ_JEDEC_ID_COMMAND
const uint32_t CYPRESS_FLASH_READ_JEDEC_ID_COMMAND = 0x9F |
◆ CYPRESS_FLASH_READ_STATUS_COMMAND
const uint32_t CYPRESS_FLASH_READ_STATUS_COMMAND = 0x05 |
◆ CYPRESS_FLASH_READBANK_COMMAND
const uint32_t CYPRESS_FLASH_READBANK_COMMAND = 0x16 |
◆ CYPRESS_FLASH_READFAST_COMMAND
const uint32_t CYPRESS_FLASH_READFAST_COMMAND = 0x0C |
◆ CYPRESS_FLASH_SECTOR4K_ERASE_COMMAND
const uint32_t CYPRESS_FLASH_SECTOR4K_ERASE_COMMAND = 0x21 |
◆ CYPRESS_FLASH_SECTOR_ERASE_COMMAND
const uint32_t CYPRESS_FLASH_SECTOR_ERASE_COMMAND = 0xDC |
◆ CYPRESS_FLASH_WRITEBANK_COMMAND
const uint32_t CYPRESS_FLASH_WRITEBANK_COMMAND = 0x17 |
◆ CYPRESS_FLASH_WRITEENABLE_COMMAND
const uint32_t CYPRESS_FLASH_WRITEENABLE_COMMAND = 0x06 |