klipper/src/avr
Kevin O'Connor 116b304541 avr: Switch to input state prior to enabling pullup in gpio_in_reset()
If switching a pin from output low to input with pullup, there is an
intermediate state of either driven high or high impedance without a
pullup.  Similarly, when switching from output high to input without a
pullup, there is an intermediate state of either driven low or high
impedence with a pullup.  In both cases it is preferable for the
latter transition.

Also, calculate the final setting prior to making any changes to
reduce the time in that intermediate state.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-07-22 14:11:17 -04:00
..
adc.c avr: Define PORTE on atmega328p 2021-08-14 22:00:17 -04:00
gpio.c avr: Switch to input state prior to enabling pullup in gpio_in_reset() 2025-07-22 14:11:17 -04:00
gpio.h i2c: handle errors at i2ccmds 2024-10-26 22:06:30 -04:00
hard_pwm.c command: Always pass a string to the DECL_CONSTANT() macro 2019-03-17 19:38:18 -04:00
i2c.c i2c: handle errors at i2ccmds 2024-10-26 22:06:30 -04:00
internal.h avr: Split gpio.c into gpio.c, adc.c, hard_pwm.c, and spi.c 2018-11-20 12:58:33 -05:00
irq.h avr: Do not use Idle mode 2018-04-28 21:26:42 -04:00
Kconfig avr: enable small code size options for atmega32u4 2024-03-02 18:47:16 -05:00
main.c command: Always pass a string to the DECL_CONSTANT() macro 2019-03-17 19:38:18 -04:00
Makefile Kconfig: Add new WANT_ADC option to reduce code size 2025-04-16 13:54:44 -04:00
pgm.h usb_cdc: Add support for usb_send_ep0_progmem() 2018-09-30 22:32:19 -04:00
serial.c avr: Use enumerations for buses and reserve pins 2019-04-04 18:29:31 -04:00
spi.c avr: Simplify spi mode setting 2019-05-07 23:02:20 -04:00
timer.c sched: Improve timer vs task priority check 2024-10-26 22:09:14 -04:00
usbserial.c avr: No need to define bootloader_request() 2022-12-30 21:28:32 -05:00
watchdog.c build: Use compile_time_request system for init, tasks, and shutdown 2017-05-26 12:39:34 -04:00