[PHY] Pass scan config by reference

This commit is contained in:
jgromes 2024-09-10 19:18:56 +02:00
parent 3696672f6f
commit c4a129ed74
8 changed files with 8 additions and 8 deletions

View file

@ -302,7 +302,7 @@ int16_t LR11x0::scanChannel() {
return(this->scanChannel(config));
}
int16_t LR11x0::scanChannel(ChannelScanConfig_t config) {
int16_t LR11x0::scanChannel(const ChannelScanConfig_t &config) {
// set mode to CAD
int state = startChannelScan(config);
RADIOLIB_ASSERT(state);

View file

@ -847,7 +847,7 @@ class LR11x0: public PhysicalLayer {
\param config CAD configuration structure.
\returns \ref status_codes
*/
int16_t scanChannel(ChannelScanConfig_t config) override;
int16_t scanChannel(const ChannelScanConfig_t &config) override;
/*!
\brief Sets the module to standby mode (overload for PhysicalLayer compatibility, uses 13 MHz RC oscillator).

View file

@ -449,7 +449,7 @@ int16_t SX126x::scanChannel() {
return(this->scanChannel(config));
}
int16_t SX126x::scanChannel(ChannelScanConfig_t config) {
int16_t SX126x::scanChannel(const ChannelScanConfig_t &config) {
// set mode to CAD
int state = startChannelScan(config);
RADIOLIB_ASSERT(state);

View file

@ -542,7 +542,7 @@ class SX126x: public PhysicalLayer {
\param config CAD configuration structure.
\returns \ref status_codes
*/
int16_t scanChannel(ChannelScanConfig_t config) override;
int16_t scanChannel(const ChannelScanConfig_t &config) override;
/*!
\brief Sets the module to sleep mode. To wake the device up, call standby().

View file

@ -435,7 +435,7 @@ int16_t SX128x::scanChannel() {
return(this->scanChannel(config));
}
int16_t SX128x::scanChannel(ChannelScanConfig_t config) {
int16_t SX128x::scanChannel(const ChannelScanConfig_t &config) {
// set mode to CAD
int16_t state = startChannelScan(config);
RADIOLIB_ASSERT(state);

View file

@ -462,7 +462,7 @@ class SX128x: public PhysicalLayer {
\param config CAD configuration structure.
\returns \ref status_codes
*/
int16_t scanChannel(ChannelScanConfig_t config) override;
int16_t scanChannel(const ChannelScanConfig_t &config) override;
/*!
\brief Sets the module to sleep mode. To wake the device up, call standby().

View file

@ -369,7 +369,7 @@ int16_t PhysicalLayer::scanChannel() {
return(RADIOLIB_ERR_UNSUPPORTED);
}
int16_t PhysicalLayer::scanChannel(ChannelScanConfig_t config) {
int16_t PhysicalLayer::scanChannel(const ChannelScanConfig_t &config) {
(void)config;
return(RADIOLIB_ERR_UNSUPPORTED);
}

View file

@ -513,7 +513,7 @@ class PhysicalLayer {
\returns RADIOLIB_CHANNEL_FREE when channel is free,
RADIOLIB_PREAMBLE_DETECTEDwhen occupied or other \ref status_codes.
*/
virtual int16_t scanChannel(ChannelScanConfig_t config);
virtual int16_t scanChannel(const ChannelScanConfig_t &config);
/*!
\brief Get truly random number in range 0 - max.