Skip to content

Commit cd8de43

Browse files
Fix comments to reflect removed stepper code
1 parent b1395dd commit cd8de43

File tree

2 files changed

+11
-41
lines changed

2 files changed

+11
-41
lines changed

cores/esp8266/core_esp8266_waveform.c

+5-20
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,24 @@
11
/*
2-
esp8266_waveform - General purpose waveform generation and stepper motor
3-
control, supporting outputs on all pins in parallel.
2+
esp8266_waveform - General purpose waveform generation and control,
3+
supporting outputs on all pins in parallel.
44
55
Copyright (c) 2018 Earle F. Philhower, III. All rights reserved.
66
77
The core idea is to have a programmable waveform generator with a unique
88
high and low period (defined in microseconds). TIMER1 is set to 1-shot
99
mode and is always loaded with the time until the next edge of any live
10-
waveforms or Stepper motors.
10+
waveforms.
1111
12-
Up to one waveform generator or stepper driver per pin supported.
12+
Up to one waveform generator per pin supported.
1313
1414
Each waveform generator is synchronized to the ESP cycle counter, not the
1515
timer. This allows for removing interrupt jitter and delay as the counter
1616
always increments once per 80MHz clock. Changes to a waveform are
17-
contiguous and only take effect on the next low->high waveform transition,
17+
contiguous and only take effect on the next waveform transition,
1818
allowing for smooth transitions.
1919
2020
This replaces older tone(), analogWrite(), and the Servo classes.
2121
22-
The stepper driver supports a constant jerk (da/dt, in ticks/sec^3) to
23-
produce a smooth acceleration curve and as well as a constant initial
24-
acceleration and velocity and number of pulses.
25-
26-
The stepper driver can also force all steppers to wait for completion
27-
by the use of a SYNC option (i.e. when completing a move where the X and
28-
Y need to hit at one point before moving to the next X and Y).
29-
30-
The user application is responsible for actually calculating the proper
31-
motion profiles (a general-purpose S-curve planner is left as an exercise
32-
for the reader).
33-
34-
The steppers should be wired using an A4988 or DRV8825 controller and
35-
with a single, shared direction pin.
36-
3722
Everywhere in the code where "cycles" is used, it means ESP.getCycleTime()
3823
cycles, not TIMER1 cycles (which may be 2 CPU clocks @ 160MHz).
3924

cores/esp8266/core_esp8266_waveform.h

+6-21
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,24 @@
11
/*
2-
esp8266_waveform - General purpose waveform generation and stepper motor
3-
control, supporting outputs on all pins in parallel.
2+
esp8266_waveform - General purpose waveform generation and control,
3+
supporting outputs on all pins in parallel.
44
55
Copyright (c) 2018 Earle F. Philhower, III. All rights reserved.
66
77
The core idea is to have a programmable waveform generator with a unique
88
high and low period (defined in microseconds). TIMER1 is set to 1-shot
99
mode and is always loaded with the time until the next edge of any live
10-
waveforms or Stepper motors.
10+
waveforms.
1111
12-
Up to one waveform generator or stepper driver per pin supported.
12+
Up to one waveform generator per pin supported.
1313
1414
Each waveform generator is synchronized to the ESP cycle counter, not the
1515
timer. This allows for removing interrupt jitter and delay as the counter
1616
always increments once per 80MHz clock. Changes to a waveform are
17-
contiguous and only take effect on the next low->high waveform transition,
17+
contiguous and only take effect on the next waveform transition,
1818
allowing for smooth transitions.
1919
2020
This replaces older tone(), analogWrite(), and the Servo classes.
2121
22-
The stepper driver supports a constant jerk (da/dt, in ticks/sec^3) to
23-
produce a smooth acceleration curve and as well as a constant initial
24-
acceleration and velocity and number of pulses.
25-
26-
The stepper driver can also force all steppers to wait for completion
27-
by the use of a SYNC option (i.e. when completing a move where the X and
28-
Y need to hit at one point before moving to the next X and Y).
29-
30-
The user application is responsible for actually calculating the proper
31-
motion profiles (a general-purpose S-curve planner is left as an exercise
32-
for the reader).
33-
34-
The steppers should be wired using an A4988 or DRV8825 controller and
35-
with a single, shared direction pin.
36-
3722
Everywhere in the code where "cycles" is used, it means ESP.getCycleTime()
3823
cycles, not TIMER1 cycles (which may be 2 CPU clocks @ 160MHz).
3924
@@ -76,7 +61,7 @@ int stopWaveform(uint8_t pin);
7661
// to determine whether or not to perform an operation.
7762
// Pass in NULL to disable the callback and, if no other waveforms being
7863
// generated, stop the timer as well.
79-
// Make sure the CBN function has the ICACHE_RAM_ATTR decorator.
64+
// Make sure the CB function has the ICACHE_RAM_ATTR decorator.
8065
void setTimer1Callback(uint32_t (*fn)());
8166

8267
#ifdef __cplusplus

0 commit comments

Comments
 (0)