lpc176x: remove code specific to Klipper

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-05-17 14:46:43 -04:00 committed by Eric Callahan
parent c055ff1812
commit 365c3bbc91
2 changed files with 0 additions and 24 deletions

View File

@ -64,14 +64,10 @@ regs_to_pin(LPC_GPIO_TypeDef *regs, uint32_t bit)
struct gpio_out
gpio_out_setup(uint8_t pin, uint8_t val)
{
if (GPIO2PORT(pin) >= ARRAY_SIZE(digital_regs))
goto fail;
LPC_GPIO_TypeDef *regs = digital_regs[GPIO2PORT(pin)];
struct gpio_out g = { .regs=regs, .bit=GPIO2BIT(pin) };
gpio_out_reset(g, val);
return g;
fail:
shutdown("Not an output pin");
}
void
@ -115,14 +111,10 @@ gpio_out_write(struct gpio_out g, uint8_t val)
struct gpio_in
gpio_in_setup(uint8_t pin, int8_t pull_up)
{
if (GPIO2PORT(pin) >= ARRAY_SIZE(digital_regs))
goto fail;
LPC_GPIO_TypeDef *regs = digital_regs[GPIO2PORT(pin)];
struct gpio_in g = { .regs=regs, .bit=GPIO2BIT(pin) };
gpio_in_reset(g, pull_up);
return g;
fail:
shutdown("Not an input pin");
}
void

View File

@ -244,22 +244,6 @@ usb_set_configure(void)
usb_irq_enable();
}
void
usb_request_bootloader(void)
{
if (!CONFIG_SMOOTHIEWARE_BOOTLOADER)
return;
// Disable USB and pause for 5ms so host recognizes a disconnect
irq_disable();
sie_cmd_write(SIE_CMD_SET_DEVICE_STATUS, 0);
udelay(5000);
// The "LPC17xx-DFU-Bootloader" will enter the bootloader if the
// watchdog timeout flag is set.
LPC_WDT->WDMOD = 0x07;
NVIC_SystemReset();
}
/****************************************************************
* Setup and interrupts
****************************************************************/