mirror of
https://github.com/meshtastic/firmware.git
synced 2025-08-04 12:44:40 +00:00
Merge pull request #1499 from meshtastic/radiolib-fix
new radiolib version (use upstream)
This commit is contained in:
commit
bc05f98685
@ -61,7 +61,8 @@ framework = arduino
|
|||||||
lib_deps =
|
lib_deps =
|
||||||
${env.lib_deps}
|
${env.lib_deps}
|
||||||
; Portduino is using meshtastic fork for now
|
; Portduino is using meshtastic fork for now
|
||||||
https://github.com/jgromes/RadioLib.git#3df3b092ebf412bd0b26524e7b296733bd6a62f7
|
https://github.com/jgromes/RadioLib.git
|
||||||
|
|
||||||
build_flags = ${env.build_flags} -Os
|
build_flags = ${env.build_flags} -Os
|
||||||
# -DRADIOLIB_GODMODE
|
# -DRADIOLIB_GODMODE
|
||||||
build_src_filter = ${env.build_src_filter} -<portduino/>
|
build_src_filter = ${env.build_src_filter} -<portduino/>
|
||||||
@ -94,6 +95,7 @@ build_src_filter =
|
|||||||
${arduino_base.build_src_filter} -<nrf52/>
|
${arduino_base.build_src_filter} -<nrf52/>
|
||||||
upload_speed = 921600
|
upload_speed = 921600
|
||||||
debug_init_break = tbreak setup
|
debug_init_break = tbreak setup
|
||||||
|
|
||||||
# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging.
|
# Remove -DMYNEWT_VAL_BLE_HS_LOG_LVL=LOG_LEVEL_CRITICAL for low level BLE logging.
|
||||||
# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h
|
# See library directory for BLE logging possible values: .pio/libdeps/tbeam/NimBLE-Arduino/src/log_common/log_common.h
|
||||||
# This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h
|
# This overrides the BLE logging default of LOG_LEVEL_INFO (1) from: .pio/libdeps/tbeam/NimBLE-Arduino/src/esp_nimble_cfg.h
|
||||||
|
@ -11,11 +11,18 @@
|
|||||||
// FIXME, we default to 4MHz SPI, SPI mode 0, check if the datasheet says it can really do that
|
// FIXME, we default to 4MHz SPI, SPI mode 0, check if the datasheet says it can really do that
|
||||||
static SPISettings spiSettings(4000000, MSBFIRST, SPI_MODE0);
|
static SPISettings spiSettings(4000000, MSBFIRST, SPI_MODE0);
|
||||||
|
|
||||||
void LockingModule::SPItransfer(uint8_t cmd, uint8_t reg, uint8_t *dataOut, uint8_t *dataIn, uint8_t numBytes)
|
void LockingModule::SPIbeginTransaction()
|
||||||
{
|
{
|
||||||
concurrency::LockGuard g(spiLock);
|
spiLock->lock();
|
||||||
|
|
||||||
Module::SPItransfer(cmd, reg, dataOut, dataIn, numBytes);
|
Module::SPIbeginTransaction();
|
||||||
|
}
|
||||||
|
|
||||||
|
void LockingModule::SPIendTransaction()
|
||||||
|
{
|
||||||
|
spiLock->unlock();
|
||||||
|
|
||||||
|
Module::SPIendTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
RadioLibInterface::RadioLibInterface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy,
|
RadioLibInterface::RadioLibInterface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy,
|
||||||
|
@ -41,20 +41,8 @@ class LockingModule : public Module
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
void SPIbeginTransaction() override;
|
||||||
\brief SPI single transfer method.
|
void SPIendTransaction() override;
|
||||||
|
|
||||||
\param cmd SPI access command (read/write/burst/...).
|
|
||||||
|
|
||||||
\param reg Address of SPI register to transfer to/from.
|
|
||||||
|
|
||||||
\param dataOut Data that will be transfered from master to slave.
|
|
||||||
|
|
||||||
\param dataIn Data that was transfered from slave to master.
|
|
||||||
|
|
||||||
\param numBytes Number of bytes to transfer.
|
|
||||||
*/
|
|
||||||
virtual void SPItransfer(uint8_t cmd, uint8_t reg, uint8_t *dataOut, uint8_t *dataIn, uint8_t numBytes);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RadioLibInterface : public RadioInterface, protected concurrency::NotifiedWorkerThread
|
class RadioLibInterface : public RadioInterface, protected concurrency::NotifiedWorkerThread
|
||||||
|
Loading…
Reference in New Issue
Block a user