Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: DISCO-L072CZ-LRWAN1_LoRa_PingPong
Fork of SX1276GenericLib by
Revision 30:d7e36d83ec9d, committed 2017-04-27
- Comitter:
- Helmut Tschemernjak
- Date:
- Thu Apr 27 22:33:38 2017 +0200
- Parent:
- 29:a793ce879585
- Child:
- 31:e50929bd3f32
- Commit message:
- Added proper callback wrapper to overcome error messages
Changed in this revision
| sx1276/sx1276-hal.cpp | Show annotated file Show diff for this revision Revisions of this file |
| sx1276/sx1276.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/sx1276/sx1276-hal.cpp Thu Apr 27 18:20:59 2017 +0200
+++ b/sx1276/sx1276-hal.cpp Thu Apr 27 22:33:38 2017 +0200
@@ -162,11 +162,11 @@
dio3.mode( PullDown );
dio4.mode( PullDown );
#endif
- dio0.rise( this, static_cast< TriggerMB1xAS > ( irqHandlers[0] ) );
- dio1.rise( this, static_cast< TriggerMB1xAS > ( irqHandlers[1] ) );
- dio2.rise( this, static_cast< TriggerMB1xAS > ( irqHandlers[2] ) );
- dio3.rise( this, static_cast< TriggerMB1xAS > ( irqHandlers[3] ) );
- dio4.rise( this, static_cast< TriggerMB1xAS > ( irqHandlers[4] ) );
+ dio0.rise(callback(this, static_cast< TriggerMB1xAS > ( irqHandlers[0] )));
+ dio1.rise(callback(this, static_cast< TriggerMB1xAS > ( irqHandlers[1] )));
+ dio2.rise(callback(this, static_cast< TriggerMB1xAS > ( irqHandlers[2] )));
+ dio3.rise(callback(this, static_cast< TriggerMB1xAS > ( irqHandlers[3] )));
+ dio4.rise(callback(this, static_cast< TriggerMB1xAS > ( irqHandlers[4] )));
}
void SX1276MB1xAS::IoDeInit( void )
--- a/sx1276/sx1276.cpp Thu Apr 27 18:20:59 2017 +0200
+++ b/sx1276/sx1276.cpp Thu Apr 27 22:33:38 2017 +0200
@@ -882,7 +882,7 @@
this->settings.State = RF_RX_RUNNING;
if( timeout != 0 )
{
- rxTimeoutTimer.attach_us( this, &SX1276::OnTimeoutIrq, timeout );
+ rxTimeoutTimer.attach_us(callback(this, &SX1276::OnTimeoutIrq), timeout );
}
if( this->settings.Modem == MODEM_FSK )
@@ -891,7 +891,7 @@
if( rxContinuous == false )
{
- rxTimeoutSyncWord.attach_us( this, &SX1276::OnTimeoutIrq, ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
+ rxTimeoutSyncWord.attach_us(callback(this, &SX1276::OnTimeoutIrq), ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
( ( Read( REG_SYNCCONFIG ) &
~RF_SYNCCONFIG_SYNCSIZE_MASK ) +
1.0 ) + 10.0 ) /
@@ -969,7 +969,7 @@
}
this->settings.State = RF_TX_RUNNING;
- txTimeoutTimer.attach_us( this, &SX1276::OnTimeoutIrq, timeout );
+ txTimeoutTimer.attach_us(callback(this, &SX1276::OnTimeoutIrq), timeout );
SetOpMode( RF_OPMODE_TRANSMITTER );
}
@@ -1121,7 +1121,7 @@
{
// Continuous mode restart Rx chain
Write( REG_RXCONFIG, Read( REG_RXCONFIG ) | RF_RXCONFIG_RESTARTRXWITHOUTPLLLOCK );
- rxTimeoutSyncWord.attach_us( this, &SX1276::OnTimeoutIrq, ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
+ rxTimeoutSyncWord.attach_us(callback(this, &SX1276::OnTimeoutIrq), ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
( ( Read( REG_SYNCCONFIG ) &
~RF_SYNCCONFIG_SYNCSIZE_MASK ) +
1.0 ) + 10.0 ) /
@@ -1184,7 +1184,7 @@
{
// Continuous mode restart Rx chain
Write( REG_RXCONFIG, Read( REG_RXCONFIG ) | RF_RXCONFIG_RESTARTRXWITHOUTPLLLOCK );
- rxTimeoutSyncWord.attach_us( this, &SX1276::OnTimeoutIrq, ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
+ rxTimeoutSyncWord.attach_us(callback(this, &SX1276::OnTimeoutIrq), ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
( ( Read( REG_SYNCCONFIG ) &
~RF_SYNCCONFIG_SYNCSIZE_MASK ) +
1.0 ) + 10.0 ) /
@@ -1235,7 +1235,7 @@
{
// Continuous mode restart Rx chain
Write( REG_RXCONFIG, Read( REG_RXCONFIG ) | RF_RXCONFIG_RESTARTRXWITHOUTPLLLOCK );
- rxTimeoutSyncWord.attach_us( this, &SX1276::OnTimeoutIrq, ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
+ rxTimeoutSyncWord.attach_us(callback(this, &SX1276::OnTimeoutIrq), ceil( ( 8.0 * ( this->settings.Fsk.PreambleLen +
( ( Read( REG_SYNCCONFIG ) &
~RF_SYNCCONFIG_SYNCSIZE_MASK ) +
1.0 ) + 10.0 ) /
