Use FastIO, sanity-check LPC SD options, apply formatting (#12231)

This commit is contained in:
Scott Lahteine
2018-10-26 15:23:02 -05:00
committed by GitHub
parent d015f746cc
commit 5580773191
8 changed files with 68 additions and 53 deletions

View File

@ -85,8 +85,8 @@ void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {
timerConfig[0].IRQ_Id = TIM5_IRQn;
timerConfig[0].callback = (uint32_t)TC5_Handler;
HAL_NVIC_SetPriority(timerConfig[0].IRQ_Id, 1, 0);
pinMode(STEPPER_ENABLE_PIN,OUTPUT);
digitalWrite(STEPPER_ENABLE_PIN,LOW);
SET_OUTPUT(STEPPER_ENABLE_PIN);
WRITE(STEPPER_ENABLE_PIN);
break;
case TEMP_TIMER_NUM:
//TEMP TIMER TIM7 // any available 16bit Timer (1 already used for PWM)

View File

@ -190,7 +190,7 @@ void TMC26XStepper::start() {
pinMode(step_pin, OUTPUT);
pinMode(dir_pin, OUTPUT);
pinMode(cs_pin, OUTPUT);
//pinMode(STEPPER_ENABLE_PIN, OUTPUT);
//SET_OUTPUT(STEPPER_ENABLE_PIN);
digitalWrite(step_pin, LOW);
digitalWrite(dir_pin, LOW);
digitalWrite(cs_pin, HIGH);
@ -887,7 +887,7 @@ inline void TMC26XStepper::send262(uint32_t datagram) {
//}
//select the TMC driver
digitalWrite(cs_pin,LOW);
digitalWrite(cs_pin, LOW);
//ensure that only valid bist are set (0-19)
//datagram &=REGISTER_BIT_PATTERN;
@ -916,7 +916,7 @@ inline void TMC26XStepper::send262(uint32_t datagram) {
#endif
//deselect the TMC chip
digitalWrite(cs_pin,HIGH);
digitalWrite(cs_pin, HIGH);
//restore the previous SPI mode if neccessary
//if the mode is not correct set it to mode 3