Browse Source

move source under core/ directory

- adds a "namespace" for each header
- makes clear where a header is expected to come from
- better facilitates explicit includes
main
John Robinson 3 years ago
parent
commit
20c3d93b92
No known key found for this signature in database
100 changed files with 149 additions and 150 deletions
  1. +2
    -2
      include/core/Arduino.h
  2. +0
    -0
      include/core/AudioStream.h
  3. +3
    -3
      include/core/Client.h
  4. +1
    -1
      include/core/DMAChannel.h
  5. +1
    -1
      include/core/EventResponder.h
  6. +1
    -1
      include/core/FS.h
  7. +1
    -1
      include/core/HardwareSerial.h
  8. +2
    -2
      include/core/IPAddress.h
  9. +1
    -1
      include/core/IntervalTimer.h
  10. +0
    -0
      include/core/Keyboard.h
  11. +1
    -1
      include/core/MIDIUSB.h
  12. +0
    -0
      include/core/Mouse.h
  13. +3
    -3
      include/core/Print.h
  14. +0
    -0
      include/core/Printable.h
  15. +1
    -1
      include/core/Server.h
  16. +1
    -1
      include/core/Stream.h
  17. +2
    -2
      include/core/Udp.h
  18. +0
    -0
      include/core/WCharacter.h
  19. +24
    -24
      include/core/WProgram.h
  20. +2
    -2
      include/core/WString.h
  21. +0
    -0
      include/core/arm_common_tables.h
  22. +0
    -0
      include/core/arm_const_structs.h
  23. +0
    -0
      include/core/arm_math.h
  24. +1
    -1
      include/core/avr/eeprom.h
  25. +0
    -0
      include/core/avr/interrupt.h
  26. +1
    -1
      include/core/avr/io.h
  27. +0
    -0
      include/core/avr/pgmspace.h
  28. +0
    -0
      include/core/avr/power.h
  29. +0
    -0
      include/core/avr/sleep.h
  30. +0
    -0
      include/core/avr/wdt.h
  31. +3
    -3
      include/core/avr_emulation.h
  32. +0
    -0
      include/core/avr_functions.h
  33. +0
    -0
      include/core/binary.h
  34. +0
    -0
      include/core/cmsis_compiler.h
  35. +1
    -1
      include/core/cmsis_gcc.h
  36. +1
    -1
      include/core/core_cm7.h
  37. +0
    -0
      include/core/core_cmInstr.h
  38. +0
    -0
      include/core/core_id.h
  39. +2
    -2
      include/core/core_pins.h
  40. +0
    -0
      include/core/debug/printf.h
  41. +2
    -2
      include/core/elapsedMillis.h
  42. +1
    -1
      include/core/imxrt.h
  43. +0
    -0
      include/core/irq.h
  44. +1
    -1
      include/core/keylayouts.h
  45. +1
    -1
      include/core/math_helper.h
  46. +1
    -1
      include/core/pgmspace.h
  47. +0
    -0
      include/core/pins_arduino.h
  48. +0
    -0
      include/core/smalloc.h
  49. +1
    -1
      include/core/smalloc_i.h
  50. +2
    -2
      include/core/usb_audio.h
  51. +0
    -0
      include/core/usb_desc.h
  52. +1
    -1
      include/core/usb_dev.h
  53. +3
    -3
      include/core/usb_flightsim.h
  54. +1
    -1
      include/core/usb_joystick.h
  55. +3
    -3
      include/core/usb_keyboard.h
  56. +1
    -1
      include/core/usb_midi.h
  57. +1
    -1
      include/core/usb_mouse.h
  58. +1
    -1
      include/core/usb_mtp.h
  59. +0
    -0
      include/core/usb_names.h
  60. +1
    -1
      include/core/usb_rawhid.h
  61. +3
    -3
      include/core/usb_seremu.h
  62. +2
    -2
      include/core/usb_serial.h
  63. +1
    -1
      include/core/usb_touch.h
  64. +0
    -0
      include/core/util/atomic.h
  65. +0
    -0
      include/core/util/crc16.h
  66. +0
    -0
      include/core/util/delay.h
  67. +0
    -0
      include/core/util/parity.h
  68. +3
    -3
      include/core/wiring.h
  69. +0
    -0
      include/core/wiring_private.h
  70. +2
    -3
      src/core/AudioStream.cpp
  71. +1
    -1
      src/core/DMAChannel.cpp
  72. +2
    -2
      src/core/EventResponder.cpp
  73. +4
    -4
      src/core/HardwareSerial.cpp
  74. +2
    -2
      src/core/HardwareSerial1.cpp
  75. +2
    -2
      src/core/HardwareSerial2.cpp
  76. +2
    -2
      src/core/HardwareSerial3.cpp
  77. +2
    -2
      src/core/HardwareSerial4.cpp
  78. +2
    -2
      src/core/HardwareSerial5.cpp
  79. +2
    -2
      src/core/HardwareSerial6.cpp
  80. +2
    -2
      src/core/HardwareSerial7.cpp
  81. +2
    -2
      src/core/HardwareSerial8.cpp
  82. +2
    -2
      src/core/IPAddress.cpp
  83. +2
    -2
      src/core/IntervalTimer.cpp
  84. +2
    -2
      src/core/Print.cpp
  85. +2
    -2
      src/core/Stream.cpp
  86. +1
    -1
      src/core/Tone.cpp
  87. +0
    -0
      src/core/WMath.cpp
  88. +1
    -1
      src/core/WString.cpp
  89. +4
    -4
      src/core/analog.c
  90. +1
    -1
      src/core/bootdata.c
  91. +3
    -3
      src/core/clockspeed.c
  92. +8
    -8
      src/core/debugprintf.c
  93. +2
    -2
      src/core/delay.c
  94. +1
    -1
      src/core/digital.c
  95. +3
    -3
      src/core/eeprom.c
  96. +2
    -2
      src/core/extmem.c
  97. +3
    -3
      src/core/interrupt.c
  98. +2
    -2
      src/core/keylayouts.c
  99. +0
    -0
      src/core/libc.c
  100. +0
    -0
      src/core/main.cpp

