aboutsummaryrefslogtreecommitdiffstats
path: root/src/adccmds.c
Commit message (Collapse)AuthorAgeFilesLines
* adccmds: Add support for min/max temperature check filteringKevin O'Connor2018-07-021-3/+12
| | | | | | | | | | | Extend the ADC out of range check so that it is possible to sample multiple times before going into a shutdown state. This reduces the chance that measurement noise will cause an error. In an actual over temperature (or under temperature event) it is expected that the sensor will consistently report the problem, so extra checks for an additional second or two should not substantially increase risk. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* adccmds: Continue to query analog inputs after a shutdownKevin O'Connor2017-10-121-1/+7
| | | | | | | | Continue to sample the ADC input pins even if the MCU goes into a shutdown state. This enables the printer to continue reporting temperatures even on an mcu error. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Provide some further help on common MCU shutdown errorsKevin O'Connor2017-09-051-1/+1
| | | | 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-2/+2
| | | | | | | | 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>
* sched: Rename sched_timer() to sched_add_timer()Kevin O'Connor2017-03-111-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* basecmd: Use oid_ prefix for the oid manipulation functionsKevin O'Connor2017-03-091-3/+3
| | | | | | | 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>
* sam3x8e: Add support for ADC pinsKevin O'Connor2016-12-231-1/+1
| | | | | | Support analog-to-digital inputs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gpio: Merge gpio_adc_sample_time() into gpio_adc_sample()Kevin O'Connor2016-11-021-4/+5
| | | | | | | Return the number of clock ticks to wait directly from gpio_adc_sample(). This simplifies the ADC interface. 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-4/+4
| | | | | | | | 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>
* gpiocmds: Add Kconfig option to allow boards to disable ADC commandsKevin O'Connor2016-06-131-0/+117
Some boards may not support the ADC hardware. Update the build so that those commands do not need to be compiled if they are not available. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>