Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
IHOLD_IRUN.cpp
- Committer:
- charly
- Date:
- 2021-03-22
- Revision:
- 1:5ba0c258c4ed
- Parent:
- 0:f4343071c8b1
File content as of revision 1:5ba0c258c4ed:
#include "TMCStepper.h"
#include "TMC_MACROS.h"
#define SET_REG(SETTING) IHOLD_IRUN_register.SETTING = B; write(IHOLD_IRUN_register.address, IHOLD_IRUN_register.sr);
#define GET_REG(SETTING) return IHOLD_IRUN_register.SETTING;
// IHOLD_IRUN
uint32_t TMCStepper::IHOLD_IRUN() { return IHOLD_IRUN_register.sr; }
void TMCStepper::IHOLD_IRUN(uint32_t input) {
IHOLD_IRUN_register.sr = input;
write(IHOLD_IRUN_register.address, IHOLD_IRUN_register.sr);
}
void TMCStepper::ihold(uint8_t B) { SET_REG(ihold); }
void TMCStepper::irun(uint8_t B) { SET_REG(irun); }
void TMCStepper::iholddelay(uint8_t B) { SET_REG(iholddelay); }
uint8_t TMCStepper::ihold() { GET_REG(ihold); }
uint8_t TMCStepper::irun() { GET_REG(irun); }
uint8_t TMCStepper::iholddelay() { GET_REG(iholddelay); }