new USB pullup

This commit is contained in:
2024-08-15 09:27:03 +03:00
parent 0cb9b5f3c8
commit eaf137b5b6
6 changed files with 14 additions and 8 deletions

View File

@@ -34,10 +34,12 @@
// USB pullup: PA8
#define USBPU_port GPIOA
#define USBPU_pin (1<<8)
//#define USBPU_ON() pin_clear(USBPU_port, USBPU_pin)
//#define USBPU_OFF() pin_set(USBPU_port, USBPU_pin)
#define USBPU_ON() pin_set(USBPU_port, USBPU_pin)
#define USBPU_OFF() pin_clear(USBPU_port, USBPU_pin)
// Pullup by P-channel MOSFET
#define USBPU_ON() pin_clear(USBPU_port, USBPU_pin)
#define USBPU_OFF() pin_set(USBPU_port, USBPU_pin)
// direct pullup connected to pin
//#define USBPU_ON() pin_set(USBPU_port, USBPU_pin)
//#define USBPU_OFF() pin_clear(USBPU_port, USBPU_pin)
// temporary LED: PD9
#define LED_blink() pin_toggle(GPIOD, 1<<9)