Skip to content

Commit fc8f416

Browse files
committed
STM32G4: AEMICS Board with USB, QPSI, code formatted.
1 parent 84a6a53 commit fc8f416

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

ports/stm32/boards/AEMICS_PYglet/bdev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ STATIC const mp_soft_qspi_obj_t soft_qspi_bus = {
4646

4747
const mp_spiflash_config_t spiflash_config = {
4848
.bus_kind = MP_SPIFLASH_BUS_QSPI,
49-
.bus.u_qspi.data = (void*)&soft_qspi_bus,
49+
.bus.u_qspi.data = (void *)&soft_qspi_bus,
5050
.bus.u_qspi.proto = &mp_soft_qspi_proto,
5151
#if MICROPY_HW_SPIFLASH_ENABLE_CACHE
5252
.cache = &spi_bdev_cache,

ports/stm32/boards/AEMICS_PYglet/deploy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The board can also be programmed via the ST DFU bootloader, using e.g. [dfu-util
88
To enter the bootloader the `BOOT0` pin can be connected to `3V3` during reset, or you can use `machine.bootloader()` from the MicroPython REPL.
99

1010
```bash
11-
dfu-util --alt 0 -D firmware.dfu
11+
dfu-util --alt 0 -D build-AEMICS_PYglet/firmware.dfu
1212
```
1313

1414
`3V3` is on Pin 1 of the PYglet module.

ports/stm32/boards/AEMICS_PYglet/mpconfigboard.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#define MICROPY_HW_HAS_SWITCH (1)
1212
#define MICROPY_HW_HAS_LED (1)
1313
#define MICROPY_HW_HAS_FLASH (1) // QSPI extflash mounted
14-
//#define MICROPY_HW_UART_REPL (1)
15-
//#define MICROPY_HW_UART_REPL_BAUD (115200)
14+
// #define MICROPY_HW_UART_REPL (1)
15+
// #define MICROPY_HW_UART_REPL_BAUD (115200)
1616

1717
#define MICROPY_BOARD_EARLY_INIT board_early_init
1818
void board_early_init(void);
@@ -55,12 +55,12 @@ void board_early_init(void);
5555
#define MICROPY_HW_UART4_RX (pin_C11)
5656

5757
// xSPI
58-
//SPI1
58+
// SPI1
5959
#define MICROPY_HW_SPI1_NSS (pin_A3)
6060
#define MICROPY_HW_SPI1_SCK (pin_A5)
6161
#define MICROPY_HW_SPI1_MISO (pin_B4)
6262
#define MICROPY_HW_SPI1_MOSI (pin_B5)
63-
//SPI2
63+
// SPI2
6464
#define MICROPY_HW_SPI2_NSS (pin_B12)
6565
#define MICROPY_HW_SPI2_SCK (pin_B13)
6666
#define MICROPY_HW_SPI2_MISO (pin_B14)
@@ -71,7 +71,7 @@ void board_early_init(void);
7171
// #define MICROPY_HW_SPI3_MISO (pin_C11)
7272
// #define MICROPY_HW_SPI3_MOSI (pin_C12)
7373

74-
//QSPI1
74+
// QSPI1
7575
// 8MBit external QSPI flash, used for either the filesystem or XIP memory mapped
7676
#define MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2 (23)
7777
#define MICROPY_HW_QSPIFLASH_CS (pin_A2)
@@ -89,7 +89,7 @@ extern struct _spi_bdev_t spi_bdev;
8989
(op) == BDEV_IOCTL_NUM_BLOCKS ? ((1 << MICROPY_HW_QSPIFLASH_SIZE_BITS_LOG2) / 8 / FLASH_BLOCK_SIZE) : \
9090
(op) == BDEV_IOCTL_INIT ? spi_bdev_ioctl(&spi_bdev, (op), (uint32_t)&spiflash_config) : \
9191
spi_bdev_ioctl(&spi_bdev, (op), (arg)) \
92-
)
92+
)
9393
#define MICROPY_HW_BDEV_READBLOCKS(dest, bl, n) spi_bdev_readblocks(&spi_bdev, (dest), (bl), (n))
9494
#define MICROPY_HW_BDEV_WRITEBLOCKS(src, bl, n) spi_bdev_writeblocks(&spi_bdev, (src), (bl), (n))
9595
#define MICROPY_HW_BDEV_SPIFLASH_EXTENDED (&spi_bdev) // for extended block protocol
@@ -105,4 +105,3 @@ extern struct _spi_bdev_t spi_bdev;
105105
#define MICROPY_HW_LED1 (pin_B7) // Red
106106
#define MICROPY_HW_LED_ON(pin) (mp_hal_pin_low(pin))
107107
#define MICROPY_HW_LED_OFF(pin) (mp_hal_pin_high(pin))
108-

0 commit comments

Comments
 (0)