aboutsummaryrefslogtreecommitdiffstats
path: root/src/endstop.c
Commit message (Collapse)AuthorAgeFilesLines
* endstop: Eliminate end_stop_set_oversample commandKevin O'Connor2017-10-121-21/+13
| | | | | | | | | | Pass the sample_ticks and sample_count parameters directly in the end_stop_home command instead. This simplifies the code. Also, simplify calculation of next wakeup time in end_stop_oversample_event(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* endstop: Fix typo in commentKevin O'Connor2017-10-021-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* endstop: Support oversampling of the endstopKevin O'Connor2017-10-011-5/+45
| | | | | | | | Some printers can show occasional noise on the endstop pin. Support sampling the endstop pin multiple times to attempt to filter out this noise. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Don't count milliseconds in the periodic timerKevin O'Connor2017-08-081-2/+4
| | | | | | | It's not necessary to keep a millisecond counter. Replace the two users of sched_check_periodic() with explicit task wakeup flags. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Use compile_time_request system for init, tasks, and shutdownKevin O'Connor2017-05-261-1/+1
| | | | | | | | Avoid using linker magic to define the init, task, and shutdown functions. Instead, use the compile_time_request system. This simplifies the build and produces more efficient code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* build: Avoid using noinline in common codeKevin O'Connor2017-05-151-1/+1
| | | | | | It's not necessary to use noinline for parsef() and stop_steppers(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* endstop: Support halting more than one stepper on triggerKevin O'Connor2017-04-031-9/+31
| | | | | | | | Extend the endstop code so that more than one stepper can be halted during endstop homing. Some kinematic setups (eg, corexy) require an endstop to support this. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Rename sched_timer() to sched_add_timer()Kevin O'Connor2017-03-111-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Introduce stepper_get_position command and remove from endstop.cKevin O'Connor2017-03-091-5/+3
| | | | | | | | Move the logic to calculate and report the stepper's current position from endstop.c to stepper.c. This localizes the stepper code into stepper.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* endstop: No need to store pin_valueKevin O'Connor2017-03-091-5/+5
| | | | | | The pin_value can be stored in the existing flags variable. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* basecmd: Use oid_ prefix for the oid manipulation functionsKevin O'Connor2017-03-091-5/+5
| | | | | | | Consistently use an "oid_" prefix on the oid functions - this makes them similar to other functions with a common prefix. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Minor change - remove unneeded header filesKevin O'Connor2017-01-141-1/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sched: Use uint_fast8_t for return type of timersKevin O'Connor2016-06-141-1/+1
| | | | | | | | Some architectures are faster passing regular integers than 8bit integers. Use uint_fast8_t so that the architecture chooses the appropriate type. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* irq: Prefer irq_disable/enable instead of irq_save/restore in cmds/tasksKevin O'Connor2016-06-131-3/+3
| | | | | | | | Task and command handlers always run with irqs enabled, so it is not necessary to save/restore the irq state when disabling irqs in these handlers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+110
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>