Teensy 4.1 core updated for C++20
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

před 8 roky
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef WProgram_h
  2. #define WProgram_h
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include <math.h>
  6. // some libraries and sketches depend on this
  7. // AVR stuff, assuming Arduino.h or WProgram.h
  8. // automatically includes it...
  9. #include <avr/pgmspace.h>
  10. #include <avr/interrupt.h>
  11. #include "avr_functions.h"
  12. #include "wiring.h"
  13. #include "HardwareSerial.h"
  14. #define DMAMEM __attribute__ ((section(".dmabuffers"), used))
  15. #define FASTRUN __attribute__ ((section(".fastrun"), noinline, noclone ))
  16. #ifdef __cplusplus
  17. #include "avr_emulation.h"
  18. #include "usb_serial.h"
  19. #include "usb_seremu.h"
  20. #include "usb_keyboard.h"
  21. #include "usb_mouse.h"
  22. #include "usb_joystick.h"
  23. #include "usb_midi.h"
  24. #include "usb_rawhid.h"
  25. #include "usb_flightsim.h"
  26. #include "usb_mtp.h"
  27. #include "usb_audio.h"
  28. #include "usb_undef.h" // do not allow usb_desc.h stuff to leak to user programs
  29. //#include "WCharacter.h"
  30. #include "WString.h"
  31. #include "elapsedMillis.h"
  32. #include "IntervalTimer.h"
  33. uint16_t makeWord(uint16_t w);
  34. uint16_t makeWord(byte h, byte l);
  35. #define word(...) makeWord(__VA_ARGS__)
  36. unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout = 1000000L);
  37. void tone(uint8_t pin, uint16_t frequency, uint32_t duration = 0);
  38. void noTone(uint8_t pin);
  39. // WMath prototypes
  40. uint32_t random(void);
  41. uint32_t random(uint32_t howbig);
  42. int32_t random(int32_t howsmall, int32_t howbig);
  43. void randomSeed(uint32_t newseed);
  44. void srandom(uint32_t newseed);
  45. long map(long, long, long, long, long);
  46. #include "pins_arduino.h"
  47. #endif // __cplusplus
  48. // Fast memcpy
  49. #if defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)
  50. #ifdef __cplusplus
  51. extern "C" {
  52. extern void *memcpy (void *dst, const void *src, size_t count);
  53. }
  54. #else
  55. extern void *memcpy (void *dst, const void *src, size_t count);
  56. #endif
  57. #endif
  58. #endif // WProgram_h