Teensy Specific #define and Their Use?

Status
Not open for further replies.

Eka

Well-known member
I'm wondering what all the Teensy 3.X specific #defines are. I want to modify a few libraries that I use for multiple different development boards and processors, and not have to maintain multiple copies. A listing of them on a reference web page would be a nice resource for developers.
 
Teensy 3.X specific #defines are.
Code:
#if defined(__MK20DX128__) || defined(__MK20DX256__) ||  defined(__MKL26Z64__) // Teensy 3.0 || Teensy 3.1/3.2 || Teensy LC

  if (_bus == 3) {
    _port = &Serial3;
  }
  else if (_bus == 2) {
    _port = &Serial2;
  }
  else {
    _port = &Serial1;
  }

#endif

#if defined(__MK64FX512__) || defined(__MK66FX1M0__) // Teensy 3.5 || Teensy 3.6

  if (_bus == 6) {
    _port = &Serial6;
  }
  else if (_bus == 5) {
    _port = &Serial5;
  }
  else if (_bus == 4) {
    _port = &Serial4;
  }
  else if (_bus == 3) {
    _port = &Serial3;
  }
  else if (_bus == 2) {
    _port = &Serial2;
  }
  else {
    _port = &Serial1;
  }

#endif
:)
 
Thanks! Lots of good stuff linked to in that thread. I must not have used the right search terms.
 
Status
Not open for further replies.
Back
Top