Menu

#6 Add support for Teensy3.0/3.1 boards (ARM32bit)

v1.0_(example)
open
twaldock
teensy (1)
5
2014-09-21
2014-09-21
No

The current code doesn't support Teensy3.0/3.1 boards because they are ARM & are 32bit. Solution is:

In WiFlySerial.h, add:

// Teensy3.1 or Teensy3.0 MCU's
#if defined __MK20DX256__ or __MK20DX128__
#define PGM_READ_WORD(x) pgm_read_dword(x)
#else
#define PGM_READ_WORD(x) pgm_read_word(x)
#endif

In WiFlySerial.cpp:

change:

 strncpy_P(pBuffer, (char *)pgm_read_word(&(WiFlyDevice_string_table[StringIndex])), bufSize);

to:

 strncpy_P(pBuffer, (char *)PGM_READ_WORD(&(WiFlyDevice_string_table[StringIndex])), bufSize);

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.