8 #ifndef NTV2KONAFLASHPROGRAM_H 9 #define NTV2KONAFLASHPROGRAM_H 15 #include <sys/types.h> 23 #define MAXMCSINFOSIZE 256 24 #define MAXMCSLICENSESIZE 256 50 static std::string FlashBlockIDToString (
const FlashBlockID inID,
const bool inShortDisplay =
false);
53 virtual bool SetBoard (uint32_t index = 0);
57 std::string Program (
bool fullVerify =
false);
58 bool ProgramCustom (
const std::string & sCustomFileName,
const uint32_t addr, std::ostream & outMsgs);
59 bool ProgramKonaxMB (
const std::string & sCustomFileName,
const uint32_t addr, std::ostream & outMsgs);
61 bool EraseChip (
UWord chip = 0);
62 bool CreateSRecord (
bool bChangeEndian);
63 bool CreateEDIDIntelRecord ();
65 bool VerifyFlash (
FlashBlockID flashBlockNumber,
bool fullVerify =
false);
69 bool ROMHasBankSelect();
70 uint32_t ReadBankSelect ();
71 bool IsInstalledFWRunning (
bool & outIsRunning, std::ostream & outErrorMsgs);
75 std::string
GetPartName (
void)
const {
return _parser.PartName();}
76 std::string
GetDate (
void)
const {
return _parser.Date();}
77 std::string
GetTime (
void)
const {
return _parser.Time();}
84 bool ProgramLicenseInfo(
const std::string & licenseString);
85 bool ReadLicenseInfo(std::string & licenseString);
86 void DisplayData(
const uint32_t address,
const uint32_t len);
87 bool ProgramInfoFromString(std::string infoString);
88 bool FullProgram(std::vector<uint8_t> & dataBuffer);
90 bool WaitForFlashNOTBusy();
91 bool ProgramFlashValue(uint32_t address, uint32_t value);
92 bool FastProgramFlash256(uint32_t address, uint32_t* buffer);
93 bool EraseSector(uint32_t sectorAddress);
94 bool CheckFlashErasedWithBlockID(
FlashBlockID flashBlockNumber);
95 uint32_t ReadDeviceID();
96 bool SetDeviceProperties();
97 void DetermineFlashTypeAndBlockNumberFromFileName(
const std::string & bitFileName);
101 return GetBaseAddressForProgramming(flashBlockNumber)+(sectorNumber*_sectorSize);
106 switch ( flashBlockNumber )
122 switch ( flashBlockNumber )
134 bool SetWarmBootFirmwareReload(
bool enable);
135 #if 0 // IoIP/KonaIP10g purge 136 bool ReadInfoString();
137 bool SetMCSFile (
const std::string & sMCSFileName);
138 bool ProgramFromMCS(
bool verify);
139 bool ProgramSOC(
bool verify =
true);
141 const std::string & GetMCSInfo (
void)
const {
return _mcsInfo;}
142 void ParsePartitionFromFileLines(uint32_t address, uint16_t & partitionOffset);
145 bool ProgramLicenseInfo(
const std::string & licenseString);
146 bool ReadLicenseInfo(std::string & licenseString);
147 bool ProgramInfoFromString(std::string infoString);
148 int32_t NextMcsStep() {
return ++_mcsStep;}
149 bool VerifySOCPartition(
FlashBlockID flashID, uint32_t FlashBlockOffset);
150 bool CheckAndFixMACs();
151 bool MakeMACsFromSerial(
const char *sSerialNumber,
MacAddr *pMac1,
MacAddr *pMac2 );
152 #endif // IoIP/KonaIP10g purge 182 CNTV2MCSfile _mcsFile;
190 #endif // NTV2KONAFLASHPROGRAM_H uint32_t GetBaseAddressForProgramming(FlashBlockID flashBlockNumber)
I interrogate and control an AJA video/audio capture/playout device.
virtual CNTV2Card & device(void) const
std::string GetDate(void) const
Declares the CNTV2SpiFlash and CNTV2AxiSpiFlash classes.
virtual ~CNTV2FlashProgress()
CNTV2SpiFlash * _spiFlash
std::string GetPartName(void) const
uint32_t GetSectorAddressForSector(FlashBlockID flashBlockNumber, uint32_t sectorNumber)
uint32_t GetNumBytes(void) const
bool _hasExtendedCommandSupport
std::string GetDesignName(void) const
std::string AsString(void) const
Describes a user-space buffer on the host computer. I have an address and a length, plus some optional attributes (allocated by SDK?, page-aligned? etc.).
NTV2BitfileHeaderParser _parser
uint32_t GetNumberOfSectors(FlashBlockID flashBlockNumber)
const NTV2BitfileHeaderParser & Parser(void) const
Declares the CNTV2Bitfile class.
std::vector< uint8_t > _partitionBuffer
uint8_t * _customFileBuffer
std::string GetTime(void) const
Declares the CNTV2Card class.
virtual bool UpdatePercentage(const size_t inPercentage)
uint32_t _numSectorsFailSafe
NTV2Buffer _bitFileBuffer
uint32_t _failSafePadding
static CNTV2FlashProgress & nullUpdater