JTAG: Report if HackRF CPLD bitstream matches released version.

TODO: Could be better reporting (CRC?), and could not pause while checking CPLD EEPROM, and could offer a means to program the bitstream if it doesn't match...
This commit is contained in:
Jared Boone 2016-07-17 15:56:24 -07:00
parent 204408d288
commit 3f3fe3bb67
2 changed files with 16 additions and 2 deletions

View File

@ -28,6 +28,8 @@ using namespace lpc43xx;
#include "portapack.hpp" #include "portapack.hpp"
using portapack::receiver_model; using portapack::receiver_model;
#include "cpld_update.hpp"
namespace ui { namespace ui {
SetDateTimeView::SetDateTimeView( SetDateTimeView::SetDateTimeView(
@ -172,10 +174,17 @@ AboutView::AboutView(NavigationView& nav) {
&text_title, &text_title,
&text_firmware, &text_firmware,
&text_cpld_hackrf, &text_cpld_hackrf,
&text_cpld_hackrf_status,
&button_ok, &button_ok,
} }); } });
button_ok.on_select = [&nav](Button&){ nav.pop(); }; button_ok.on_select = [&nav](Button&){ nav.pop(); };
if( cpld_hackrf_verify_eeprom() ) {
text_cpld_hackrf_status.set(" OK");
} else {
text_cpld_hackrf_status.set("BAD");
}
} }
void AboutView::focus() { void AboutView::focus() {

View File

@ -235,8 +235,13 @@ private:
}; };
Text text_cpld_hackrf { Text text_cpld_hackrf {
{ 0, 144, 240, 16 }, { 0, 144, 11*8, 16 },
"HackRF CPLD CRC 0x????????", "HackRF CPLD",
};
Text text_cpld_hackrf_status {
{ 240 - 3*8, 144, 3*8, 16 },
"???"
}; };
Button button_ok { Button button_ok {