2019-07-17 07:51:24 +01:00
|
|
|
/* This file is part of the MicroPython project, http://micropython.org/
|
|
|
|
* MIT License; Copyright (c) 2019 Damien P. George
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define MICROPY_HW_BOARD_NAME "USBDongle-WB55"
|
|
|
|
#define MICROPY_HW_MCU_NAME "STM32WB55CGU6"
|
|
|
|
|
|
|
|
#define MICROPY_PY_PYB_LEGACY (0)
|
|
|
|
|
2019-12-04 23:16:10 +00:00
|
|
|
#define MICROPY_HW_HAS_FLASH (1)
|
2019-07-17 07:51:24 +01:00
|
|
|
#define MICROPY_HW_ENABLE_RTC (1)
|
|
|
|
#define MICROPY_HW_ENABLE_RNG (1)
|
|
|
|
#define MICROPY_HW_ENABLE_USB (1)
|
|
|
|
#define MICROPY_HW_HAS_SWITCH (1)
|
|
|
|
|
|
|
|
// There is an external 32kHz oscillator
|
|
|
|
#define RTC_ASYNCH_PREDIV (0)
|
|
|
|
#define RTC_SYNCH_PREDIV (0x7fff)
|
|
|
|
#define MICROPY_HW_RTC_USE_LSE (1)
|
|
|
|
#define MICROPY_HW_RTC_USE_US (1)
|
|
|
|
|
|
|
|
// I2C buses
|
|
|
|
#define MICROPY_HW_I2C1_SCL (pin_B8)
|
|
|
|
#define MICROPY_HW_I2C1_SDA (pin_B9)
|
|
|
|
|
2020-06-01 12:38:11 +01:00
|
|
|
// SPI buses
|
|
|
|
#define MICROPY_HW_SPI1_SCK (pin_A5) // pin 8 on CN1
|
|
|
|
#define MICROPY_HW_SPI1_MISO (pin_A6) // pin 9 on CN1
|
|
|
|
#define MICROPY_HW_SPI1_MOSI (pin_A7) // pin 10 on CN1
|
|
|
|
|
2019-07-17 07:51:24 +01:00
|
|
|
// User switch; pressing the button makes the input go low
|
|
|
|
#define MICROPY_HW_USRSW_PIN (pin_A10)
|
|
|
|
#define MICROPY_HW_USRSW_PULL (GPIO_PULLUP)
|
|
|
|
#define MICROPY_HW_USRSW_EXTI_MODE (GPIO_MODE_IT_FALLING)
|
|
|
|
#define MICROPY_HW_USRSW_PRESSED (0)
|
|
|
|
|
|
|
|
// LEDs
|
|
|
|
#define MICROPY_HW_LED1 (pin_B1) // red
|
|
|
|
#define MICROPY_HW_LED2 (pin_B0) // green
|
|
|
|
#define MICROPY_HW_LED3 (pin_A4) // blue
|
|
|
|
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
|
|
|
|
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
|
|
|
|
|
|
|
|
// USB config
|
|
|
|
#define MICROPY_HW_USB_FS (1)
|
2021-08-05 03:21:58 +01:00
|
|
|
#define MICROPY_HW_USB_CDC_RX_DATA_SIZE (512)
|
|
|
|
#define MICROPY_HW_USB_CDC_TX_DATA_SIZE (512)
|
2019-11-01 03:56:48 +00:00
|
|
|
|
|
|
|
// Bluetooth config
|
|
|
|
#define MICROPY_HW_BLE_UART_ID (0)
|
|
|
|
#define MICROPY_HW_BLE_UART_BAUDRATE (115200)
|