TinyRobotics
Loading...
Searching...
No Matches
Config.h
1#pragma once
2
3// Default type for coordinates, distances, and angles.
4#ifndef DEFAULT_TYPE
5#define DEFAULT_TYPE float
6#endif
7
8// Automatically include all headers
9#ifndef USE_INCLUDE_ALL
10#define USE_INCLUDE_ALL true
11#endif
12
13
14// ESP32-specific analog write frequency support
15#ifdef ESP32
16#define SUPPORTS_ANALOG_WRITE_FREQ
17#define analogWriteFreq(pin, freq) analogWriteFrequency(pin, freq)
18#endif
19
20
21// ESP8266-specific analog write frequency support
22#ifdef ESP8266
23#define SUPPORTS_ANALOG_WRITE_FREQ
24#define analogWriteFreq(pin, freq) analogWriteFreq(freq)
25#endif
26
27
28// RP2040-specific analog write frequency support
29#ifdef ARDUINO_ARCH_RP2040
30#define SUPPORTS_ANALOG_WRITE_FREQ
31#define analogWriteFreq(pin, freq) analogWriteFreq(freq)
32#endif
33
34// Zephyr does not support the servo library
35#if defined(ARDUINO_ARCH_ZEPHYR)
36#warning "Zephyr does not support the Servo library, so USE_SERVO_LIBRARY is set to false"
37#define USE_SERVO_LIBRARY false
38#endif
39
40// Use external motor libraries (e.g., Servo, FastAccelStepper) if available
41#ifndef USE_EXTERNAL_MOTOR_LIBRARIES
42#define USE_EXTERNAL_MOTOR_LIBRARIES true
43#endif
44
45// use servo library for motor control
46#ifndef USE_SERVO_LIBRARY
47#define USE_SERVO_LIBRARY USE_EXTERNAL_MOTOR_LIBRARIES
48#endif
49
50// Use FastAccel Stepper Library
51#ifndef USE_FASTACCEL_STEPPER
52#define USE_FASTACCEL_STEPPER false
53#endif
#define USE_EXTERNAL_MOTOR_LIBRARIES
Definition: Config.h:42