added support for redlinevfd and em60

This commit is contained in:
sanjayk03-dev
2025-01-25 08:24:18 +05:30
parent e17a30d19d
commit fedc244ef6
2 changed files with 20 additions and 4 deletions

View File

@@ -58,7 +58,8 @@ typedef enum
SPINDLE_TYPE_SUNFAR_E300,
SPINDLE_TYPE_OMRON_MX2,
SPINDLE_TYPE_V70,
SPINDLE_TYPE_PWNCNC,
SPINDLE_TYPE_REDLINE_VFD,
SPINDLE_TYPE_EM60,
} spindle_type_t;
typedef void (*deinit_cb_t)();

View File

@@ -170,7 +170,19 @@ const vfd_reg_t v70_regs[] PROGMEM = {
{REG_DISABLED},
};
const vfd_reg_t pwncnc_regs[] PROGMEM = {
const vfd_reg_t redline_vfd_regs[] PROGMEM = {
{REG_MAX_FREQ_READ, 0x0007, 0}, // Read max frequency
{REG_FREQ_SCALED_SET, 0xa001, 10000}, // Set scaled frequency
{REG_FREQ_READ, 0x9000, 0}, // Read frequency
{REG_FWD_WRITE, 0xa000, 1}, // Run forward
{REG_REV_WRITE, 0xa000, 2}, // Run reverse
{REG_STOP_WRITE, 0xa000, 6}, // Stop
{REG_DISCONNECT_WRITE, 0xa000, 5}, // Stop
{REG_STATUS_READ, 0xb000, 0}, // Read status
{REG_DISABLED},
};
const vfd_reg_t em60_regs[] PROGMEM = {
{REG_MAX_FREQ_READ, 0x0007, 0}, // Read max frequency
{REG_FREQ_SCALED_SET, 0xa001, 10000}, // Set scaled frequency
{REG_FREQ_READ, 0x9000, 0}, // Read frequency
@@ -479,8 +491,11 @@ void vfd_spindle_init()
case SPINDLE_TYPE_V70:
_load(v70_regs);
break;
case SPINDLE_TYPE_PWNCNC:
_load(pwncnc_regs);
case SPINDLE_TYPE_REDLINE_VFD:
_load(redline_vfd_regs);
break;
case SPINDLE_TYPE_EM60:
_load(em60_regs);
break;
default: