output_pin: Move pwm and digital output pins to new module in extras/

Rename the digital_output, pwm_output, and static_pwm_output config
sections to output_pin and move to a new module in the extras/
directory.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-03-17 13:29:03 -04:00
parent 66eefa1da8
commit ef8c464d97
4 changed files with 59 additions and 87 deletions

View file

@ -244,21 +244,6 @@
# seconds.
# Run-time configurable digital output pins (one may define any number
# of sections with a "digital_output" prefix). Pins configured here
# will be setup as digital outputs and one may modify them at run-time
# using the "SET_PIN PIN=my_pin VALUE=0" extended g-code command.
#[digital_output my_pin]
#pin:
# The pin to configure as a digital output. This parameter must be
# provided.
#value:
# The value to initially set the pin to during MCU configuration
# (either 0 or 1). The default is 0 (for low voltage).
#shutdown_value:
# The value to set the pin to on an MCU shutdown event. The default
# is 0 (for low voltage).
# Statically configured digital output pins (one may define any number
# of sections with a "static_digital_output" prefix). Pins configured
# here will be setup as a GPIO output during MCU configuration. They
@ -269,52 +254,48 @@
# pin will be set to a high level unless the pin name is prefaced
# with "!". This parameter must be provided.
# Run-time configurable PWM (pulse width modulator) output pins (one
# may define any number of sections with a "pwm_output" prefix). Pins
# configured here will be setup as PWM outputs and one may modify them
# at run-time using the "SET_PIN PIN=my_pin VALUE=.1" extended g-code
# command.
#[pwm_output my_pin]
# Run-time configurable output pins (one may define any number of
# sections with an "output_pin" prefix). Pins configured here will be
# setup as output pins and one may modify them at run-time using the
# "SET_PIN PIN=my_pin VALUE=.1" extended g-code command.
#[output_pin my_pin]
#pin:
# The pin to configure as a PWM output. This parameter must be
# The pin to configure as an output. This parameter must be
# provided.
#pwm: False
# Set if the output pin should be capable of
# pulse-width-modulation. If this is true, the value fields should
# be between 0 and 1; if it is false the value fields should be
# either 0 or 1. The default is False.
#static_value:
# If this is set, then the pin is assigned to this value at startup
# and the pin can not be changed during runtime. A static pin uses
# slightly less ram in the micro-controller. The default is to use
# runtime configuration of pins.
#value:
# The value to initially set the PWM output to during MCU
# configuration. This is typically set to a number between 0.0 and
# 1.0 with 1.0 being full on and 0.0 being full off. However, the
# range may be changed with the 'scale' parameter (see below). The
# default is 0.
# The value to initially set the pin to during MCU
# configuration. The default is 0 (for low voltage).
#shutdown_value:
# The value to set the pin to on an MCU shutdown event. The default
# is 0.
# is 0 (for low voltage).
#cycle_time: 0.100
# The amount of time (in seconds) per PWM cycle. It is recommended
# this be 10 milliseconds or greater when using software based
# PWM. The default is 0.100 seconds.
# PWM. The default is 0.100 seconds for pwm pins.
#hardware_pwm: False
# Enable this to use hardware PWM instead of software PWM. The
# default is False.
#scale:
# This parameter can be used to alter how the 'value' and
# 'shutdown_value' parameters are interpreted. If provided, then the
# 'value' parameter should be between 0.0 and 'scale'. This may be
# useful when configuring a PWM pin that controls a stepper voltage
# reference. The 'scale' can be set to the equivalent stepper
# amperage if the PWM were fully enabled, and then the 'value'
# parameter can be specified using the desired amperage for the
# stepper. The default is to not scale the 'value' parameter.
# Statically configured PWM output pins (one may define any number of
# sections with a "static_pwm_output" prefix). Pins configured here
# will be setup as PWM outputs during MCU configuration. They can not
# be changed at run-time.
#[static_pwm_output my_output_pwm]
#pin:
#value:
#cycle_time:
#hardware_pwm:
#scale:
# See the 'pwm_output' section for details on these parameters.
# 'shutdown_value' parameters are interpreted for pwm pins. If
# provided, then the 'value' parameter should be between 0.0 and
# 'scale'. This may be useful when configuring a PWM pin that
# controls a stepper voltage reference. The 'scale' can be set to
# the equivalent stepper amperage if the PWM were fully enabled, and
# then the 'value' parameter can be specified using the desired
# amperage for the stepper. The default is to not scale the 'value'
# parameter.
# Multiple pin outputs (one may define any number of sections with a