added delayed error message when hackrf cpld initialization fails (#1887)

* added delayed error message when hackrf cpld initialization fails

* refactoring
This commit is contained in:
Bernd Herzog
2024-02-13 13:06:47 +01:00
committed by GitHub
parent 1139b22141
commit 918ec0574f
4 changed files with 45 additions and 19 deletions

View File

@@ -41,6 +41,15 @@
* guardrails on setting properties. */
namespace portapack {
enum class init_status_t {
INIT_SUCCESS,
INIT_NO_PORTAPACK,
INIT_PORTAPACK_CPLD_FAILED,
INIT_HACKRF_CPLD_FAILED,
};
extern const char* init_error;
extern portapack::IO io;
extern lcd::ILI9341 display;
@@ -65,7 +74,7 @@ extern TemperatureLogger temperature_logger;
void set_antenna_bias(const bool v);
bool get_antenna_bias();
bool init();
init_status_t init();
void shutdown(const bool leave_screen_on = false);
void setEventDispatcherToUSBSerial(EventDispatcher* evt);