This commit is contained in:
sagiferi
2026-05-20 21:48:13 +02:00
parent a907d8ba74
commit d3c13f997e
446 changed files with 70716 additions and 0 deletions
+82
View File
@@ -0,0 +1,82 @@
// Platform setup ------------------------------------------------------------------------------------
// Teensy3.0, 3.1, 3.2
#pragma once
// We define a more generic symbol, in case more Teensy boards based on different lines are supported
#define __TEENSYDUINO__
// This platform has digitalReadFast, digitalWriteFast, etc.
#define HAL_HAS_DIGITAL_FAST
// Base rate for critical task timing (0.0076s = 0.11", 0.2 sec/day)
#define HAL_FRACTIONAL_SEC 131.5789474F
// Analog read and write
#ifndef HAL_VCC
#define HAL_VCC 3.3F
#endif
#ifndef ANALOG_READ_RANGE
#define ANALOG_READ_RANGE 1023
#endif
#ifndef ANALOG_WRITE_RANGE
#define ANALOG_WRITE_RANGE 255
#endif
// analog read/write capabilities
#define HAL_HAS_PER_PIN_PWM_RESOLUTION 0
#define HAL_HAS_PER_PIN_PWM_FREQUENCY 1
#define HAL_HAS_GLOBAL_PWM_RESOLUTION 1
#define HAL_HAS_GLOBAL_PWM_FREQUENCY 0
#define HAL_PWM_BITS_MAX 16
#define HAL_PWM_HZ_MAX 200000U
// Lower limit (fastest) step rate in uS for this platform (in SQW mode) and width of step pulse
#if F_CPU >= 120000000
#define HAL_MAXRATE_LOWER_LIMIT 10
#define HAL_PULSE_WIDTH 400 // in ns, estimated
#elif F_CPU >= 96000000
#define HAL_MAXRATE_LOWER_LIMIT 12
#define HAL_PULSE_WIDTH 450 // in ns, estimated
#elif F_CPU >= 72000000
#define HAL_MAXRATE_LOWER_LIMIT 14
#define HAL_PULSE_WIDTH 500 // in ns, estimated
#else
#define HAL_MAXRATE_LOWER_LIMIT 28
#define HAL_PULSE_WIDTH 750 // in ns, estimated
#endif
// New symbol for the default I2C port -------------------------------------------------------------
#include <Wire.h>
#ifndef HAL_WIRE
#define HAL_WIRE Wire
#endif
#ifndef HAL_WIRE_CLOCK
#define HAL_WIRE_CLOCK 100000
#endif
// Non-volatile storage ------------------------------------------------------------------------------
#if NV_DRIVER == NV_DEFAULT
#undef NV_DRIVER
#define NV_DRIVER NV_EEPROM
#endif
//--------------------------------------------------------------------------------------------------
// Internal MCU temperature (in degrees C)
#define _Tpin 38
#define HAL_TEMP() ( (-((analog.readV(_Tpin) - 0.719F)/0.001715F) + 25.0F ) )
//--------------------------------------------------------------------------------------------------
// General purpose initialize for HAL
#define HAL_INIT() { \
HAL_FAST_TICKS_INIT(); \
}
#define HAL_RESET() { \
SCB_AIRCR = 0x05FA0004; \
asm volatile ("dsb"); \
}
//---------------------------------------------------------------------------------------------------
// Misc. includes to support this processor's operation
+74
View File
@@ -0,0 +1,74 @@
// Platform setup ----------------------------------------------------------------------------------
// Teensy3.5
#pragma once
// We define a more generic symbol, in case more Teensy boards based on different lines are supported
#define __TEENSYDUINO__
// This platform has digitalReadFast, digitalWriteFast, etc.
#define HAL_HAS_DIGITAL_FAST
// Turn on support for using DACs to output digital signals using Arduino standard commands
#define HAL_DAC_AS_DIGITAL
// Base rate for critical task timing (0.0057s = 0.09", 0.2 sec/day)
#define HAL_FRACTIONAL_SEC 175.4385965F
// Analog read and write
#ifndef HAL_VCC
#define HAL_VCC 3.3F
#endif
#ifndef ANALOG_READ_RANGE
#define ANALOG_READ_RANGE 1023
#endif
#ifndef ANALOG_WRITE_RANGE
#define ANALOG_WRITE_RANGE 255
#endif
// analog read/write capabilities
#define HAL_HAS_PER_PIN_PWM_RESOLUTION 0
#define HAL_HAS_PER_PIN_PWM_FREQUENCY 1
#define HAL_HAS_GLOBAL_PWM_RESOLUTION 1
#define HAL_HAS_GLOBAL_PWM_FREQUENCY 0
#define HAL_PWM_BITS_MAX 16
#define HAL_PWM_HZ_MAX 200000U
// Lower limit (fastest) step rate in uS for this platform (in SQW mode) and width of step pulse
#define HAL_MAXRATE_LOWER_LIMIT 12
#define HAL_PULSE_WIDTH 400 // in ns, measured 1/18/22
#define HAL_FAST_PROCESSOR
// New symbol for the default I2C port -------------------------------------------------------------
#include <Wire.h>
#ifndef HAL_WIRE
#define HAL_WIRE Wire1
#endif
#ifndef HAL_WIRE_CLOCK
#define HAL_WIRE_CLOCK 100000
#endif
// Non-volatile storage ----------------------------------------------------------------------------
#if NV_DRIVER == NV_DEFAULT
#undef NV_DRIVER
#define NV_DRIVER NV_EEPROM
#endif
//--------------------------------------------------------------------------------------------------
// Internal MCU temperature (in degrees C)
#define _Tpin 70
#define HAL_TEMP() ( (-(analog.readV(_Tpin)-0.719F)/0.001715F)+25.0F )
//--------------------------------------------------------------------------------------------------
// General purpose initialize for HAL
#define HAL_INIT() { \
HAL_FAST_TICKS_INIT(); \
}
#define HAL_RESET() { \
SCB_AIRCR = 0x05FA0004; \
asm volatile ("dsb"); \
}
//---------------------------------------------------------------------------------------------------
// Misc. includes to support this processor's operation
+82
View File
@@ -0,0 +1,82 @@
// Platform setup ------------------------------------------------------------------------------------
// Teensy3.6
#pragma once
// We define a more generic symbol, in case more Teensy boards based on different lines are supported
#define __TEENSYDUINO__
// This platform has digitalReadFast, digitalWriteFast, etc.
#define HAL_HAS_DIGITAL_FAST
// Turn on support for using DACs to output digital signals using Arduino standard commands
#define HAL_DAC_AS_DIGITAL
// Base rate for critical task timing (0.0038s = 0.06", 0.2 sec/day)
#define HAL_FRACTIONAL_SEC 263.1578947F
// Analog read and write
#ifndef HAL_VCC
#define HAL_VCC 3.3F
#endif
#ifndef ANALOG_READ_RANGE
#define ANALOG_READ_RANGE 1023
#endif
#ifndef ANALOG_WRITE_RANGE
#define ANALOG_WRITE_RANGE 255
#endif
// analog read/write capabilities
#define HAL_HAS_PER_PIN_PWM_RESOLUTION 0
#define HAL_HAS_PER_PIN_PWM_FREQUENCY 1
#define HAL_HAS_GLOBAL_PWM_RESOLUTION 1
#define HAL_HAS_GLOBAL_PWM_FREQUENCY 0
#define HAL_PWM_BITS_MAX 16
#define HAL_PWM_HZ_MAX 200000U
// Lower limit (fastest) step rate in uS for this platform (in SQW mode) and width of step pulse
#if F_CPU >= 240000000
#define HAL_MAXRATE_LOWER_LIMIT 2
#define HAL_PULSE_WIDTH 200 // in ns, estimated
#elif F_CPU >= 180000000
#define HAL_MAXRATE_LOWER_LIMIT 2.6
#define HAL_PULSE_WIDTH 300 // in ns, estimated
#else
#define HAL_MAXRATE_LOWER_LIMIT 4.8
#define HAL_PULSE_WIDTH 400 // in ns, estimated
#endif
#define HAL_FAST_PROCESSOR
// New symbol for the default I2C port -------------------------------------------------------------
#include <Wire.h>
#ifndef HAL_WIRE
#define HAL_WIRE Wire1
#endif
#ifndef HAL_WIRE_CLOCK
#define HAL_WIRE_CLOCK 100000
#endif
// Non-volatile storage ------------------------------------------------------------------------------
#if NV_DRIVER == NV_DEFAULT
#undef NV_DRIVER
#define NV_DRIVER NV_EEPROM
#endif
//--------------------------------------------------------------------------------------------------
// Internal MCU temperature (in degrees C)
#define _Tpin 70
#define HAL_TEMP() ( (-(analog.readV(_Tpin)-0.719F)/0.001715F)+25.0F )
//--------------------------------------------------------------------------------------------------
// General purpose initialize for HAL
#define HAL_INIT() { \
HAL_FAST_TICKS_INIT(); \
}
#define HAL_RESET() { \
SCB_AIRCR = 0x05FA0004; \
asm volatile ("dsb"); \
}
//---------------------------------------------------------------------------------------------------
// Misc. includes to support this processor's operation
+77
View File
@@ -0,0 +1,77 @@
// Platform setup ------------------------------------------------------------------------------------
#pragma once
// We define a more generic symbol, in case more Teensy boards based on different lines are supported
#define __TEENSYDUINO__
// This platform has digitalReadFast, digitalWriteFast, etc.
#define HAL_HAS_DIGITAL_FAST
// Base rate for critical task timing (0.0019s = 0.03", 0.2 sec/day)
#define HAL_FRACTIONAL_SEC 526.3157895F
// Analog read and write
#ifndef HAL_VCC
#define HAL_VCC 3.3F
#endif
#ifndef ANALOG_READ_RANGE
#define ANALOG_READ_RANGE 1023
#endif
#ifndef ANALOG_WRITE_RANGE
#define ANALOG_WRITE_RANGE 255
#endif
// analog read/write capabilities
#define HAL_HAS_PER_PIN_PWM_RESOLUTION 0
#define HAL_HAS_PER_PIN_PWM_FREQUENCY 1
#define HAL_HAS_GLOBAL_PWM_RESOLUTION 1
#define HAL_HAS_GLOBAL_PWM_FREQUENCY 0
#define HAL_PWM_BITS_MAX 16
#define HAL_PWM_HZ_MAX 200000U
// Lower limit (fastest) step rate in uS for this platform (in SQW mode) and width of step pulse
#define HAL_MAXRATE_LOWER_LIMIT 1.5
#define HAL_PULSE_WIDTH 0 // effectively disable pulse mode
#define HAL_FAST_PROCESSOR
#define HAL_VFAST_PROCESSOR
// New symbol for the default I2C port -------------------------------------------------------------
#include <Wire.h>
#ifndef HAL_WIRE
#define HAL_WIRE Wire
#endif
#ifndef HAL_WIRE_CLOCK
#define HAL_WIRE_CLOCK 100000
#endif
// Non-volatile storage ------------------------------------------------------------------------------
#if NV_DRIVER == NV_DEFAULT
#undef NV_DRIVER
#define NV_DRIVER NV_EEPROM
#endif
//--------------------------------------------------------------------------------------------------
// Internal MCU temperature (in degrees C)
#define HAL_TEMP() ( tempmonGetTemp() )
//--------------------------------------------------------------------------------------------------
// General purpose initialize for HAL
#define HAL_INIT() { \
HAL_FAST_TICKS_INIT(); \
}
#define HAL_RESET() { \
SCB_AIRCR = 0x05FA0004; \
asm volatile ("dsb"); \
}
//---------------------------------------------------------------------------------------------------
// Misc. includes to support this processor's operation
#ifdef EmptyStr
#undef EmptyStr
#endif
#define EmptyStr "\1"
#define CAT_ATTR PROGMEM
+77
View File
@@ -0,0 +1,77 @@
// Platform setup ------------------------------------------------------------------------------------
#pragma once
// We define a more generic symbol, in case more Teensy boards based on different lines are supported
#define __TEENSYDUINO__
// This platform has digitalReadFast, digitalWriteFast, etc.
#define HAL_HAS_DIGITAL_FAST
// Base rate for critical task timing (0.0019s = 0.03", 0.2 sec/day)
#define HAL_FRACTIONAL_SEC 526.3157895F
// Analog read and write
#ifndef HAL_VCC
#define HAL_VCC 3.3F
#endif
#ifndef ANALOG_READ_RANGE
#define ANALOG_READ_RANGE 1023
#endif
#ifndef ANALOG_WRITE_RANGE
#define ANALOG_WRITE_RANGE 255
#endif
// analog read/write capabilities
#define HAL_HAS_PER_PIN_PWM_RESOLUTION 0
#define HAL_HAS_PER_PIN_PWM_FREQUENCY 1
#define HAL_HAS_GLOBAL_PWM_RESOLUTION 1
#define HAL_HAS_GLOBAL_PWM_FREQUENCY 0
#define HAL_PWM_BITS_MAX 16
#define HAL_PWM_HZ_MAX 200000U
// Lower limit (fastest) step rate in uS for this platform (in SQW mode) and width of step pulse
#define HAL_MAXRATE_LOWER_LIMIT 1.5
#define HAL_PULSE_WIDTH 0 // effectively disable pulse mode
#define HAL_FAST_PROCESSOR
#define HAL_VFAST_PROCESSOR
// New symbol for the default I2C port -------------------------------------------------------------
#include <Wire.h>
#ifndef HAL_WIRE
#define HAL_WIRE Wire
#endif
#ifndef HAL_WIRE_CLOCK
#define HAL_WIRE_CLOCK 100000
#endif
// Non-volatile storage ------------------------------------------------------------------------------
#if NV_DRIVER == NV_DEFAULT
#undef NV_DRIVER
#define NV_DRIVER NV_EEPROM
#endif
//--------------------------------------------------------------------------------------------------
// Internal MCU temperature (in degrees C)
#define HAL_TEMP() ( tempmonGetTemp() )
//--------------------------------------------------------------------------------------------------
// General purpose initialize for HAL
#define HAL_INIT() { \
HAL_FAST_TICKS_INIT(); \
}
#define HAL_RESET() { \
SCB_AIRCR = 0x05FA0004; \
asm volatile ("dsb"); \
}
//---------------------------------------------------------------------------------------------------
// Misc. includes to support this processor's operation
#ifdef EmptyStr
#undef EmptyStr
#endif
#define EmptyStr "\1"
#define CAT_ATTR PROGMEM