Total rework of simulator for dev branch. Create separate thread for interrupt processes. Tick-accurate simulation of timers. Non-blocking character input for running in realtime mode. Decouple hardware sim from grbl code as much as possible. Expanded command line options. Provisions for cross-platform solution.
This commit is contained in:
91
sim/config.h
91
sim/config.h
@@ -24,94 +24,5 @@
|
||||
#include "../config.h"
|
||||
#include <inttypes.h>
|
||||
|
||||
|
||||
// dummy register variables implemented in simulator.c
|
||||
extern uint8_t stepping_ddr;
|
||||
extern uint8_t stepping_port;
|
||||
extern uint8_t spindle_ddr;
|
||||
extern uint8_t spindle_port;
|
||||
extern uint8_t limit_ddr;
|
||||
extern uint8_t limit_port;
|
||||
extern uint8_t limit_int_reg;
|
||||
extern uint8_t pinout_ddr;
|
||||
extern uint8_t pinout_port;
|
||||
extern uint8_t pinout_int_reg;
|
||||
extern uint8_t coolant_flood_ddr;
|
||||
extern uint8_t coolant_flood_port;
|
||||
|
||||
// ReDefine pin-assignments
|
||||
#undef STEPPING_DDR
|
||||
#define STEPPING_DDR stepping_ddr
|
||||
#undef STEPPING_PORT
|
||||
#define STEPPING_PORT stepping_port
|
||||
#undef X_STEP_BIT
|
||||
#define X_STEP_BIT 2 // Uno Digital Pin 2
|
||||
#undef Y_STEP_BIT
|
||||
#define Y_STEP_BIT 3 // Uno Digital Pin 3
|
||||
#undef Z_STEP_BIT
|
||||
#define Z_STEP_BIT 4 // Uno Digital Pin 4
|
||||
#undef X_DIRECTION_BIT
|
||||
#define X_DIRECTION_BIT 5 // Uno Digital Pin 5
|
||||
#undef Y_DIRECTION_BIT
|
||||
#define Y_DIRECTION_BIT 6 // Uno Digital Pin 6
|
||||
#undef Z_DIRECTION_BIT
|
||||
#define Z_DIRECTION_BIT 7 // Uno Digital Pin 7
|
||||
|
||||
#undef STEPPERS_DISABLE_DDR
|
||||
#define STEPPERS_DISABLE_DDR stepping_ddr
|
||||
#undef STEPPERS_DISABLE_PORT
|
||||
#define STEPPERS_DISABLE_PORT stepping_port
|
||||
#undef STEPPERS_DISABLE_BIT
|
||||
#define STEPPERS_DISABLE_BIT 0 // Uno Digital Pin 8
|
||||
|
||||
#undef LIMIT_DDR
|
||||
#define LIMIT_DDR limit_ddr
|
||||
#undef LIMIT_PORT
|
||||
#define LIMIT_PORT limit_port
|
||||
#undef LIMIT_PIN
|
||||
#define LIMIT_PIN limit_port
|
||||
#undef X_LIMIT_BIT
|
||||
#define X_LIMIT_BIT 1 // Uno Digital Pin 9
|
||||
#undef Y_LIMIT_BIT
|
||||
#define Y_LIMIT_BIT 2 // Uno Digital Pin 10
|
||||
#undef Z_LIMIT_BIT
|
||||
#define Z_LIMIT_BIT 3 // Uno Digital Pin 11
|
||||
#undef LIMIT_INT
|
||||
#define LIMIT_INT 0
|
||||
#undef LIMIT_PCMSK
|
||||
#define LIMIT_PCMSK limit_int_reg
|
||||
|
||||
#undef SPINDLE_ENABLE_DDR
|
||||
#define SPINDLE_ENABLE_DDR spindle_ddr
|
||||
#undef SPINDLE_ENABLE_PORT
|
||||
#define SPINDLE_ENABLE_PORT spindle_port
|
||||
#undef SPINDLE_ENABLE_BIT
|
||||
#define SPINDLE_ENABLE_BIT 4 // Uno Digital Pin 12
|
||||
|
||||
#undef SPINDLE_DIRECTION_DDR
|
||||
#define SPINDLE_DIRECTION_DDR spindle_ddr
|
||||
#undef SPINDLE_DIRECTION_PORT
|
||||
#define SPINDLE_DIRECTION_PORT spindle_port
|
||||
#undef SPINDLE_DIRECTION_BIT
|
||||
#define SPINDLE_DIRECTION_BIT 5 // Uno Digital Pin 13
|
||||
|
||||
#undef PINOUT_DDR
|
||||
#define PINOUT_DDR pinout_ddr
|
||||
#undef PINOUT_PORT
|
||||
#define PINOUT_PORT pinout_port
|
||||
#undef PINOUT_PIN
|
||||
#define PINOUT_PIN pinout_port
|
||||
#undef PINOUT_PCMSK
|
||||
#define PINOUT_PCMSK pinout_int_reg
|
||||
#undef PINOUT_INT
|
||||
#define PINOUT_INT 0
|
||||
|
||||
#undef COOLANT_FLOOD_DDR
|
||||
#define COOLANT_FLOOD_DDR coolant_flood_ddr
|
||||
#undef COOLANT_FLOOD_PORT
|
||||
#define COOLANT_FLOOD_PORT coolant_flood_port
|
||||
#undef COOLANT_FLOOD_BIT
|
||||
#define COOLANT_FLOOD_BIT 0
|
||||
|
||||
|
||||
#define AUTO_REPORT_MOVE_DONE
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user