bmp.: Implement getClkFreq()
This commit is contained in:
parent
eebcc584ec
commit
369773b5ec
|
|
@ -184,6 +184,7 @@ int Bmp::setClkFreq(uint32_t clkHZ)
|
||||||
uint32_t freq[1];
|
uint32_t freq[1];
|
||||||
unhexify(freq, &construct[1], 4);
|
unhexify(freq, &construct[1], 4);
|
||||||
fprintf(stderr, "%d Hz\n", freq[0]);
|
fprintf(stderr, "%d Hz\n", freq[0]);
|
||||||
|
_clkHZ = freq[0];
|
||||||
return freq[0];
|
return freq[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ class Bmp : public JtagInterface {
|
||||||
const std::string &serial, uint32_t clkHZ, bool verbose);
|
const std::string &serial, uint32_t clkHZ, bool verbose);
|
||||||
~Bmp(void);
|
~Bmp(void);
|
||||||
int setClkFreq(uint32_t clkHZ) override;
|
int setClkFreq(uint32_t clkHZ) override;
|
||||||
|
uint32_t getClkFreq() { return _clkHZ;}
|
||||||
/* TMS */
|
/* TMS */
|
||||||
int writeTMS(uint8_t *tms, int len, bool flush_buffer) override;
|
int writeTMS(uint8_t *tms, int len, bool flush_buffer) override;
|
||||||
/* TDI */
|
/* TDI */
|
||||||
|
|
@ -44,5 +44,7 @@ private:
|
||||||
void DEBUG_WARN(const char *format, ...);
|
void DEBUG_WARN(const char *format, ...);
|
||||||
void DEBUG_WIRE(const char *format, ...);
|
void DEBUG_WIRE(const char *format, ...);
|
||||||
void DEBUG_PROBE(const char *format, ...);
|
void DEBUG_PROBE(const char *format, ...);
|
||||||
|
protected:
|
||||||
|
uint32_t _clkHZ;
|
||||||
};
|
};
|
||||||
#endif // SRC_BMP_HPP_
|
#endif // SRC_BMP_HPP_
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue