Adds rfswitch on Portduino (#7663)

* Initial attempt to get rfswitch working on Portduino

* Make portduino_config global
This commit is contained in:
Jonathan Bennett
2025-08-18 16:33:52 -05:00
committed by GitHub
parent 36e8dc74f4
commit 95200e8f6b
3 changed files with 58 additions and 10 deletions
+9 -1
View File
@@ -3,6 +3,8 @@
#include <map>
#include <unordered_map>
#include "LR11x0Interface.h"
#include "Module.h"
#include "platform/portduino/USBHal.h"
// Product strings for auto-configuration
@@ -126,4 +128,10 @@ bool loadConfig(const char *configPath);
static bool ends_with(std::string_view str, std::string_view suffix);
void getMacAddr(uint8_t *dmac);
bool MAC_from_string(std::string mac_str, uint8_t *dmac);
std::string exec(const char *cmd);
std::string exec(const char *cmd);
extern struct portduino_config_struct {
bool has_rfswitch_table = false;
uint32_t rfswitch_dio_pins[5] = {RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};
Module::RfSwitchMode_t rfswitch_table[8];
} portduino_config;