// Board and hardware specific configuration
#define MICROPY_HW_BOARD_NAME                   "Pico Display Pack2"
#define MICROPY_HW_FLASH_STORAGE_BYTES          (1024 * 1024)

#define MICROPY_HW_SPI0_SCK     (18)     // MPY default:6
#define MICROPY_HW_SPI0_MOSI    (19)     // MPY default:7
#define MICROPY_HW_SPI0_MISO    (4)     // MPY default:4

#define MICROPY_HW_UART1_TX (8)     // MPY default:4
#define MICROPY_HW_UART1_RX (9)     // MPY default:5
#define MICROPY_HW_UART1_CTS (6)    // MPY default:6
#define MICROPY_HW_UART1_RTS (7)    // MPY default:7

#define MICROPY_HW_ENABLE_LCDSPI        (1)
#if MICROPY_HW_ENABLE_LCDSPI
#define MICROPY_HW_ENABLE_LCD_CONSOLE   (1)
#endif

#if MICROPY_HW_ENABLE_LCDSPI
#include "lcdspi.h"
#define MICROPY_HW_LCDSPI_ID    (PIM580)
#define MICROPY_HW_LCDSPI_DIR   (LCDSPI_ROTATE_0)
#define MICROPY_HW_LCDSPI_CH    (0)
#define MICROPY_HW_LCDSPI_CLK   (18)
#define MICROPY_HW_LCDSPI_MOSI  (19)
#define MICROPY_HW_LCDSPI_MISO  (PIN_NONE)
#define MICROPY_HW_LCDSPI_CS    (17)
#define MICROPY_HW_LCDSPI_RESET (23)
#define MICROPY_HW_LCDSPI_RS    (16)
#define MICROPY_HW_LCDSPI_BL    (20)
#endif

#if MICROPY_HW_ENABLE_LCD_CONSOLE
#include "lcdspi.h"
#define MICROPY_HW_LCDSPI_CON_ID    (PIM580)
#define MICROPY_HW_LCDSPI_CON_DIR   (LCDSPI_ROTATE_90)
#define MICROPY_HW_LCDSPI_CON_CH    (0)
#define MICROPY_HW_LCDSPI_CON_CLK   (18)
#define MICROPY_HW_LCDSPI_CON_MOSI  (19)
#define MICROPY_HW_LCDSPI_CON_MISO  (PIN_NONE)
#define MICROPY_HW_LCDSPI_CON_CS    (17)
#define MICROPY_HW_LCDSPI_CON_RESET (23)
#define MICROPY_HW_LCDSPI_CON_RS    (16)
#define MICROPY_HW_LCDSPI_CON_BL    (20)
#endif

// USB DEVICE
// #define MICROPY_HW_ENABLE_UART_REPL 0
// #define MICROPY_HW_ENABLE_USBDEV    1
// #define MICROPY_HW_ENABLE_USBHOST   0

// USB HOST - USB Keyboard
// Need to comment out TU_LOG1_MEM in tinyusb/src/class/hid/hid_host.c
// Note: CMAKE_BUILD_TYPE=Debug -> CFG_TUSB_DEBUG=1
#define MICROPY_HW_ENABLE_UART_REPL 1
#define MICROPY_HW_ENABLE_USBDEV    0
#define MICROPY_HW_ENABLE_USBHOST   1

#if MICROPY_HW_ENABLE_LCDSPI
#define MICROPY_PY_PYB_LCDSPI       (1)
#endif
#define MICROPY_PY_PYB_FONT         (1)
#define MICROPY_PY_PYB_UNICODE_FONT (1)
