mirror of
https://github.com/clockworkpi/PicoCalc.git
synced 2026-03-22 20:12:38 +01:00
add pico_multi_booter code
This commit is contained in:
45
Code/pico_multi_booter/sd_boot/config.h
Normal file
45
Code/pico_multi_booter/sd_boot/config.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
// GPIOs for SPI interface (SD card)
|
||||
#define SD_SPI0 0
|
||||
#define SD_SCLK_PIN 18
|
||||
#define SD_MOSI_PIN 19
|
||||
#define SD_MISO_PIN 16
|
||||
#define SD_CS_PIN 17
|
||||
#define SD_DET_PIN 22
|
||||
|
||||
#define LCD_SPI1 1
|
||||
#define LCD_SCK_PIN 10
|
||||
#define LCD_MOSI_PIN 11
|
||||
#define LCD_MISO_PIN 12
|
||||
#define LCD_CS_PIN 13
|
||||
#define LCD_DC_PIN 14
|
||||
#define LCD_RST_PIN 15
|
||||
|
||||
// GPIOs for audio output
|
||||
#define AUDIO_LEFT 28
|
||||
#define AUDIO_RIGHT 27
|
||||
|
||||
// GPIOs for buttons
|
||||
#define NEXT_BUTTON 2
|
||||
#define PART_BUTTON 3
|
||||
|
||||
// Pico-internal GPIOs
|
||||
#define PICO_PS 23
|
||||
#define LED_PIN 25
|
||||
|
||||
|
||||
|
||||
// PicoCalc SD Firmware Loader
|
||||
// SD_BOOT_FLASH_OFFSET is the offset in flash memory where the bootloader starts
|
||||
// According to the applink.map ,with combined PicoMite, here is 920k
|
||||
// This offset is used to ensure that the bootloader does not get overwritten
|
||||
// when loading a new application from the SD card
|
||||
#define SD_BOOT_FLASH_OFFSET (940 * 1024)
|
||||
|
||||
// Maximum size of the application that can be loaded
|
||||
// This ensures we don't overwrite the bootloader itself
|
||||
#define MAX_APP_SIZE (PICO_FLASH_SIZE_BYTES - SD_BOOT_FLASH_OFFSET)
|
||||
|
||||
#endif // CONFIG_H
|
||||
Reference in New Issue
Block a user