// A9 is used for USB VBUS detect, and A10 is used for USB_FS_ID.
// UART1 is also on PB6/7 but PB6 is tied to the Audio SCL line.
// Without board modifications, this makes UART1 unusable on this board.
#define MICROPY_HW_UART1_TX (pin_A9)
#define MICROPY_HW_UART1_RX (pin_A10)
// NOTE: A0 also connects to the user switch. To use UART4 you should
// set MICROPY_HW_HAS_SWITCH to 0, and also remove SB20 (on the back
// of the board near the USER switch).
#define MICROPY_HW_UART4_TX (pin_A0)
#define MICROPY_HW_UART4_RX (pin_A1)
// NOTE: PC7 is connected to MCLK on the Audio chip. This is an input signal
// so I think as long as you're not using the audio chip then it should
// be fine to use as a UART pin.
// CAN busses
#define MICROPY_HW_CAN1_TX (pin_B9)
#define MICROPY_HW_CAN1_RX (pin_B8)
// USRSW is pulled low. Pressing the button makes the input go high.
#define MICROPY_HW_USRSW_PIN (pin_C0)
#define MICROPY_HW_USRSW_PULL (GPIO_NOPULL)
#define MICROPY_HW_USRSW_EXTI_MODE (GPIO_MODE_IT_RISING)
#define MICROPY_HW_USRSW_PRESSED (1)
// LEDs
#define MICROPY_HW_LED1 (pin_E0) // red
#define MICROPY_HW_LED2 (pin_E1) // green
#define MICROPY_HW_LED3 (pin_E2) // orange
#define MICROPY_HW_LED4 (pin_E3) // blue
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_low(pin))
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_high(pin))
// USB config
#define MICROPY_HW_USB_FS (1)
//*************end mpconfigboard.h