Apply pointer formatting
This commit is contained in:
@ -381,7 +381,7 @@ void Planner::init() {
|
||||
r9 = (d >> 8) & 0xFF,
|
||||
r10 = (d >> 16) & 0xFF,
|
||||
r2,r3,r4,r5,r6,r7,r11,r12,r13,r14,r15,r16,r17,r18;
|
||||
const uint8_t* ptab = inv_tab;
|
||||
const uint8_t *ptab = inv_tab;
|
||||
|
||||
__asm__ __volatile__(
|
||||
// %8:%7:%6 = interval
|
||||
@ -775,7 +775,7 @@ block_t* Planner::get_current_block() {
|
||||
* is not and will not use the block while we modify it, so it is safe to
|
||||
* alter its values.
|
||||
*/
|
||||
void Planner::calculate_trapezoid_for_block(block_t* const block, const float &entry_factor, const float &exit_factor) {
|
||||
void Planner::calculate_trapezoid_for_block(block_t * const block, const float &entry_factor, const float &exit_factor) {
|
||||
|
||||
uint32_t initial_rate = CEIL(block->nominal_rate * entry_factor),
|
||||
final_rate = CEIL(block->nominal_rate * exit_factor); // (steps per second)
|
||||
@ -942,7 +942,7 @@ void Planner::calculate_trapezoid_for_block(block_t* const block, const float &e
|
||||
*/
|
||||
|
||||
// The kernel called by recalculate() when scanning the plan from last to first entry.
|
||||
void Planner::reverse_pass_kernel(block_t* const current, const block_t * const next) {
|
||||
void Planner::reverse_pass_kernel(block_t * const current, const block_t * const next) {
|
||||
if (current) {
|
||||
// If entry speed is already at the maximum entry speed, and there was no change of speed
|
||||
// in the next block, there is no need to recheck. Block is cruising and there is no need to
|
||||
@ -1039,7 +1039,7 @@ void Planner::reverse_pass() {
|
||||
}
|
||||
|
||||
// The kernel called by recalculate() when scanning the plan from first to last entry.
|
||||
void Planner::forward_pass_kernel(const block_t* const previous, block_t* const current, const uint8_t block_index) {
|
||||
void Planner::forward_pass_kernel(const block_t * const previous, block_t * const current, const uint8_t block_index) {
|
||||
if (previous) {
|
||||
// If the previous block is an acceleration block, too short to complete the full speed
|
||||
// change, adjust the entry speed accordingly. Entry speeds have already been reset,
|
||||
@ -1440,7 +1440,7 @@ void Planner::check_axes_activity() {
|
||||
|
||||
float high = 0.0;
|
||||
for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
|
||||
block_t* block = &block_buffer[b];
|
||||
block_t *block = &block_buffer[b];
|
||||
if (block->steps.x || block->steps.y || block->steps.z) {
|
||||
const float se = (float)block->steps.e / block->step_event_count * SQRT(block->nominal_speed_sqr); // mm/sec;
|
||||
NOLESS(high, se);
|
||||
|
@ -993,10 +993,10 @@ class Planner {
|
||||
}
|
||||
#endif
|
||||
|
||||
static void calculate_trapezoid_for_block(block_t* const block, const float &entry_factor, const float &exit_factor);
|
||||
static void calculate_trapezoid_for_block(block_t * const block, const float &entry_factor, const float &exit_factor);
|
||||
|
||||
static void reverse_pass_kernel(block_t* const current, const block_t * const next);
|
||||
static void forward_pass_kernel(const block_t * const previous, block_t* const current, uint8_t block_index);
|
||||
static void reverse_pass_kernel(block_t * const current, const block_t * const next);
|
||||
static void forward_pass_kernel(const block_t * const previous, block_t * const current, uint8_t block_index);
|
||||
|
||||
static void reverse_pass();
|
||||
static void forward_pass();
|
||||
|
@ -2362,7 +2362,7 @@ uint32_t Stepper::block_phase_isr() {
|
||||
// Check if the given block is busy or not - Must not be called from ISR contexts
|
||||
// The current_block could change in the middle of the read by an Stepper ISR, so
|
||||
// we must explicitly prevent that!
|
||||
bool Stepper::is_block_busy(const block_t* const block) {
|
||||
bool Stepper::is_block_busy(const block_t * const block) {
|
||||
#ifdef __AVR__
|
||||
// A SW memory barrier, to ensure GCC does not overoptimize loops
|
||||
#define sw_barrier() asm volatile("": : :"memory");
|
||||
@ -2372,7 +2372,7 @@ bool Stepper::is_block_busy(const block_t* const block) {
|
||||
// This works because stepper ISRs happen at a slower rate than
|
||||
// successive reads of a variable, so 2 consecutive reads with
|
||||
// the same value means no interrupt updated it.
|
||||
block_t* vold, *vnew = current_block;
|
||||
block_t *vold, *vnew = current_block;
|
||||
sw_barrier();
|
||||
do {
|
||||
vold = vnew;
|
||||
|
@ -423,7 +423,7 @@ class Stepper {
|
||||
#endif
|
||||
|
||||
// Check if the given block is busy or not - Must not be called from ISR contexts
|
||||
static bool is_block_busy(const block_t* const block);
|
||||
static bool is_block_busy(const block_t * const block);
|
||||
|
||||
// Get the position of a stepper, in steps
|
||||
static int32_t position(const AxisEnum axis);
|
||||
@ -529,7 +529,7 @@ class Stepper {
|
||||
static void _set_position(const int32_t &a, const int32_t &b, const int32_t &c, const int32_t &e);
|
||||
FORCE_INLINE static void _set_position(const abce_long_t &spos) { _set_position(spos.a, spos.b, spos.c, spos.e); }
|
||||
|
||||
FORCE_INLINE static uint32_t calc_timer_interval(uint32_t step_rate, uint8_t* loops) {
|
||||
FORCE_INLINE static uint32_t calc_timer_interval(uint32_t step_rate, uint8_t *loops) {
|
||||
uint32_t timer;
|
||||
|
||||
// Scale the frequency, as requested by the caller
|
||||
|
@ -830,11 +830,11 @@ void reset_trinamic_drivers() {
|
||||
}
|
||||
|
||||
constexpr bool sc_hw_done(size_t start, size_t end) { return start == end; }
|
||||
constexpr bool sc_hw_skip(const char* port_name) { return !(*port_name); }
|
||||
constexpr bool sc_hw_match(const char* port_name, uint32_t address, size_t start, size_t end) {
|
||||
constexpr bool sc_hw_skip(const char *port_name) { return !(*port_name); }
|
||||
constexpr bool sc_hw_match(const char *port_name, uint32_t address, size_t start, size_t end) {
|
||||
return !sc_hw_done(start, end) && !sc_hw_skip(port_name) && (address == sanity_tmc_hw_details[start].address && str_eq_ce(port_name, sanity_tmc_hw_details[start].port));
|
||||
}
|
||||
constexpr int count_tmc_hw_serial_matches(const char* port_name, uint32_t address, size_t start, size_t end) {
|
||||
constexpr int count_tmc_hw_serial_matches(const char *port_name, uint32_t address, size_t start, size_t end) {
|
||||
return sc_hw_done(start, end) ? 0 : ((sc_hw_skip(port_name) ? 0 : (sc_hw_match(port_name, address, start, end) ? 1 : 0)) + count_tmc_hw_serial_matches(port_name, address, start + 1, end));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user