path: root/digital/avr/modules/motor/output/output.txt
diff options
Diffstat (limited to 'digital/avr/modules/motor/output/output.txt')
1 files changed, 34 insertions, 0 deletions
diff --git a/digital/avr/modules/motor/output/output.txt b/digital/avr/modules/motor/output/output.txt
new file mode 100644
index 00000000..e63ca61a
--- /dev/null
+++ b/digital/avr/modules/motor/output/output.txt
@@ -0,0 +1,34 @@
+ motor/output module
+:Author: Nicolas Schodet
+The output module provides an interface with hardware outputs. They are
+usually PWM hardware connected to a H-bridge to power the motors.
+The `output_t` structure contains information about the current state and
+configuration of the output. The `max` and `min` fields must be initialised
+by user code (you can use a data initializer) and left untouched afterward,
+then `output_init` should be called to associate each output with hardware.
+Each output hardware is associated with an index fixed in the compile time
+To change the current output value, use the `output_set` function. It will
+filter value (saturation with `max`, dead zone with `min`, optional negation
+if `reverse` is set) and store it for next update. Each output hardware will
+reflect this value once `output_update` is called.
+An output can be reversed by setting the `reverse` field before `output_init`
+is called or using `output_set_reverse` function.
+.. include:: output.exd