1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-09-03 19:32:39 +02:00

Create a test drive cpu_map and make that the default.

This commit is contained in:
bdring
2019-09-13 13:37:46 -05:00
parent 01439e49c6
commit 23de746a2a
2 changed files with 37 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ Some features should not be changed. See notes below.
// one configuration file by placing their specific defaults and pin map at the bottom of this file.
// If doing so, simply comment out these two defines and see instructions below.
#define DEFAULTS_GENERIC
#define CPU_MAP_ESP32 // these are defined in cpu_map.h
#define CPU_MAP_TEST_DRIVE // these are defined in cpu_map.h
#define VERBOSE_HELP // adds addition help info, but could confuse some senders
@@ -276,7 +276,7 @@ Some features should not be changed. See notes below.
// This allows control pins to be ignored.
// Since these are typically used on the pins that don't have pullups, they will float and cause
// problems if not externally pulled up. Ignoring will always return not activated when read.
//#define IGNORE_CONTROL_PINS
#define IGNORE_CONTROL_PINS
//#define ENABLE_CONTROL_SW_DEBOUNCE // Default disabled. Uncomment to enable.
#define CONTROL_SW_DEBOUNCE_PERIOD 32 // in milliseconds default 32 microseconds

View File

@@ -45,6 +45,41 @@
//Set your frequency
#define GRBL_SPI_FREQ 4000000
#ifdef CPU_MAP_TEST_DRIVE
/*
This is just a demo CPU_MAP for test driving. It creates a basic 3 axis machine, but
no actual i/o is used. It will appear that axes are moving, but they are virtual
This can be uploaded to an unattached ESP32 or attached to unknown hardware. There is no risk
pins trying to output signals into a short, etc that could dmamge the ESP32
Assuming no changes have been made to the config.h file it is also a way to get he basic program
running so OTA (over the air) firmware loading can be done.
*/
#define CPU_MAP_NAME "CPU_MAP_DEFAULT - Demo Only No I/O!"
// the following items currently need to be defined, but no i/o needs to be mapped
// fixing soon
#define LIMIT_MASK 0 // no limit pins
#define SPINDLE_PWM_CHANNEL 0
#define SPINDLE_PWM_BASE_FREQ 5000 // Hz
#define SPINDLE_PWM_BIT_PRECISION 8 // be sure to match this with SPINDLE_PWM_MAX_VALUE
#define SPINDLE_PWM_OFF_VALUE 0
#define SPINDLE_PWM_MAX_VALUE 255 // (2^SPINDLE_PWM_BIT_PRECISION)
#ifndef SPINDLE_PWM_MIN_VALUE
#define SPINDLE_PWM_MIN_VALUE 1 // Must be greater than zero.
#endif
#define SPINDLE_ENABLE_PIN GPIO_NUM_22
#define SPINDLE_PWM_RANGE (SPINDLE_PWM_MAX_VALUE-SPINDLE_PWM_MIN_VALUE)
#endif
#ifdef CPU_MAP_ESP32
// This is the CPU Map for the ESP32 CNC Controller R2