mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-08-28 02:19:02 +00:00
Do hardware detection on init for shell info (#2975)
and reset gpio state afterward
This commit is contained in:
@@ -56,6 +56,10 @@ using asahi_kasei::ak4951::AK4951;
|
||||
#include "i2cdevmanager.hpp"
|
||||
#include "battery.hpp"
|
||||
|
||||
extern "C" {
|
||||
#include "platform_detect.h"
|
||||
}
|
||||
|
||||
namespace portapack {
|
||||
|
||||
const char* init_error = nullptr;
|
||||
@@ -505,6 +509,11 @@ init_status_t init() {
|
||||
|
||||
chThdSleepMilliseconds(100);
|
||||
|
||||
detect_hardware_platform();
|
||||
finalize_detect_hardware_platform();
|
||||
|
||||
chThdSleepMilliseconds(100);
|
||||
|
||||
configure_pins_portapack();
|
||||
|
||||
portapack::io.init();
|
||||
|
||||
@@ -131,7 +131,6 @@ static void cmd_info(BaseSequentialStream* chp, int argc, char* argv[]) {
|
||||
chprintf(chp, "Mayhem Version: %s\r\n", VERSION_STRING);
|
||||
#endif
|
||||
|
||||
detect_hardware_platform();
|
||||
board_rev_t revision = detected_revision();
|
||||
const char* revision_string = get_board_revision_string(revision);
|
||||
chprintf(chp, "HackRF Board Rev: %s\r\n", revision_string);
|
||||
|
||||
Reference in New Issue
Block a user