Added ESP32-WROOM-DA module to boards.txt (#6361)

Added dual antenna configuration based on the module selection
Added warning to the example on how to use the DA
This commit is contained in:
Pedro Minatel
2022-03-02 13:17:18 +00:00
committed by GitHub
parent c2e5957f35
commit 683dbf3b1b
5 changed files with 224 additions and 2 deletions

View File

@ -1061,6 +1061,14 @@ bool WiFiGenericClass::mode(wifi_mode_t m)
if(!espWiFiStart()){
return false;
}
#ifdef BOARD_HAS_DUAL_ANTENNA
if(!setDualAntennaConfig(ANT1, ANT2, WIFI_RX_ANT_AUTO, WIFI_TX_ANT_AUTO)){
log_e("Dual Antenna Config failed!");
return false;
}
#endif
return true;
}

View File

@ -186,7 +186,7 @@ class WiFiGenericClass
bool initiateFTM(uint8_t frm_count=16, uint16_t burst_period=2, uint8_t channel=1, const uint8_t * mac=NULL);
bool setDualAntennaConfig(uint8_t gpio_ant1, uint8_t gpio_ant2, wifi_rx_ant_t rx_mode, wifi_tx_ant_t tx_mode);
static bool setDualAntennaConfig(uint8_t gpio_ant1, uint8_t gpio_ant2, wifi_rx_ant_t rx_mode, wifi_tx_ant_t tx_mode);
static const char * getHostname();
static bool setHostname(const char * hostname);