Debian Codegraph @

ports/stm32/boards/USBDONGLE_WB55/mpconfigboard.h

raw
1 /* This file is part of the MicroPython project, http://micropython.org/
2 * MIT License; Copyright (c) 2019 Damien P. George
3 */
4
5 #define MICROPY_HW_BOARD_NAME "USBDongle-WB55"
6 #define MICROPY_HW_MCU_NAME "STM32WB55CGU6"
7
8 #define MICROPY_PY_PYB_LEGACY (0)
9
10 #define MICROPY_HW_HAS_FLASH (1)
11 #define MICROPY_HW_ENABLE_RTC (1)
12 #define MICROPY_HW_ENABLE_RNG (1)
13 #define MICROPY_HW_ENABLE_USB (1)
14 #define MICROPY_HW_HAS_SWITCH (1)
15
16 // There is an external 32kHz oscillator
17 #define RTC_ASYNCH_PREDIV (0)
18 #define RTC_SYNCH_PREDIV (0x7fff)
19 #define MICROPY_HW_RTC_USE_LSE (1)
20 #define MICROPY_HW_RTC_USE_US (1)
21
22 // I2C buses
23 #define MICROPY_HW_I2C1_SCL (pin_B8)
24 #define MICROPY_HW_I2C1_SDA (pin_B9)
25
26 // SPI buses
27 #define MICROPY_HW_SPI1_SCK (pin_A5) // pin 8 on CN1
28 #define MICROPY_HW_SPI1_MISO (pin_A6) // pin 9 on CN1
29 #define MICROPY_HW_SPI1_MOSI (pin_A7) // pin 10 on CN1
30
31 // User switch; pressing the button makes the input go low
32 #define MICROPY_HW_USRSW_PIN (pin_A10)
33 #define MICROPY_HW_USRSW_PULL (GPIO_PULLUP)
34 #define MICROPY_HW_USRSW_EXTI_MODE (GPIO_MODE_IT_FALLING)
35 #define MICROPY_HW_USRSW_PRESSED (0)
36
37 // LEDs
38 #define MICROPY_HW_LED1 (pin_B1) // red
39 #define MICROPY_HW_LED2 (pin_B0) // green
40 #define MICROPY_HW_LED3 (pin_A4) // blue
41 #define MICROPY_HW_LED_ON(pin) (mp_hal_pin_high(pin))
42 #define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_low(pin))
43
44 // USB config
45 #define MICROPY_HW_USB_FS (1)
46 #define MICROPY_HW_USB_CDC_RX_DATA_SIZE (512)
47 #define MICROPY_HW_USB_CDC_TX_DATA_SIZE (512)
48
49 // Bluetooth config
50 #define MICROPY_HW_BLE_UART_ID (0)
51 #define MICROPY_HW_BLE_UART_BAUDRATE (115200)