- adds a "namespace" for each header - makes clear where a header is expected to come from - better facilitates explicit includesmain
| @@ -3,7 +3,7 @@ | |||
| #ifndef Arduino_h | |||
| #define Arduino_h | |||
| #include "WProgram.h" | |||
| #include "pins_arduino.h" | |||
| #include "core/WProgram.h" | |||
| #include "core/pins_arduino.h" | |||
| #endif | |||
| @@ -21,9 +21,9 @@ | |||
| #ifndef 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 { | |||
| @@ -31,7 +31,7 @@ | |||
| #ifndef DMAChannel_h_ | |||
| #define DMAChannel_h_ | |||
| #include "imxrt.h" | |||
| #include "core/imxrt.h" | |||
| // Discussion about DMAChannel is here: | |||
| // http://forum.pjrc.com/threads/25778-Could-there-be-something-like-an-ISR-template-function/page3 | |||
| @@ -34,7 +34,7 @@ | |||
| #if !defined(EventResponder_h) && defined(__cplusplus) | |||
| #define EventResponder_h | |||
| #include <Arduino.h> | |||
| #include <core/Arduino.h> | |||
| /* EventResponder lets you control how your program responds to an event. | |||
| * Imagine a basketball or football (American soccer) player who gets the | |||
| @@ -32,7 +32,7 @@ | |||
| #define FS_H | |||
| #ifdef __cplusplus | |||
| #include <Arduino.h> | |||
| #include <core/Arduino.h> | |||
| #define FILE_READ 0 | |||
| #define FILE_WRITE 1 | |||
| @@ -31,7 +31,7 @@ | |||
| #ifndef 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. | |||
| //#define SERIAL_9BIT_SUPPORT | |||
| @@ -26,8 +26,8 @@ | |||
| #ifndef 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 | |||
| @@ -32,7 +32,7 @@ | |||
| #define __INTERVALTIMER_H__ | |||
| #include <stddef.h> | |||
| #include "imxrt.h" | |||
| #include "core/imxrt.h" | |||
| #ifdef __cplusplus | |||
| extern "C" { | |||
| @@ -3,7 +3,7 @@ | |||
| // For compatibility with Arduino's MIDIUSB library | |||
| #include "usb_midi.h" | |||
| #include "core/usb_midi.h" | |||
| #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) | |||
| @@ -34,9 +34,9 @@ | |||
| #include <inttypes.h> | |||
| #include <stdio.h> // for size_t - gives sprintf and other stuff to all sketches & libs | |||
| #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 HEX 16 | |||
| @@ -22,7 +22,7 @@ | |||
| #ifndef server_h | |||
| #define server_h | |||
| #include "Print.h" | |||
| #include "core/Print.h" | |||
| class Server : public Print { | |||
| public: | |||
| @@ -21,7 +21,7 @@ | |||
| #define Stream_h | |||
| #include <inttypes.h> | |||
| #include "Print.h" | |||
| #include "core/Print.h" | |||
| class Stream : public Print | |||
| { | |||
| @@ -37,8 +37,8 @@ | |||
| #ifndef udp_h | |||
| #define udp_h | |||
| #include <Stream.h> | |||
| #include <IPAddress.h> | |||
| #include <core/Stream.h> | |||
| #include <core/IPAddress.h> | |||
| class UDP : public Stream { | |||
| @@ -38,33 +38,33 @@ | |||
| // some libraries and sketches depend on this | |||
| // AVR stuff, assuming Arduino.h or WProgram.h | |||
| // 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 | |||
| #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(byte h, byte l); | |||
| @@ -83,7 +83,7 @@ int32_t random(int32_t howsmall, int32_t howbig); | |||
| void randomSeed(uint32_t newseed); | |||
| void srandom(unsigned int newseed); | |||
| #include "pins_arduino.h" | |||
| #include "core/pins_arduino.h" | |||
| #endif // __cplusplus | |||
| @@ -26,11 +26,11 @@ | |||
| #include <stdlib.h> | |||
| #include <string.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 | |||
| // 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 | |||
| // dramatically increase performance and memory (RAM) efficiency, typically | |||
| @@ -29,7 +29,7 @@ | |||
| #include <stddef.h> | |||
| #include <stdint.h> | |||
| #include "avr_functions.h" | |||
| #include "core/avr_functions.h" | |||
| #if defined(ARDUINO_TEENSY40) | |||
| #define E2END 0x437 | |||
| @@ -20,4 +20,4 @@ | |||
| * THE SOFTWARE. | |||
| */ | |||
| #include "../avr_emulation.h" | |||
| #include "core/avr_emulation.h" | |||
| @@ -31,9 +31,9 @@ | |||
| #ifndef _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 | |||
| @@ -37,7 +37,7 @@ | |||
| #endif | |||
| #ifdef TEENSYDUINO | |||
| #include <irq.h> | |||
| #include <core/irq.h> | |||
| #endif | |||
| /* CMSIS compiler specific defines */ | |||
| @@ -60,7 +60,7 @@ | |||
| @{ | |||
| */ | |||
| #include "cmsis_version.h" | |||
| #include "core/cmsis_version.h" | |||
| /* CMSIS CM7 definitions */ | |||
| #define __CM7_CMSIS_VERSION_MAIN (__CM_CMSIS_VERSION_MAIN) /*!< \deprecated [31:16] CMSIS HAL main version */ | |||
| @@ -29,8 +29,8 @@ | |||
| */ | |||
| #pragma once | |||
| #include "imxrt.h" | |||
| #include "pins_arduino.h" | |||
| #include "core/imxrt.h" | |||
| #include "core/pins_arduino.h" | |||
| #define HIGH 1 | |||
| #define LOW 0 | |||
| @@ -26,9 +26,9 @@ | |||
| #ifdef __cplusplus | |||
| #if ARDUINO >= 100 | |||
| #include "Arduino.h" | |||
| #include "core/Arduino.h" | |||
| #else | |||
| #include "WProgram.h" | |||
| #include "core/WProgram.h" | |||
| #endif | |||
| class elapsedMillis | |||
| @@ -1,6 +1,6 @@ | |||
| #pragma once | |||
| #include <stdint.h> | |||
| #include <irq.h> | |||
| #include <core/irq.h> | |||
| // Definitions based these documents: | |||
| // i.MX RT1060 Reference Manual, Rev. 2, 12/2019 - https://www.pjrc.com/teensy/datasheets.html | |||
| @@ -32,7 +32,7 @@ | |||
| #define KEYLAYOUTS_H__ | |||
| #include <stdint.h> | |||
| #include <avr/pgmspace.h> | |||
| #include <core/avr/pgmspace.h> | |||
| #ifdef __cplusplus | |||
| extern "C"{ | |||
| @@ -30,7 +30,7 @@ | |||
| * -------------------------------------------------------------------- */ | |||
| #include "arm_math.h" | |||
| #include "core/arm_math.h" | |||
| #ifndef MATH_HELPER_H | |||
| #define MATH_HELPER_H | |||
| @@ -1,2 +1,2 @@ | |||
| // For compatibility with some ESP8266 programs | |||
| #include <avr/pgmspace.h> | |||
| #include <core/avr/pgmspace.h> | |||
| @@ -7,7 +7,7 @@ | |||
| #ifndef _SMALLOC_I_H | |||
| #define _SMALLOC_I_H | |||
| #include "smalloc.h" | |||
| #include "core/smalloc.h" | |||
| #include <string.h> | |||
| #include <limits.h> | |||
| #include <errno.h> | |||
| @@ -30,7 +30,7 @@ | |||
| #pragma once | |||
| #include "usb_desc.h" | |||
| #include "core/usb_desc.h" | |||
| #ifdef AUDIO_INTERFACE | |||
| #define FEATURE_MAX_VOLUME 0xFFF // volume accepted from 0 to 0xFFF | |||
| @@ -60,7 +60,7 @@ struct usb_audio_features_struct { | |||
| }; | |||
| #ifdef __cplusplus | |||
| #include "AudioStream.h" | |||
| #include "core/AudioStream.h" | |||
| class AudioInputUSB : public AudioStream | |||
| { | |||
| @@ -1,5 +1,5 @@ | |||
| #pragma once | |||
| #include "imxrt.h" | |||
| #include "core/imxrt.h" | |||
| #if !defined(USB_DISABLED) | |||
| @@ -31,7 +31,7 @@ | |||
| #ifndef USBflightsim_h_ | |||
| #define USBflightsim_h_ | |||
| #include "usb_desc.h" | |||
| #include "core/usb_desc.h" | |||
| #if defined(FLIGHTSIM_INTERFACE) | |||
| @@ -47,11 +47,11 @@ void usb_flightsim_flush_output(void); | |||
| #ifdef __cplusplus | |||
| #include <inttypes.h> | |||
| #include "elapsedMillis.h" | |||
| #include "core/elapsedMillis.h" | |||
| // workaround for elapsedMillis.h bringing in WProgram.h which brings usb_undef.h | |||
| //#undef USB_DESC_LIST_DEFINE | |||
| //#include "usb_desc.h" | |||
| //#include "core/usb_desc.h" | |||
| class FlightSimClass; | |||
| class FlightSimCommand; | |||
| @@ -31,7 +31,7 @@ | |||
| #ifndef USBjoystick_h_ | |||
| #define USBjoystick_h_ | |||
| #include "usb_desc.h" | |||
| #include "core/usb_desc.h" | |||
| #if defined(JOYSTICK_INTERFACE) | |||
| @@ -30,9 +30,9 @@ | |||
| #pragma once | |||
| #include "usb_desc.h" | |||
| #include "core/usb_desc.h" | |||
| #include "keylayouts.h" | |||
| #include "core/keylayouts.h" | |||
| #if defined(KEYBOARD_INTERFACE) | |||
| @@ -68,7 +68,7 @@ extern volatile uint8_t usb_configuration; | |||
| // C++ interface | |||
| #ifdef __cplusplus | |||
| #include "Stream.h" | |||
| #include "core/Stream.h" | |||
| class usb_keyboard_class : public Print | |||
| { | |||
| public: | |||
| @@ -31,7 +31,7 @@ | |||
| #ifndef USBmidi_h_ | |||
| #define USBmidi_h_ | |||
| #include "usb_desc.h" | |||
| #include "core/usb_desc.h" | |||
| #if defined(MIDI_INTERFACE) | |||
| @@ -31,7 +31,7 @@ | |||
| #ifndef USBmouse_h_ | |||
| #define USBmouse_h_ | |||
| #include "usb_desc.h" | |||
| #include "core/usb_desc.h" | |||
| #if defined(MOUSE_INTERFACE) | |||
| @@ -30,7 +30,7 @@ | |||
| #pragma once | |||
| #include "usb_desc.h" | |||
| #include "core/usb_desc.h" | |||
| #if defined(MTP_INTERFACE) | |||
| @@ -30,7 +30,7 @@ | |||
| #pragma once | |||
| #include "usb_desc.h" | |||
| #include "core/usb_desc.h" | |||
| #if defined(RAWHID_INTERFACE) | |||
| @@ -30,7 +30,7 @@ | |||
| #pragma once | |||
| #include "usb_desc.h" | |||
| #include "core/usb_desc.h" | |||
| #if defined(SEREMU_INTERFACE) && !defined(CDC_STATUS_INTERFACE) && !defined(CDC_DATA_INTERFACE) | |||
| @@ -58,7 +58,7 @@ extern volatile uint8_t usb_seremu_online; | |||
| // C++ interface | |||
| #ifdef __cplusplus | |||
| #include "Stream.h" | |||
| #include "core/Stream.h" | |||
| class usb_seremu_class : public Stream | |||
| { | |||
| public: | |||
| @@ -94,7 +94,7 @@ extern void serialEvent(void); | |||
| #if 0 | |||
| // Allow Arduino programs using Serial to compile, but Serial will do nothing. | |||
| #ifdef __cplusplus | |||
| #include "Stream.h" | |||
| #include "core/Stream.h" | |||
| class usb_seremu_class : public Stream | |||
| { | |||
| public: | |||
| @@ -30,7 +30,7 @@ | |||
| #pragma once | |||
| #include "usb_desc.h" | |||
| #include "core/usb_desc.h" | |||
| #include <stdint.h> | |||
| #if (defined(CDC_STATUS_INTERFACE) && defined(CDC_DATA_INTERFACE)) || defined(USB_DISABLED) | |||
| @@ -67,7 +67,7 @@ extern volatile uint8_t usb_configuration; | |||
| // C++ interface | |||
| #ifdef __cplusplus | |||
| #include "Stream.h" | |||
| #include "core/Stream.h" | |||
| class usb_serial_class : public Stream | |||
| { | |||
| public: | |||
| @@ -31,7 +31,7 @@ | |||
| #ifndef USBtouchscreen_h_ | |||
| #define USBtouchscreen_h_ | |||
| #include "usb_desc.h" | |||
| #include "core/usb_desc.h" | |||
| #if defined(MULTITOUCH_INTERFACE) | |||
| @@ -34,9 +34,9 @@ | |||
| #include <stdint.h> | |||
| #include <stdlib.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 | |||
| // include it early, so we can define these later | |||
| @@ -28,9 +28,8 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include <Arduino.h> | |||
| #include "AudioStream.h" | |||
| #include <core/Arduino.h> | |||
| #include "core/AudioStream.h" | |||
| #if defined(__IMXRT1062__) | |||
| #define MAX_AUDIO_MEMORY 229376 | |||
| @@ -28,7 +28,7 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include "DMAChannel.h" | |||
| #include "core/DMAChannel.h" | |||
| // only 16 channels supported, because we don't handle sharing interrupts | |||
| #define DMA_MAX_CHANNELS 16 | |||
| @@ -31,8 +31,8 @@ | |||
| * 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::lastYield = nullptr; | |||
| @@ -28,10 +28,10 @@ | |||
| * 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 { | |||
| const uint32_t VERID; | |||
| @@ -29,8 +29,8 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include <Arduino.h> | |||
| #include "HardwareSerial.h" | |||
| #include <core/Arduino.h> | |||
| #include "core/HardwareSerial.h" | |||
| #ifndef SERIAL1_TX_BUFFER_SIZE | |||
| #define SERIAL1_TX_BUFFER_SIZE 64 // number of outgoing bytes to buffer | |||
| @@ -28,8 +28,8 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include <Arduino.h> | |||
| #include "HardwareSerial.h" | |||
| #include <core/Arduino.h> | |||
| #include "core/HardwareSerial.h" | |||
| #ifndef SERIAL2_TX_BUFFER_SIZE | |||
| #define SERIAL2_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer | |||
| @@ -28,8 +28,8 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include <Arduino.h> | |||
| #include "HardwareSerial.h" | |||
| #include <core/Arduino.h> | |||
| #include "core/HardwareSerial.h" | |||
| #ifndef SERIAL3_TX_BUFFER_SIZE | |||
| #define SERIAL3_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer | |||
| @@ -28,8 +28,8 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include <Arduino.h> | |||
| #include "HardwareSerial.h" | |||
| #include <core/Arduino.h> | |||
| #include "core/HardwareSerial.h" | |||
| #ifndef SERIAL4_TX_BUFFER_SIZE | |||
| #define SERIAL4_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer | |||
| @@ -28,8 +28,8 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include <Arduino.h> | |||
| #include "HardwareSerial.h" | |||
| #include <core/Arduino.h> | |||
| #include "core/HardwareSerial.h" | |||
| #ifndef SERIAL5_TX_BUFFER_SIZE | |||
| #define SERIAL5_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer | |||
| @@ -28,8 +28,8 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include <Arduino.h> | |||
| #include "HardwareSerial.h" | |||
| #include <core/Arduino.h> | |||
| #include "core/HardwareSerial.h" | |||
| #ifndef SERIAL6_TX_BUFFER_SIZE | |||
| #define SERIAL6_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer | |||
| @@ -28,8 +28,8 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include <Arduino.h> | |||
| #include "HardwareSerial.h" | |||
| #include <core/Arduino.h> | |||
| #include "core/HardwareSerial.h" | |||
| #ifndef SERIAL7_TX_BUFFER_SIZE | |||
| #define SERIAL7_TX_BUFFER_SIZE 40 // number of outgoing bytes to buffer | |||
| @@ -28,8 +28,8 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include <Arduino.h> | |||
| #include "HardwareSerial.h" | |||
| #include <core/Arduino.h> | |||
| #include "core/HardwareSerial.h" | |||
| #if defined(__IMXRT1062__) && defined(ARDUINO_TEENSY41) | |||
| #ifndef SERIAL8_TX_BUFFER_SIZE | |||
| @@ -17,8 +17,8 @@ | |||
| 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 | |||
| { | |||
| @@ -28,8 +28,8 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include "IntervalTimer.h" | |||
| #include "debug/printf.h" | |||
| #include "core/IntervalTimer.h" | |||
| #include "core/debug/printf.h" | |||
| static void pit_isr(void); | |||
| @@ -34,9 +34,9 @@ | |||
| // developed for Teensyduino have made their way back into | |||
| // Arduino's code base. :-) | |||
| #include <Arduino.h> | |||
| #include <core/Arduino.h> | |||
| #include "debug/printf.h" | |||
| #include "core/debug/printf.h" | |||
| #undef printf | |||
| size_t Print::write(const uint8_t *buffer, size_t size) | |||
| @@ -20,7 +20,7 @@ | |||
| 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 NO_SKIP_CHAR 1 // a magic char not found in a valid ASCII numeric field | |||
| @@ -106,7 +106,7 @@ bool Stream::findUntil(const char *target, size_t targetLen, const char *termina | |||
| if( target == nullptr) return true; | |||
| if( *target == 0) return true; // return true if target is a null string | |||
| if (terminator == nullptr) termLen = 0; | |||
| while( (c = timedRead()) > 0){ | |||
| if( c == target[index]){ | |||
| //////Serial.print("found "); Serial.write(c); Serial.print("index now"); Serial.println(index+1); | |||
| @@ -28,7 +28,7 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include <Arduino.h> | |||
| #include <core/Arduino.h> | |||
| // IntervalTimer based tone. This allows tone() to share the timers with other | |||
| // libraries, rather than permanently hogging one PIT timer even for projects | |||
| @@ -19,7 +19,7 @@ | |||
| Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |||
| */ | |||
| #include <Arduino.h> | |||
| #include <core/Arduino.h> | |||
| /*********************************************/ | |||
| @@ -1,7 +1,7 @@ | |||
| #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 analog_config_bits = 10; | |||
| @@ -1,4 +1,4 @@ | |||
| //#include "imxrt.h" | |||
| //#include "core/imxrt.h" | |||
| #include <stdint.h> | |||
| @@ -1,7 +1,7 @@ | |||
| #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 | |||
| // https://forum.pjrc.com/threads/57236?p=212642&viewfull=1#post212642 | |||
| @@ -1,11 +1,11 @@ | |||
| #include "debug/printf.h" | |||
| #include "core/debug/printf.h" | |||
| #ifdef PRINT_DEBUG_STUFF | |||
| #include "avr/pgmspace.h" | |||
| #include "core/avr/pgmspace.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); | |||
| static void puint_debug(unsigned int num); | |||
| @@ -73,8 +73,8 @@ static void puint_debug(unsigned int num) | |||
| // first is this normal Serial? | |||
| #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) | |||
| { | |||
| usb_serial_putchar(c); | |||
| @@ -83,8 +83,8 @@ FLASHMEM void putchar_debug(char c) | |||
| FLASHMEM void printf_debug_init(void) {} | |||
| #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) | |||
| { | |||
| usb_seremu_putchar(c); | |||
| @@ -1,5 +1,5 @@ | |||
| #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_BUS = 132000000; | |||
| @@ -1,5 +1,5 @@ | |||
| #include "core_pins.h" | |||
| #include "core/core_pins.h" | |||
| /* | |||
| struct digital_pin_bitband_and_config_table_struct { | |||
| @@ -33,10 +33,10 @@ | |||
| // Generally you should avoid editing this code, unless you really | |||
| // 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 "debug/printf.h" | |||
| #include "core/debug/printf.h" | |||
| #if defined(ARDUINO_TEENSY40) | |||
| #define FLASH_BASEADDR 0x601F0000 | |||
| @@ -2,8 +2,8 @@ | |||
| // but automatically fall back to internal RAM if external RAM can't be used. | |||
| #include <stdlib.h> | |||
| #include "smalloc.h" | |||
| #include "wiring.h" | |||
| #include "core/smalloc.h" | |||
| #include "core/wiring.h" | |||
| #if defined(ARDUINO_TEENSY41) | |||
| // Teensy 4.1 external RAM address range is 0x70000000 to 0x7FFFFFFF | |||
| @@ -1,6 +1,6 @@ | |||
| #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 GDIR_INDEX 1 | |||
| @@ -28,10 +28,10 @@ | |||
| * SOFTWARE. | |||
| */ | |||
| #include <avr/pgmspace.h> | |||
| #include <core/avr/pgmspace.h> | |||
| #include <stdint.h> | |||
| #include "keylayouts.h" | |||
| #include "core/keylayouts.h" | |||
| #ifdef M | |||
| #undef M | |||