diff --git a/ports/atmel-samd/boards/ugame/board.c b/ports/atmel-samd/boards/ugame10/board.c similarity index 100% rename from ports/atmel-samd/boards/ugame/board.c rename to ports/atmel-samd/boards/ugame10/board.c diff --git a/ports/atmel-samd/boards/ugame/mpconfigboard.h b/ports/atmel-samd/boards/ugame10/mpconfigboard.h similarity index 84% rename from ports/atmel-samd/boards/ugame/mpconfigboard.h rename to ports/atmel-samd/boards/ugame10/mpconfigboard.h index 8a68b39cb1..16a792f421 100644 --- a/ports/atmel-samd/boards/ugame/mpconfigboard.h +++ b/ports/atmel-samd/boards/ugame10/mpconfigboard.h @@ -1,4 +1,4 @@ -#define MICROPY_HW_BOARD_NAME "uGame" +#define MICROPY_HW_BOARD_NAME "uGame10" #define MICROPY_HW_MCU_NAME "samd21e18" // Salae reads 12mhz which is the limit even though we set it to the @@ -8,7 +8,7 @@ #define SPI_FLASH_MOSI_PIN PIN_PA16 #define SPI_FLASH_MISO_PIN PIN_PA19 #define SPI_FLASH_SCK_PIN PIN_PA17 -#define SPI_FLASH_CS_PIN PIN_PA11 +#define SPI_FLASH_CS_PIN PIN_PA18 #define SPI_FLASH_MOSI_PIN_FUNCTION PINMUX_PA16D_SERCOM3_PAD0 #define SPI_FLASH_MISO_PIN_FUNCTION PINMUX_PA19D_SERCOM3_PAD3 #define SPI_FLASH_SCK_PIN_FUNCTION PINMUX_PA17D_SERCOM3_PAD1 @@ -26,9 +26,8 @@ #define SPI_FLASH_DIPO 3 // same as MISO pad // These are pins not to reset. -#define MICROPY_PORT_A (PORT_PA11 | PORT_PA16 |\ - PORT_PA17 | PORT_PA18 | PORT_PA19 | PORT_PA24 |\ - PORT_PA25) +#define MICROPY_PORT_A (PORT_PA16 | PORT_PA17 | PORT_PA18 | PORT_PA19 |\ + PORT_PA24 | PORT_PA25) #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) diff --git a/ports/atmel-samd/boards/ugame/mpconfigboard.mk b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk similarity index 91% rename from ports/atmel-samd/boards/ugame/mpconfigboard.mk rename to ports/atmel-samd/boards/ugame10/mpconfigboard.mk index 4c7f223695..343115fbb4 100644 --- a/ports/atmel-samd/boards/ugame/mpconfigboard.mk +++ b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk @@ -2,7 +2,7 @@ LD_FILE = boards/samd21x18-bootloader-external-flash-crystalless.ld #LD_FILE = boards/samd21x18-bootloader.ld USB_VID = 0x239A USB_PID = 0x801F -USB_PRODUCT = "uGame" +USB_PRODUCT = "uGame10" USB_MANUFACTURER = "Radomir Dopieralski" SPI_FLASH_FILESYSTEM = 1 diff --git a/ports/atmel-samd/boards/ugame/pins.c b/ports/atmel-samd/boards/ugame10/pins.c similarity index 54% rename from ports/atmel-samd/boards/ugame/pins.c rename to ports/atmel-samd/boards/ugame10/pins.c index b9c8f2386e..af516a401d 100644 --- a/ports/atmel-samd/boards/ugame/pins.c +++ b/ports/atmel-samd/boards/ugame10/pins.c @@ -5,14 +5,23 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_O), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_MUTE), MP_ROM_PTR(&pin_PA23) }, + + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_UP), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_LEFT), MP_ROM_PTR(&pin_PA04) }, - { MP_ROM_QSTR(MP_QSTR_DOWN), MP_ROM_PTR(&pin_PA23) }, + { MP_ROM_QSTR(MP_QSTR_DOWN), MP_ROM_PTR(&pin_PA22) }, { MP_ROM_QSTR(MP_QSTR_RIGHT), MP_ROM_PTR(&pin_PA05) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA06) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA07) }, - { MP_ROM_QSTR(MP_QSTR_DC), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_DC), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_PA08) }, + + { MP_ROM_QSTR(MP_QSTR_A), MP_ROM_PTR(&pin_PA11) }, + { MP_ROM_QSTR(MP_QSTR_B), MP_ROM_PTR(&pin_PA14) }, + { MP_ROM_QSTR(MP_QSTR_C), MP_ROM_PTR(&pin_PA15) }, + { MP_ROM_QSTR(MP_QSTR_D), MP_ROM_PTR(&pin_PA28) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);