Add support for "step on both edges" to the main stepper_event_full()
code. This makes that mode of operation available even when the
micro-controller is not compiled for "optimized step on both edges".
It also enables the custom pulse duration support (step_pulse_ticks)
when in "step on both edges" mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
STM32F401 has USART6 on PA12/PA11 and PC7/PC6 with alternate
function mapping AF08. This can be used, for example, to connect
to the Elegoo Neptune 3, where PA12/PA11 are wired to an RJ10 plug
going to the stock screen.
Signed-off-by: Marius Petcu <marius@petcu.me>
* Fix getting wrong ADC value on PA0
* Fix invalid/unused pin being used as adc channel on STM32H7/G431/L4
Signed-off-by: Nicholas Huskie <huskie@idealfuture.org.cn>
It seems recent arm gcc versions no longer build correctly using the
"--specs=nano.specs --specs=nosys.specs" linker flags. Replace those
linker flags with "-nostdlib -lgcc -lc_nano".
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Some of the alternate pins defined are routed to FDCAN2 instead of
FDCAN1, this commit uses the correct IRQ register and peripheral
clock enable bit to enable FDCAN on those pins.
Signed-off-by: Amr Elsayed from Dropeffect GmbH <code@dropeffect.com>
At least STM32G4 requires four ADC clock cycles between hardware
clearing ADCCAL and setting ADEN or the write disappears. Make a
tenacious write attempt.
Signed-off-by: Alex Maclean <monkeh@monkeh.net>
Wait for two tx packets before startup, and make sure one of those
packets is acked before sending a third tx packet.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Commit cd8d57c2 added USB double buffering mode on transmits.
However, when enabling double buffering mode, the hardware seems to
always send at least two packets. Spurious transmissions could cause
the Linux gs_usb driver to get confused, which could lead to the can0
device becoming unavailable on restarts. Fix by waiting for two USB
packets to be available before enabling the endpoint.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The bulk out endpoint should not be enabled in tx mode, and the bulk
in endpoint should not be enabled in rx mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Implement the usbfs fast buffer switching mechanism on the "bulk in"
endpoint. This can improve the overall USB throughput and bus
utilization.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Implement the usbfs fast buffer switching mechanism on the "bulk out"
endpoint. This can improve the overall USB throughput and bus
utilization.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The usbfs device supports two buffers for each endpoint - typically
one for rx and one for tx. Add support for explicit handling of both
buffers. This is in preparation for improved "double buffering"
support.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Replace the set_stat_x_bits() functions with a single calc_epr_bits()
function. This new function supports setting bits other than the stat
field in the epr register.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Add a new HAVE_LIMITED_CODE_SIZE symbol that enables a menu to select
optional features. This symbol is enabled on chips with small build
sizes.
Replace the HAVE_GPIO_BITBANGING with four new symbols:
WANT_GPIO_BITBANGING, WANT_DISPLAYS, WANT_SENSORS, WANT_SOFTWARE_SPI,
and WANT_SOFTWARE_I2C. This allows users a little more flexibility
when selecting features they need.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The DAINTMSK prevents irqs but does not prevent the status reporting
in the GINTSTS and DAINT fields. Thus, the mask bits should be
checked prior to sending a wakeup notification.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>