mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-14 02:29:29 +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 "i2cdevmanager.hpp"
|
||||||
#include "battery.hpp"
|
#include "battery.hpp"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
#include "platform_detect.h"
|
||||||
|
}
|
||||||
|
|
||||||
namespace portapack {
|
namespace portapack {
|
||||||
|
|
||||||
const char* init_error = nullptr;
|
const char* init_error = nullptr;
|
||||||
@@ -505,6 +509,11 @@ init_status_t init() {
|
|||||||
|
|
||||||
chThdSleepMilliseconds(100);
|
chThdSleepMilliseconds(100);
|
||||||
|
|
||||||
|
detect_hardware_platform();
|
||||||
|
finalize_detect_hardware_platform();
|
||||||
|
|
||||||
|
chThdSleepMilliseconds(100);
|
||||||
|
|
||||||
configure_pins_portapack();
|
configure_pins_portapack();
|
||||||
|
|
||||||
portapack::io.init();
|
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);
|
chprintf(chp, "Mayhem Version: %s\r\n", VERSION_STRING);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
detect_hardware_platform();
|
|
||||||
board_rev_t revision = detected_revision();
|
board_rev_t revision = detected_revision();
|
||||||
const char* revision_string = get_board_revision_string(revision);
|
const char* revision_string = get_board_revision_string(revision);
|
||||||
chprintf(chp, "HackRF Board Rev: %s\r\n", revision_string);
|
chprintf(chp, "HackRF Board Rev: %s\r\n", revision_string);
|
||||||
|
|||||||
Reference in New Issue
Block a user