OSCBoards.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. //
  2. // OSCBoards.h
  3. //
  4. //
  5. // Created by AdrianFreed on 5/26/13.
  6. //
  7. //
  8. #ifndef _OSCBoards_h
  9. #define _OSCBoards_h
  10. #if defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MKL26Z64__) || defined(__MK66FX1M0__)
  11. // Teensy 3.0 3.1 3.1LC 3.2 3.6
  12. #define BOARD_HAS_CAPACITANCE_SENSING
  13. #endif
  14. #if defined(__AVR_ATmega32U4__) || defined(__MKL26Z64__) || defined(__MK20DX128__)|| defined(__MK20DX256__) || defined(__MK66FX1M0__) || defined(__AVR_ATmega328_) || defined(__AVR_ATmega128__)
  15. #define BOARD_HAS_DIE_TEMPERATURE_SENSOR
  16. #endif
  17. #if defined(__AVR_ATmega32U4__) || defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK66FX1M0__) || defined(__MK66FX1M0__) || defined(__MKL26Z64__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) || defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega328_) || defined(__AVR_ATmega128__)
  18. #define BOARD_HAS_DIE_POWER_SUPPLY_MEASUREMENT
  19. #endif
  20. #if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) || defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega328_) || defined(__AVR_ATmega128__)
  21. #define BOARD_HAS_ANALOG_PULLUP
  22. #endif
  23. // missing specs for PIC32
  24. #if (defined(__PIC32MX__) || defined(__PIC32MZ__))
  25. #define NUM_ANALOG_INPUTS NUM_ANALOG_PINS
  26. #define NUM_DIGITAL_INPUTS NUM_DIGITAL_PINS
  27. #define LED_BUILTIN PIN_LED1
  28. #define BOARD_HAS_USB_SERIAL
  29. #define thisBoardsSerialUSB Serial
  30. #endif
  31. #if defined(_SAMD21_)
  32. #define BOARD_HAS_USB_SERIAL
  33. // Required for Serial on Zero based boards
  34. #if defined(ARDUINO_SAMD_ZERO)
  35. // Adafruit breaks with tradition here
  36. #define thisBoardsSerialUSB Serial
  37. #else
  38. #define thisBoardsSerialUSB SerialUSB
  39. #endif
  40. #endif
  41. // missing specs for Arduino Due
  42. #if defined(__SAM3X8E__)
  43. #define BOARD_HAS_USB_SERIAL
  44. // Required for Serial on Zero based boards
  45. #define thisBoardsSerialUSB SerialUSB
  46. #endif // defined(__SAM3X8E__)
  47. #ifndef analogInputToDigitalPin
  48. int analogInputToDigitalPin(int i);
  49. #endif
  50. #ifdef BOARD_HAS_DIE_TEMPERATURE_SENSOR
  51. float getTemperature();
  52. #endif
  53. #ifdef BOARD_HAS_DIE_POWER_SUPPLY_MEASUREMENT
  54. float getSupplyVoltage();
  55. #endif
  56. #endif