include/Arduino.h → include/core/Arduino.h View File

#ifndef Arduino_h #ifndef Arduino_h
#define Arduino_h #define Arduino_h


#include "WProgram.h"
#include "pins_arduino.h"
#include "core/WProgram.h"
#include "core/pins_arduino.h"


#endif #endif

include/AudioStream.h → include/core/AudioStream.h View File


include/Client.h → include/core/Client.h View File



#ifndef client_h #ifndef client_h
#define client_h #define client_h
#include "Print.h"
#include "Stream.h"
#include "IPAddress.h"
#include "core/Print.h"
#include "core/Stream.h"
#include "core/IPAddress.h"


class Client : public Stream { class Client : public Stream {



include/DMAChannel.h → include/core/DMAChannel.h View File

#ifndef DMAChannel_h_ #ifndef DMAChannel_h_
#define DMAChannel_h_ #define DMAChannel_h_


#include "imxrt.h"
#include "core/imxrt.h"


// Discussion about DMAChannel is here: // Discussion about DMAChannel is here:
// http://forum.pjrc.com/threads/25778-Could-there-be-something-like-an-ISR-template-function/page3 // http://forum.pjrc.com/threads/25778-Could-there-be-something-like-an-ISR-template-function/page3

include/EventResponder.h → include/core/EventResponder.h View File

#if !defined(EventResponder_h) && defined(__cplusplus) #if !defined(EventResponder_h) && defined(__cplusplus)
#define EventResponder_h #define EventResponder_h


#include <Arduino.h>
#include <core/Arduino.h>


/* EventResponder lets you control how your program responds to an event. /* EventResponder lets you control how your program responds to an event.
* Imagine a basketball or football (American soccer) player who gets the * Imagine a basketball or football (American soccer) player who gets the

include/FS.h → include/core/FS.h View File

#define FS_H #define FS_H
#ifdef __cplusplus #ifdef __cplusplus


#include <Arduino.h>
#include <core/Arduino.h>


#define FILE_READ 0 #define FILE_READ 0
#define FILE_WRITE 1 #define FILE_WRITE 1

include/HardwareSerial.h → include/core/HardwareSerial.h View File

#ifndef HardwareSerial_h #ifndef HardwareSerial_h
#define HardwareSerial_h #define HardwareSerial_h


#include "imxrt.h"
#include "core/imxrt.h"


// Uncomment to enable 9 bit formats. These are default disabled to save memory. // Uncomment to enable 9 bit formats. These are default disabled to save memory.
//#define SERIAL_9BIT_SUPPORT //#define SERIAL_9BIT_SUPPORT

include/IPAddress.h → include/core/IPAddress.h View File

#ifndef IPAddress_h #ifndef IPAddress_h
#define IPAddress_h #define IPAddress_h


#include <Printable.h>
#include <WString.h>
#include <core/Printable.h>
#include <core/WString.h>


// A class to make it easier to handle and pass around IP addresses // A class to make it easier to handle and pass around IP addresses



include/IntervalTimer.h → include/core/IntervalTimer.h View File

#define __INTERVALTIMER_H__ #define __INTERVALTIMER_H__


#include <stddef.h> #include <stddef.h>
#include "imxrt.h"
#include "core/imxrt.h"


#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

include/Keyboard.h → include/core/Keyboard.h View File


include/MIDIUSB.h → include/core/MIDIUSB.h View File



// For compatibility with Arduino's MIDIUSB library // For compatibility with Arduino's MIDIUSB library


#include "usb_midi.h"
#include "core/usb_midi.h"


#ifdef __cplusplus #ifdef __cplusplus
#if !defined(USB_MIDI) && !defined(USB_MIDI4) && !defined(USB_MIDI16) && !defined(USB_MIDI_SERIAL) && !defined(USB_MIDI4_SERIAL) && !defined(USB_MIDI16_SERIAL) && !defined(USB_MIDI_AUDIO_SERIAL) && !defined(USB_MIDI16_AUDIO_SERIAL) && !defined(USB_EVERYTHING) #if !defined(USB_MIDI) && !defined(USB_MIDI4) && !defined(USB_MIDI16) && !defined(USB_MIDI_SERIAL) && !defined(USB_MIDI4_SERIAL) && !defined(USB_MIDI16_SERIAL) && !defined(USB_MIDI_AUDIO_SERIAL) && !defined(USB_MIDI16_AUDIO_SERIAL) && !defined(USB_EVERYTHING)

include/Mouse.h → include/core/Mouse.h View File


include/Print.h → include/core/Print.h View File

#include <inttypes.h> #include <inttypes.h>
#include <stdio.h> // for size_t - gives sprintf and other stuff to all sketches & libs #include <stdio.h> // for size_t - gives sprintf and other stuff to all sketches & libs
#include <stdarg.h> #include <stdarg.h>
#include "core_id.h"
#include "WString.h"
#include "Printable.h"
#include "core/core_id.h"
#include "core/WString.h"
#include "core/Printable.h"


#define DEC 10 #define DEC 10
#define HEX 16 #define HEX 16

include/Printable.h → include/core/Printable.h View File


include/Server.h → include/core/Server.h View File

#ifndef server_h #ifndef server_h
#define server_h #define server_h


#include "Print.h"
#include "core/Print.h"


class Server : public Print { class Server : public Print {
public: public:

include/Stream.h → include/core/Stream.h View File

#define Stream_h #define Stream_h


#include <inttypes.h> #include <inttypes.h>
#include "Print.h"
#include "core/Print.h"


class Stream : public Print class Stream : public Print
{ {

include/Udp.h → include/core/Udp.h View File

#ifndef udp_h #ifndef udp_h
#define udp_h #define udp_h


#include <Stream.h>
#include <IPAddress.h>
#include <core/Stream.h>
#include <core/IPAddress.h>


class UDP : public Stream { class UDP : public Stream {



include/WCharacter.h → include/core/WCharacter.h View File


include/WProgram.h → include/core/WProgram.h View File

// some libraries and sketches depend on this // some libraries and sketches depend on this
// AVR stuff, assuming Arduino.h or WProgram.h // AVR stuff, assuming Arduino.h or WProgram.h
// automatically includes it... // automatically includes it...
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include <core/avr/pgmspace.h>
#include <core/avr/interrupt.h>


#include "avr_functions.h"
#include "wiring.h"
#include "HardwareSerial.h"
#include "core/avr_functions.h"
#include "core/wiring.h"
#include "core/HardwareSerial.h"


#ifdef __cplusplus #ifdef __cplusplus


#include "avr_emulation.h"
#include "usb_serial.h"
#include "usb_seremu.h"
#include "usb_keyboard.h"
#include "usb_mouse.h"
#include "usb_joystick.h"
#include "usb_midi.h"
#include "usb_rawhid.h"
#include "usb_flightsim.h"
//#include "usb_mtp.h"
#include "usb_audio.h"
#include "usb_touch.h"
//#include "usb_undef.h" // do not allow usb_desc.h stuff to leak to user programs
#include "WCharacter.h"
#include "WString.h"
#include "elapsedMillis.h"
#include "IntervalTimer.h"
#include "core/avr_emulation.h"
#include "core/usb_serial.h"
#include "core/usb_seremu.h"
#include "core/usb_keyboard.h"
#include "core/usb_mouse.h"
#include "core/usb_joystick.h"
#include "core/usb_midi.h"
#include "core/usb_rawhid.h"
#include "core/usb_flightsim.h"
//#include "core/usb_mtp.h"
#include "core/usb_audio.h"
#include "core/usb_touch.h"
//#include "core/usb_undef.h" // do not allow usb_desc.h stuff to leak to user programs
#include "core/WCharacter.h"
#include "core/WString.h"
#include "core/elapsedMillis.h"
#include "core/IntervalTimer.h"


uint16_t makeWord(uint16_t w); uint16_t makeWord(uint16_t w);
uint16_t makeWord(byte h, byte l); uint16_t makeWord(byte h, byte l);
void randomSeed(uint32_t newseed); void randomSeed(uint32_t newseed);
void srandom(unsigned int newseed); void srandom(unsigned int newseed);


#include "pins_arduino.h"
#include "core/pins_arduino.h"


#endif // __cplusplus #endif // __cplusplus



include/WString.h → include/core/WString.h View File

#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include "avr_functions.h"
#include "core/avr_functions.h"


// Not needed here, but some libs assume WString.h or Print.h // Not needed here, but some libs assume WString.h or Print.h
// gives them PROGMEM and other AVR stuff. // gives them PROGMEM and other AVR stuff.
#include "avr/pgmspace.h"
#include "core/avr/pgmspace.h"


// When compiling programs with this class, the following gcc parameters // When compiling programs with this class, the following gcc parameters
// dramatically increase performance and memory (RAM) efficiency, typically // dramatically increase performance and memory (RAM) efficiency, typically

include/arm_common_tables.h → include/core/arm_common_tables.h View File


include/arm_const_structs.h → include/core/arm_const_structs.h View File


include/arm_math.h → include/core/arm_math.h View File


include/avr/eeprom.h → include/core/avr/eeprom.h View File

#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>


#include "avr_functions.h"
#include "core/avr_functions.h"


#if defined(ARDUINO_TEENSY40) #if defined(ARDUINO_TEENSY40)
#define E2END 0x437 #define E2END 0x437

include/avr/interrupt.h → include/core/avr/interrupt.h View File


include/avr/io.h → include/core/avr/io.h View File

* THE SOFTWARE. * THE SOFTWARE.
*/ */


#include "../avr_emulation.h"
#include "core/avr_emulation.h"

include/avr/pgmspace.h → include/core/avr/pgmspace.h View File


include/avr/power.h → include/core/avr/power.h View File


include/avr/sleep.h → include/core/avr/sleep.h View File


include/avr/wdt.h → include/core/avr/wdt.h View File


include/avr_emulation.h → include/core/avr_emulation.h View File

#ifndef _avr_emulation_h_ #ifndef _avr_emulation_h_
#define _avr_emulation_h_ #define _avr_emulation_h_


#include "imxrt.h"
#include "core_pins.h"
#include "pins_arduino.h"
#include "core/imxrt.h"
#include "core/core_pins.h"
#include "core/pins_arduino.h"


#ifdef __cplusplus #ifdef __cplusplus



include/avr_functions.h → include/core/avr_functions.h View File


include/binary.h → include/core/binary.h View File


include/cmsis_compiler.h → include/core/cmsis_compiler.h View File


include/cmsis_gcc.h → include/core/cmsis_gcc.h View File

#endif #endif


#ifdef TEENSYDUINO #ifdef TEENSYDUINO
#include <irq.h>
#include <core/irq.h>
#endif #endif


/* CMSIS compiler specific defines */ /* CMSIS compiler specific defines */

include/core_cm7.h → include/core/core_cm7.h View File

@{ @{
*/ */


#include "cmsis_version.h"
#include "core/cmsis_version.h"


/* CMSIS CM7 definitions */ /* CMSIS CM7 definitions */
#define __CM7_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ #define __CM7_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */

include/core_cmInstr.h → include/core/core_cmInstr.h View File


include/core_id.h → include/core/core_id.h View File


include/core_pins.h → include/core/core_pins.h View File

*/ */


#pragma once #pragma once
#include "imxrt.h"
#include "pins_arduino.h"
#include "core/imxrt.h"
#include "core/pins_arduino.h"


#define HIGH 1 #define HIGH 1
#define LOW 0 #define LOW 0

include/debug/printf.h → include/core/debug/printf.h View File


include/elapsedMillis.h → include/core/elapsedMillis.h View File

#ifdef __cplusplus #ifdef __cplusplus


#if ARDUINO >= 100 #if ARDUINO >= 100
#include "Arduino.h"
#include "core/Arduino.h"
#else #else
#include "WProgram.h"
#include "core/WProgram.h"
#endif #endif


class elapsedMillis class elapsedMillis

include/imxrt.h → include/core/imxrt.h View File

#pragma once #pragma once
#include <stdint.h> #include <stdint.h>
#include <irq.h>
#include <core/irq.h>


// Definitions based these documents: // Definitions based these documents:
// i.MX RT1060 Reference Manual, Rev. 2, 12/2019 - https://www.pjrc.com/teensy/datasheets.html // i.MX RT1060 Reference Manual, Rev. 2, 12/2019 - https://www.pjrc.com/teensy/datasheets.html

include/irq.h → include/core/irq.h View File


include/keylayouts.h → include/core/keylayouts.h View File

#define KEYLAYOUTS_H__ #define KEYLAYOUTS_H__


#include <stdint.h> #include <stdint.h>
#include <avr/pgmspace.h>
#include <core/avr/pgmspace.h>


#ifdef __cplusplus #ifdef __cplusplus
extern "C"{ extern "C"{

include/math_helper.h → include/core/math_helper.h View File

* -------------------------------------------------------------------- */ * -------------------------------------------------------------------- */




#include "arm_math.h"
#include "core/arm_math.h"


#ifndef MATH_HELPER_H #ifndef MATH_HELPER_H
#define MATH_HELPER_H #define MATH_HELPER_H

include/pgmspace.h → include/core/pgmspace.h View File

// For compatibility with some ESP8266 programs // For compatibility with some ESP8266 programs
#include <avr/pgmspace.h>
#include <core/avr/pgmspace.h>

include/pins_arduino.h → include/core/pins_arduino.h View File


include/smalloc.h → include/core/smalloc.h View File


include/smalloc_i.h → include/core/smalloc_i.h View File

#ifndef _SMALLOC_I_H #ifndef _SMALLOC_I_H
#define _SMALLOC_I_H #define _SMALLOC_I_H


#include "smalloc.h"
#include "core/smalloc.h"
#include <string.h> #include <string.h>
#include <limits.h> #include <limits.h>
#include <errno.h> #include <errno.h>

include/usb_audio.h → include/core/usb_audio.h View File



#pragma once #pragma once


#include "usb_desc.h"
#include "core/usb_desc.h"
#ifdef AUDIO_INTERFACE #ifdef AUDIO_INTERFACE


#define FEATURE_MAX_VOLUME 0xFFF // volume accepted from 0 to 0xFFF #define FEATURE_MAX_VOLUME 0xFFF // volume accepted from 0 to 0xFFF
}; };


#ifdef __cplusplus #ifdef __cplusplus
#include "AudioStream.h"
#include "core/AudioStream.h"


class AudioInputUSB : public AudioStream class AudioInputUSB : public AudioStream
{ {

include/usb_desc.h → include/core/usb_desc.h View File


include/usb_dev.h → include/core/usb_dev.h View File

#pragma once #pragma once
#include "imxrt.h"
#include "core/imxrt.h"


#if !defined(USB_DISABLED) #if !defined(USB_DISABLED)



include/usb_flightsim.h → include/core/usb_flightsim.h View File

#ifndef USBflightsim_h_ #ifndef USBflightsim_h_
#define USBflightsim_h_ #define USBflightsim_h_


#include "usb_desc.h"
#include "core/usb_desc.h"


#if defined(FLIGHTSIM_INTERFACE) #if defined(FLIGHTSIM_INTERFACE)


#ifdef __cplusplus #ifdef __cplusplus


#include <inttypes.h> #include <inttypes.h>
#include "elapsedMillis.h"
#include "core/elapsedMillis.h"


// workaround for elapsedMillis.h bringing in WProgram.h which brings usb_undef.h // workaround for elapsedMillis.h bringing in WProgram.h which brings usb_undef.h
//#undef USB_DESC_LIST_DEFINE //#undef USB_DESC_LIST_DEFINE
//#include "usb_desc.h"
//#include "core/usb_desc.h"


class FlightSimClass; class FlightSimClass;
class FlightSimCommand; class FlightSimCommand;

include/usb_joystick.h → include/core/usb_joystick.h View File

#ifndef USBjoystick_h_ #ifndef USBjoystick_h_
#define USBjoystick_h_ #define USBjoystick_h_


#include "usb_desc.h"
#include "core/usb_desc.h"


#if defined(JOYSTICK_INTERFACE) #if defined(JOYSTICK_INTERFACE)



include/usb_keyboard.h → include/core/usb_keyboard.h View File



#pragma once #pragma once


#include "usb_desc.h"
#include "core/usb_desc.h"


#include "keylayouts.h"
#include "core/keylayouts.h"


#if defined(KEYBOARD_INTERFACE) #if defined(KEYBOARD_INTERFACE)




// C++ interface // C++ interface
#ifdef __cplusplus #ifdef __cplusplus
#include "Stream.h"
#include "core/Stream.h"
class usb_keyboard_class : public Print class usb_keyboard_class : public Print
{ {
public: public:

include/usb_midi.h → include/core/usb_midi.h View File

#ifndef USBmidi_h_ #ifndef USBmidi_h_
#define USBmidi_h_ #define USBmidi_h_


#include "usb_desc.h"
#include "core/usb_desc.h"


#if defined(MIDI_INTERFACE) #if defined(MIDI_INTERFACE)



include/usb_mouse.h → include/core/usb_mouse.h View File

#ifndef USBmouse_h_ #ifndef USBmouse_h_
#define USBmouse_h_ #define USBmouse_h_


#include "usb_desc.h"
#include "core/usb_desc.h"


#if defined(MOUSE_INTERFACE) #if defined(MOUSE_INTERFACE)



include/usb_mtp.h → include/core/usb_mtp.h View File



#pragma once #pragma once


#include "usb_desc.h"
#include "core/usb_desc.h"


#if defined(MTP_INTERFACE) #if defined(MTP_INTERFACE)



include/usb_names.h → include/core/usb_names.h View File


include/usb_rawhid.h → include/core/usb_rawhid.h View File



#pragma once #pragma once


#include "usb_desc.h"
#include "core/usb_desc.h"


#if defined(RAWHID_INTERFACE) #if defined(RAWHID_INTERFACE)



include/usb_seremu.h → include/core/usb_seremu.h View File



#pragma once #pragma once


#include "usb_desc.h"
#include "core/usb_desc.h"


#if defined(SEREMU_INTERFACE) && !defined(CDC_STATUS_INTERFACE) && !defined(CDC_DATA_INTERFACE) #if defined(SEREMU_INTERFACE) && !defined(CDC_STATUS_INTERFACE) && !defined(CDC_DATA_INTERFACE)




// C++ interface // C++ interface
#ifdef __cplusplus #ifdef __cplusplus
#include "Stream.h"
#include "core/Stream.h"
class usb_seremu_class : public Stream class usb_seremu_class : public Stream
{ {
public: public:
#if 0 #if 0
// Allow Arduino programs using Serial to compile, but Serial will do nothing. // Allow Arduino programs using Serial to compile, but Serial will do nothing.
#ifdef __cplusplus #ifdef __cplusplus
#include "Stream.h"
#include "core/Stream.h"
class usb_seremu_class : public Stream class usb_seremu_class : public Stream
{ {
public: public:

include/usb_serial.h → include/core/usb_serial.h View File



#pragma once #pragma once


#include "usb_desc.h"
#include "core/usb_desc.h"
#include <stdint.h> #include <stdint.h>


#if (defined(CDC_STATUS_INTERFACE) && defined(CDC_DATA_INTERFACE)) || defined(USB_DISABLED) #if (defined(CDC_STATUS_INTERFACE) && defined(CDC_DATA_INTERFACE)) || defined(USB_DISABLED)


// C++ interface // C++ interface
#ifdef __cplusplus #ifdef __cplusplus
#include "Stream.h"
#include "core/Stream.h"
class usb_serial_class : public Stream class usb_serial_class : public Stream
{ {
public: public:

include/usb_touch.h → include/core/usb_touch.h View File

#ifndef USBtouchscreen_h_ #ifndef USBtouchscreen_h_
#define USBtouchscreen_h_ #define USBtouchscreen_h_


#include "usb_desc.h"
#include "core/usb_desc.h"


#if defined(MULTITOUCH_INTERFACE) #if defined(MULTITOUCH_INTERFACE)



include/util/atomic.h → include/core/util/atomic.h View File


include/util/crc16.h → include/core/util/crc16.h View File


include/util/delay.h → include/core/util/delay.h View File


include/util/parity.h → include/core/util/parity.h View File


include/wiring.h → include/core/wiring.h View File

#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdbool.h> #include <stdbool.h>
#include "binary.h"
#include "core_id.h"
#include "core_pins.h"
#include "core/binary.h"
#include "core/core_id.h"
#include "core/core_pins.h"


// type_traits interferes with min() and other defines // type_traits interferes with min() and other defines
// include it early, so we can define these later // include it early, so we can define these later

include/wiring_private.h → include/core/wiring_private.h View File


src/AudioStream.cpp → src/core/AudioStream.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */



#include <Arduino.h>
#include "AudioStream.h"
#include <core/Arduino.h>
#include "core/AudioStream.h"


#if defined(__IMXRT1062__) #if defined(__IMXRT1062__)
#define MAX_AUDIO_MEMORY 229376 #define MAX_AUDIO_MEMORY 229376

src/DMAChannel.cpp → src/core/DMAChannel.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */


#include "DMAChannel.h"
#include "core/DMAChannel.h"


// only 16 channels supported, because we don't handle sharing interrupts // only 16 channels supported, because we don't handle sharing interrupts
#define DMA_MAX_CHANNELS 16 #define DMA_MAX_CHANNELS 16

src/EventResponder.cpp → src/core/EventResponder.cpp View File

* https://forum.pjrc.com/threads/44723-Arduino-Events * https://forum.pjrc.com/threads/44723-Arduino-Events
*/ */


#include <Arduino.h>
#include "EventResponder.h"
#include <core/Arduino.h>
#include "core/EventResponder.h"


EventResponder * EventResponder::firstYield = nullptr; EventResponder * EventResponder::firstYield = nullptr;
EventResponder * EventResponder::lastYield = nullptr; EventResponder * EventResponder::lastYield = nullptr;

src/HardwareSerial.cpp → src/core/HardwareSerial.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */


#include "HardwareSerial.h"
#include "core_pins.h"
#include "Arduino.h"
//#include "debug/printf.h"
#include "core/HardwareSerial.h"
#include "core/core_pins.h"
#include "core/Arduino.h"
//#include "core/debug/printf.h"


/*typedef struct { /*typedef struct {
const uint32_t VERID; const uint32_t VERID;

src/HardwareSerial1.cpp → src/core/HardwareSerial1.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */


#include <Arduino.h>
#include "HardwareSerial.h"
#include <core/Arduino.h>
#include "core/HardwareSerial.h"


#ifndef SERIAL1_TX_BUFFER_SIZE #ifndef SERIAL1_TX_BUFFER_SIZE
#define SERIAL1_TX_BUFFER_SIZE 64 // number of outgoing bytes to buffer #define SERIAL1_TX_BUFFER_SIZE 64 // number of outgoing bytes to buffer

src/HardwareSerial2.cpp → src/core/HardwareSerial2.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */


#include <Arduino.h>
#include "HardwareSerial.h"
#include <core/Arduino.h>
#include "core/HardwareSerial.h"


#ifndef SERIAL2_TX_BUFFER_SIZE #ifndef SERIAL2_TX_BUFFER_SIZE
#define SERIAL2_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer #define SERIAL2_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer

src/HardwareSerial3.cpp → src/core/HardwareSerial3.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */


#include <Arduino.h>
#include "HardwareSerial.h"
#include <core/Arduino.h>
#include "core/HardwareSerial.h"


#ifndef SERIAL3_TX_BUFFER_SIZE #ifndef SERIAL3_TX_BUFFER_SIZE
#define SERIAL3_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer #define SERIAL3_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer

src/HardwareSerial4.cpp → src/core/HardwareSerial4.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */


#include <Arduino.h>
#include "HardwareSerial.h"
#include <core/Arduino.h>
#include "core/HardwareSerial.h"


#ifndef SERIAL4_TX_BUFFER_SIZE #ifndef SERIAL4_TX_BUFFER_SIZE
#define SERIAL4_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer #define SERIAL4_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer

src/HardwareSerial5.cpp → src/core/HardwareSerial5.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */


#include <Arduino.h>
#include "HardwareSerial.h"
#include <core/Arduino.h>
#include "core/HardwareSerial.h"


#ifndef SERIAL5_TX_BUFFER_SIZE #ifndef SERIAL5_TX_BUFFER_SIZE
#define SERIAL5_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer #define SERIAL5_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer

src/HardwareSerial6.cpp → src/core/HardwareSerial6.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */


#include <Arduino.h>
#include "HardwareSerial.h"
#include <core/Arduino.h>
#include "core/HardwareSerial.h"


#ifndef SERIAL6_TX_BUFFER_SIZE #ifndef SERIAL6_TX_BUFFER_SIZE
#define SERIAL6_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer #define SERIAL6_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer

src/HardwareSerial7.cpp → src/core/HardwareSerial7.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */


#include <Arduino.h>
#include "HardwareSerial.h"
#include <core/Arduino.h>
#include "core/HardwareSerial.h"


#ifndef SERIAL7_TX_BUFFER_SIZE #ifndef SERIAL7_TX_BUFFER_SIZE
#define SERIAL7_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer #define SERIAL7_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer

src/HardwareSerial8.cpp → src/core/HardwareSerial8.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */


#include <Arduino.h>
#include "HardwareSerial.h"
#include <core/Arduino.h>
#include "core/HardwareSerial.h"
#if defined(__IMXRT1062__) && defined(ARDUINO_TEENSY41) #if defined(__IMXRT1062__) && defined(ARDUINO_TEENSY41)


#ifndef SERIAL8_TX_BUFFER_SIZE #ifndef SERIAL8_TX_BUFFER_SIZE

src/IPAddress.cpp → src/core/IPAddress.cpp View File

Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */


#include <Arduino.h>
#include "IPAddress.h"
#include <core/Arduino.h>
#include "core/IPAddress.h"


size_t IPAddress::printTo(Print& p) const size_t IPAddress::printTo(Print& p) const
{ {

src/IntervalTimer.cpp → src/core/IntervalTimer.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */


#include "IntervalTimer.h"
#include "debug/printf.h"
#include "core/IntervalTimer.h"
#include "core/debug/printf.h"


static void pit_isr(void); static void pit_isr(void);



src/Print.cpp → src/core/Print.cpp View File

// developed for Teensyduino have made their way back into // developed for Teensyduino have made their way back into
// Arduino's code base. :-) // Arduino's code base. :-)


#include <Arduino.h>
#include <core/Arduino.h>


#include "debug/printf.h"
#include "core/debug/printf.h"
#undef printf #undef printf


size_t Print::write(const uint8_t *buffer, size_t size) size_t Print::write(const uint8_t *buffer, size_t size)

src/Stream.cpp → src/core/Stream.cpp View File

parsing functions based on TextFinder library by Michael Margolis parsing functions based on TextFinder library by Michael Margolis
*/ */


#include <Arduino.h>
#include <core/Arduino.h>


#define PARSE_TIMEOUT 1000 // default number of milli-seconds to wait #define PARSE_TIMEOUT 1000 // default number of milli-seconds to wait
#define NO_SKIP_CHAR 1 // a magic char not found in a valid ASCII numeric field #define NO_SKIP_CHAR 1 // a magic char not found in a valid ASCII numeric field
if( target == nullptr) return true; if( target == nullptr) return true;
if( *target == 0) return true; // return true if target is a null string if( *target == 0) return true; // return true if target is a null string
if (terminator == nullptr) termLen = 0; if (terminator == nullptr) termLen = 0;
while( (c = timedRead()) > 0){ while( (c = timedRead()) > 0){
if( c == target[index]){ if( c == target[index]){
//////Serial.print("found "); Serial.write(c); Serial.print("index now"); Serial.println(index+1); //////Serial.print("found "); Serial.write(c); Serial.print("index now"); Serial.println(index+1);

src/Tone.cpp → src/core/Tone.cpp View File

* SOFTWARE. * SOFTWARE.
*/ */


#include <Arduino.h>
#include <core/Arduino.h>


// IntervalTimer based tone. This allows tone() to share the timers with other // IntervalTimer based tone. This allows tone() to share the timers with other
// libraries, rather than permanently hogging one PIT timer even for projects // libraries, rather than permanently hogging one PIT timer even for projects

src/WMath.cpp → src/core/WMath.cpp View File


src/WString.cpp → src/core/WString.cpp View File

Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/ */


#include <Arduino.h>
#include <core/Arduino.h>




/*********************************************/ /*********************************************/

src/analog.c → src/core/analog.c View File

#include "imxrt.h"
#include "core_pins.h"
#include "debug/printf.h"
#include "avr/pgmspace.h"
#include "core/imxrt.h"
#include "core/core_pins.h"
#include "core/debug/printf.h"
#include "core/avr/pgmspace.h"


static uint8_t calibrating; static uint8_t calibrating;
static uint8_t analog_config_bits = 10; static uint8_t analog_config_bits = 10;

src/bootdata.c → src/core/bootdata.c View File

//#include "imxrt.h"
//#include "core/imxrt.h"


#include <stdint.h> #include <stdint.h>



src/clockspeed.c → src/core/clockspeed.c View File

#include <stdint.h> #include <stdint.h>
#include "imxrt.h"
#include "wiring.h"
#include "debug/printf.h"
#include "core/imxrt.h"
#include "core/wiring.h"
#include "core/debug/printf.h"


// A brief explanation of F_CPU_ACTUAL vs F_CPU // A brief explanation of F_CPU_ACTUAL vs F_CPU
// https://forum.pjrc.com/threads/57236?p=212642&viewfull=1#post212642 // https://forum.pjrc.com/threads/57236?p=212642&viewfull=1#post212642

src/debugprintf.c → src/core/debugprintf.c View File

#include "debug/printf.h"
#include "core/debug/printf.h"


#ifdef PRINT_DEBUG_STUFF #ifdef PRINT_DEBUG_STUFF


#include "avr/pgmspace.h"
#include "core/avr/pgmspace.h"
#include <stdarg.h> #include <stdarg.h>
#include "imxrt.h"
#include "usb_desc.h"
#include "core/imxrt.h"
#include "core/usb_desc.h"


void putchar_debug(char c); void putchar_debug(char c);
static void puint_debug(unsigned int num); static void puint_debug(unsigned int num);


// first is this normal Serial? // first is this normal Serial?
#if defined(PRINT_DEBUG_USING_USB) && defined(CDC_STATUS_INTERFACE) && defined(CDC_DATA_INTERFACE) #if defined(PRINT_DEBUG_USING_USB) && defined(CDC_STATUS_INTERFACE) && defined(CDC_DATA_INTERFACE)
#include "usb_dev.h"
#include "usb_serial.h"
#include "core/usb_dev.h"
#include "core/usb_serial.h"
FLASHMEM void putchar_debug(char c) FLASHMEM void putchar_debug(char c)
{ {
usb_serial_putchar(c); usb_serial_putchar(c);
FLASHMEM void printf_debug_init(void) {} FLASHMEM void printf_debug_init(void) {}


#elif defined(PRINT_DEBUG_USING_USB) && defined(SEREMU_INTERFACE) && !defined(CDC_STATUS_INTERFACE) && !defined(CDC_DATA_INTERFACE) #elif defined(PRINT_DEBUG_USING_USB) && defined(SEREMU_INTERFACE) && !defined(CDC_STATUS_INTERFACE) && !defined(CDC_DATA_INTERFACE)
#include "usb_dev.h"
#include "usb_seremu.h"
#include "core/usb_dev.h"
#include "core/usb_seremu.h"
FLASHMEM void putchar_debug(char c) FLASHMEM void putchar_debug(char c)
{ {
usb_seremu_putchar(c); usb_seremu_putchar(c);

src/delay.c → src/core/delay.c View File

#include "core_pins.h"
#include "arm_math.h" // micros() synchronization
#include "core/core_pins.h"
#include "core/arm_math.h" // micros() synchronization


//volatile uint32_t F_CPU = 396000000; //volatile uint32_t F_CPU = 396000000;
//volatile uint32_t F_BUS = 132000000; //volatile uint32_t F_BUS = 132000000;

src/digital.c → src/core/digital.c View File



#include "core_pins.h"
#include "core/core_pins.h"


/* /*
struct digital_pin_bitband_and_config_table_struct { struct digital_pin_bitband_and_config_table_struct {

src/eeprom.c → src/core/eeprom.c View File

// Generally you should avoid editing this code, unless you really // Generally you should avoid editing this code, unless you really
// know what you're doing. // know what you're doing.


#include "imxrt.h"
#include <avr/eeprom.h>
#include "core/imxrt.h"
#include <core/avr/eeprom.h>
#include <string.h> #include <string.h>
#include "debug/printf.h"
#include "core/debug/printf.h"


#if defined(ARDUINO_TEENSY40) #if defined(ARDUINO_TEENSY40)
#define FLASH_BASEADDR 0x601F0000 #define FLASH_BASEADDR 0x601F0000

src/extmem.c → src/core/extmem.c View File

// but automatically fall back to internal RAM if external RAM can't be used. // but automatically fall back to internal RAM if external RAM can't be used.


#include <stdlib.h> #include <stdlib.h>
#include "smalloc.h"
#include "wiring.h"
#include "core/smalloc.h"
#include "core/wiring.h"


#if defined(ARDUINO_TEENSY41) #if defined(ARDUINO_TEENSY41)
// Teensy 4.1 external RAM address range is 0x70000000 to 0x7FFFFFFF // Teensy 4.1 external RAM address range is 0x70000000 to 0x7FFFFFFF

src/interrupt.c → src/core/interrupt.c View File

#include "Arduino.h"
#include "pins_arduino.h"
#include "debug/printf.h"
#include "core/Arduino.h"
#include "core/pins_arduino.h"
#include "core/debug/printf.h"


#define DR_INDEX 0 #define DR_INDEX 0
#define GDIR_INDEX 1 #define GDIR_INDEX 1

src/keylayouts.c → src/core/keylayouts.c View File

* SOFTWARE. * SOFTWARE.
*/ */


#include <avr/pgmspace.h>
#include <core/avr/pgmspace.h>
#include <stdint.h> #include <stdint.h>


#include "keylayouts.h"
#include "core/keylayouts.h"


#ifdef M #ifdef M
#undef M #undef M

src/libc.c → src/core/libc.c View File


src/main.cpp → src/core/main.cpp View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save