Skip to content

Commit

Permalink
tidy up (weak) attribute stuff and workaround AVR compiler issue (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikalhart-intel committed Oct 13, 2019
1 parent aad7f99 commit 018c057
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
13 changes: 9 additions & 4 deletions src/IridiumSBD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include <time.h>
#include "IridiumSBD.h"

bool ISBDCallback() __attribute__((weak)) { return true; }
void ISBDConsoleCallback(IridiumSBD *device, char c) __attribute__((weak)) { }
void ISBDDiagsCallback(IridiumSBD *device, char c) __attribute__((weak)) { }

bool ISBDCallback() __attribute__((weak));
void ISBDConsoleCallback(IridiumSBD *device, char c) __attribute__((weak));
void ISBDDiagsCallback(IridiumSBD *device, char c) __attribute__((weak));

bool ISBDCallback() { return true; }
void ISBDConsoleCallback(IridiumSBD *device, char c) { }
void ISBDDiagsCallback(IridiumSBD *device, char c) { }

// Power on the RockBLOCK or return from sleep
int IridiumSBD::begin()
Expand Down Expand Up @@ -277,7 +282,7 @@ int IridiumSBD::internalBegin()
}

// The usual initialization sequence
FlashString strings[3] = { F("ATE1\r"), F("AT&D0\r"), F("AT&K0\r") };
const char *strings[3] = { "ATE1\r", "AT&D0\r", "AT&K0\r" };
for (int i=0; i<3; ++i)
{
send(strings[i]);
Expand Down
1 change: 0 additions & 1 deletion src/IridiumSBD.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,3 @@ class IridiumSBD
int filteredavailable();
int filteredread();
};

0 comments on commit 018c057

Please sign in to comment.