bmp.: Implement getClkFreq()

This commit is contained in:
Uwe Bonnes 2021-09-19 01:06:38 +02:00
parent eebcc584ec
commit 369773b5ec
2 changed files with 4 additions and 1 deletions

View File

@ -184,6 +184,7 @@ int Bmp::setClkFreq(uint32_t clkHZ)
uint32_t freq[1];
unhexify(freq, &construct[1], 4);
fprintf(stderr, "%d Hz\n", freq[0]);
_clkHZ = freq[0];
return freq[0];
}

View File

@ -23,7 +23,7 @@ class Bmp : public JtagInterface {
const std::string &serial, uint32_t clkHZ, bool verbose);
~Bmp(void);
int setClkFreq(uint32_t clkHZ) override;
uint32_t getClkFreq() { return _clkHZ;}
/* TMS */
int writeTMS(uint8_t *tms, int len, bool flush_buffer) override;
/* TDI */
@ -44,5 +44,7 @@ private:
void DEBUG_WARN(const char *format, ...);
void DEBUG_WIRE(const char *format, ...);
void DEBUG_PROBE(const char *format, ...);
protected:
uint32_t _clkHZ;
};
#endif // SRC_BMP_HPP_