Skip to content

Commit

Permalink
rp2/boards/PIMORONI_PICOLIPO: Refactor Pico LiPo to use board variants.
Browse files Browse the repository at this point in the history
Combine the 4MB and 16MB "PIMORONI_PICOLIPO" variants into a single board.

Signed-off-by: Phil Howard <[email protected]>
  • Loading branch information
Gadgetoid authored and dpgeorge committed Aug 2, 2024
1 parent 11becbe commit cd1ab76
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
"PimoroniPicoLipo_1of3_1024x1024.jpg"
],
"mcu": "rp2040",
"product": "Pico LiPo (16MiB)",
"product": "Pico LiPo",
"thumbnail": "",
"url": "https://shop.pimoroni.com/products/pimoroni-pico-lipo",
"variants": {
"FLASH_16M": "16 MiB Flash"
},
"vendor": "Pimoroni"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// https://shop.pimoroni.com/products/pimoroni-pico-lipo?variant=39386149093459

#ifndef MICROPY_HW_BOARD_NAME
#define MICROPY_HW_BOARD_NAME "Pimoroni Pico LiPo 4MB"
#define MICROPY_HW_FLASH_STORAGE_BYTES (3 * 1024 * 1024)
#endif
#define MICROPY_HW_FLASH_STORAGE_BYTES (PICO_FLASH_SIZE_BYTES - (1 * 1024 * 1024))

#define MICROPY_HW_USB_VID (0x2E8A)
#define MICROPY_HW_USB_PID (0x1002)
Expand All @@ -10,11 +12,3 @@
#define MICROPY_HW_UART1_RX (9)
#define MICROPY_HW_UART1_CTS (10)
#define MICROPY_HW_UART1_RTS (11)

// User LED GPIO25

// VBUS_SENSE GPIO24

// BAT_SENSE GPIO29

// Boot button GPIO23
6 changes: 6 additions & 0 deletions ports/rp2/boards/PIMORONI_PICOLIPO/mpconfigvariant.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set(PICO_BOARD "pimoroni_picolipo_4mb")

# Override the MicroPython board name
list(APPEND MICROPY_DEF_BOARD
MICROPY_HW_BOARD_NAME="Pimoroni Pico LiPo 4MB"
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set(PICO_BOARD "pimoroni_picolipo_16mb")

# Override the MicroPython board name
list(APPEND MICROPY_DEF_BOARD
MICROPY_HW_BOARD_NAME="Pimoroni Pico LiPo 16MB"
)
31 changes: 31 additions & 0 deletions ports/rp2/boards/PIMORONI_PICOLIPO/pins.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
GP0,GPIO0
GP1,GPIO1
GP2,GPIO2
GP3,GPIO3
GP4,GPIO4
GP5,GPIO5
GP6,GPIO6
GP7,GPIO7
GP8,GPIO8
GP9,GPIO9
GP10,GPIO10
GP11,GPIO11
GP12,GPIO12
GP13,GPIO13
GP14,GPIO14
GP15,GPIO15
GP16,GPIO16
GP17,GPIO17
GP18,GPIO18
GP19,GPIO19
GP20,GPIO20
GP21,GPIO21
GP22,GPIO22
GP25,GPIO25
GP26,GPIO26
GP27,GPIO27
GP28,GPIO28
BOOT,GPIO23
VBUS_SENSE,GPIO24
LED,GPIO25
BAT_SENSE,GPIO29

This file was deleted.

20 changes: 0 additions & 20 deletions ports/rp2/boards/PIMORONI_PICOLIPO_16MB/mpconfigboard.h

This file was deleted.

1 change: 0 additions & 1 deletion ports/rp2/boards/PIMORONI_PICOLIPO_16MB/pins.csv

This file was deleted.

21 changes: 0 additions & 21 deletions ports/rp2/boards/PIMORONI_PICOLIPO_4MB/board.json

This file was deleted.

1 change: 0 additions & 1 deletion ports/rp2/boards/PIMORONI_PICOLIPO_4MB/pins.csv

This file was deleted.

0 comments on commit cd1ab76

Please sign in to comment.