Apply loop shorthand macros (#17159)
This commit is contained in:
@ -606,7 +606,7 @@ void MarlinSerial<Cfg>::printFloat(double number, uint8_t digits) {
|
||||
|
||||
// Round correctly so that print(1.999, 2) prints as "2.00"
|
||||
double rounding = 0.5;
|
||||
for (uint8_t i = 0; i < digits; ++i) rounding *= 0.1;
|
||||
LOOP_L_N(i, digits) rounding *= 0.1;
|
||||
number += rounding;
|
||||
|
||||
// Extract the integer part of the number and print it
|
||||
|
@ -259,7 +259,7 @@ void MarlinSerialUSB::printFloat(double number, uint8_t digits) {
|
||||
|
||||
// Round correctly so that print(1.999, 2) prints as "2.00"
|
||||
double rounding = 0.5;
|
||||
for (uint8_t i = 0; i < digits; ++i)
|
||||
LOOP_L_N(i, digits)
|
||||
rounding *= 0.1;
|
||||
|
||||
number += rounding;
|
||||
|
@ -80,7 +80,7 @@ Pio *SCK_pPio, *MOSI_pPio;
|
||||
uint32_t SCK_dwMask, MOSI_dwMask;
|
||||
|
||||
void u8g_spiSend_sw_DUE_mode_0(uint8_t val) { // 3MHz
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
LOOP_L_N(i, 8) {
|
||||
if (val & 0x80)
|
||||
MOSI_pPio->PIO_SODR = MOSI_dwMask;
|
||||
else
|
||||
@ -94,7 +94,7 @@ void u8g_spiSend_sw_DUE_mode_0(uint8_t val) { // 3MHz
|
||||
}
|
||||
|
||||
void u8g_spiSend_sw_DUE_mode_3(uint8_t val) { // 3.5MHz
|
||||
for (uint8_t i = 0; i < 8; i++) {
|
||||
LOOP_L_N(i, 8) {
|
||||
SCK_pPio->PIO_CODR = SCK_dwMask;
|
||||
DELAY_NS(50);
|
||||
if (val & 0x80)
|
||||
|
@ -63,7 +63,7 @@ extern PWM_map ISR_table[NUM_PWMS];
|
||||
extern uint32_t motor_current_setting[3];
|
||||
|
||||
#define IR_BIT(p) (WITHIN(p, 0, 3) ? (p) : (p) + 4)
|
||||
#define COPY_ACTIVE_TABLE() do{ for (uint8_t i = 0; i < 6 ; i++) work_table[i] = active_table[i]; }while(0)
|
||||
#define COPY_ACTIVE_TABLE() do{ LOOP_L_N(i, 6) work_table[i] = active_table[i]; }while(0)
|
||||
|
||||
#define PWM_MR0 19999 // base repetition rate minus one count - 20mS
|
||||
#define PWM_PR 24 // prescaler value - prescaler divide by 24 + 1 - 1 MHz output
|
||||
|
Reference in New Issue
Block a user