Skip to content

Commit

Permalink
Merge pull request microsoft#88 from ladyada/master
Browse files Browse the repository at this point in the history
add m4 hallowing & m4sk + fixes UART defs on pygamer/pybadge
  • Loading branch information
dhalbert authored Oct 28, 2019
2 parents 5f3168c + 2a38099 commit 63b4c6f
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 35 deletions.
24 changes: 12 additions & 12 deletions boards/arcade_pybadge/board_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@

#define BOARD_SCREEN 1

#define BOOT_USART_MODULE SERCOM3
#define BOOT_USART_MASK APBAMASK
#define BOOT_USART_BUS_CLOCK_INDEX MCLK_APBBMASK_SERCOM3
#define BOOT_USART_MODULE SERCOM5
#define BOOT_USART_MASK APBDMASK
#define BOOT_USART_BUS_CLOCK_INDEX MCLK_APBDMASK_SERCOM5
#define BOOT_USART_PAD_SETTINGS UART_RX_PAD1_TX_PAD0
#define BOOT_USART_PAD3 PINMUX_UNUSED
#define BOOT_USART_PAD2 PINMUX_UNUSED
#define BOOT_USART_PAD1 PINMUX_PA22C_SERCOM3_PAD0
#define BOOT_USART_PAD0 PINMUX_PA23C_SERCOM3_PAD1
#define BOOT_GCLK_ID_CORE SERCOM3_GCLK_ID_CORE
#define BOOT_GCLK_ID_SLOW SERCOM3_GCLK_ID_SLOW
#define BOOT_USART_PAD1 PINMUX_PB17C_SERCOM5_PAD1
#define BOOT_USART_PAD0 PINMUX_PB16C_SERCOM5_PAD0
#define BOOT_GCLK_ID_CORE SERCOM5_GCLK_ID_CORE
#define BOOT_GCLK_ID_SLOW SERCOM5_GCLK_ID_SLOW


#define HAS_CONFIG_DATA 1
Expand All @@ -41,21 +41,21 @@ const uint32_t config_data[] = {
513675505, 539130489, // magic
62, 100, // used entries, total entries
1, 0x2e, // PIN_ACCELEROMETER_INT = PB14
2, 0xd, // PIN_ACCELEROMETER_SCL = PIN_SCL
3, 0xc, // PIN_ACCELEROMETER_SDA = PIN_SDA
2, 0xd, // PIN_ACCELEROMETER_SCL = PIN_SCL (PA13)
3, 0xc, // PIN_ACCELEROMETER_SDA = PIN_SDA (PA12)
4, 0x3ee, // PIN_BTN_A = P_1006
5, 0x3ef, // PIN_BTN_B = P_1007
13, 0x17, // PIN_LED = PIN_D13
13, 0x17, // PIN_LED = PIN_D13 (PA23)
14, 0x24, // PIN_LIGHT = PB04
18, 0x36, // PIN_MISO = PB22
19, 0x37, // PIN_MOSI = PB23
20, 0xf, // PIN_NEOPIXEL = PA15
21, 0x11, // PIN_RX = PA17
21, 0x31, // PIN_RX = PB17
23, 0x11, // PIN_SCK = PA17
24, 0xd, // PIN_SCL = PA13
25, 0xc, // PIN_SDA = PA12
26, 0x1b, // PIN_SPEAKER_AMP = PA27
28, 0x10, // PIN_TX = PA16
28, 0x30, // PIN_TX = PB16
32, 0x2d, // PIN_DISPLAY_SCK = PB13
34, 0x2f, // PIN_DISPLAY_MOSI = PB15
35, 0x27, // PIN_DISPLAY_CS = PB07
Expand Down
20 changes: 10 additions & 10 deletions boards/arcade_pybadge_lc/board_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@

#define BOARD_SCREEN 1

#define BOOT_USART_MODULE SERCOM3
#define BOOT_USART_MASK APBAMASK
#define BOOT_USART_BUS_CLOCK_INDEX MCLK_APBBMASK_SERCOM3
#define BOOT_USART_MODULE SERCOM5
#define BOOT_USART_MASK APBDMASK
#define BOOT_USART_BUS_CLOCK_INDEX MCLK_APBDMASK_SERCOM5
#define BOOT_USART_PAD_SETTINGS UART_RX_PAD1_TX_PAD0
#define BOOT_USART_PAD3 PINMUX_UNUSED
#define BOOT_USART_PAD2 PINMUX_UNUSED
#define BOOT_USART_PAD1 PINMUX_PA22C_SERCOM3_PAD0
#define BOOT_USART_PAD0 PINMUX_PA23C_SERCOM3_PAD1
#define BOOT_GCLK_ID_CORE SERCOM3_GCLK_ID_CORE
#define BOOT_GCLK_ID_SLOW SERCOM3_GCLK_ID_SLOW
#define BOOT_USART_PAD1 PINMUX_PB17C_SERCOM5_PAD1
#define BOOT_USART_PAD0 PINMUX_PB16C_SERCOM5_PAD0
#define BOOT_GCLK_ID_CORE SERCOM5_GCLK_ID_CORE
#define BOOT_GCLK_ID_SLOW SERCOM5_GCLK_ID_SLOW


#define HAS_CONFIG_DATA 1
Expand All @@ -42,17 +42,17 @@ const uint32_t config_data[] = {
58, 100, // used entries, total entries
4, 0x3ee, // PIN_BTN_A = P_1006
5, 0x3ef, // PIN_BTN_B = P_1007
13, 0x17, // PIN_LED = PIN_D13
13, 0x17, // PIN_LED = PIN_D13 (PA23)
14, 0x24, // PIN_LIGHT = PB04
18, 0x36, // PIN_MISO = PB22
19, 0x37, // PIN_MOSI = PB23
20, 0xf, // PIN_NEOPIXEL = PA15
21, 0x11, // PIN_RX = PA17
21, 0x31, // PIN_RX = PB17
23, 0x11, // PIN_SCK = PA17
24, 0xd, // PIN_SCL = PA13
25, 0xc, // PIN_SDA = PA12
26, 0x1b, // PIN_SPEAKER_AMP = PA27
28, 0x10, // PIN_TX = PA16
28, 0x30, // PIN_TX = PB16
32, 0x2d, // PIN_DISPLAY_SCK = PB13
34, 0x2f, // PIN_DISPLAY_MOSI = PB15
35, 0x27, // PIN_DISPLAY_CS = PB07
Expand Down
26 changes: 13 additions & 13 deletions boards/arcade_pygamer/board_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#define VENDOR_NAME "Adafruit Industries"
#define PRODUCT_NAME "PyGamer"
#define VOLUME_LABEL "PYGAMERBOOT"
#define INDEX_URL "http://adafru.it/"
#define INDEX_URL "http://adafru.it/4242"
#define BOARD_ID "SAMD51J19A-PyGamer-M4"

#define USB_VID 0x239A
Expand All @@ -17,16 +17,16 @@

#define BOARD_SCREEN 1

#define BOOT_USART_MODULE SERCOM3
#define BOOT_USART_MASK APBAMASK
#define BOOT_USART_BUS_CLOCK_INDEX MCLK_APBBMASK_SERCOM3
#define BOOT_USART_MODULE SERCOM5
#define BOOT_USART_MASK APBDMASK
#define BOOT_USART_BUS_CLOCK_INDEX MCLK_APBDMASK_SERCOM5
#define BOOT_USART_PAD_SETTINGS UART_RX_PAD1_TX_PAD0
#define BOOT_USART_PAD3 PINMUX_UNUSED
#define BOOT_USART_PAD2 PINMUX_UNUSED
#define BOOT_USART_PAD1 PINMUX_PA22C_SERCOM3_PAD0
#define BOOT_USART_PAD0 PINMUX_PA23C_SERCOM3_PAD1
#define BOOT_GCLK_ID_CORE SERCOM3_GCLK_ID_CORE
#define BOOT_GCLK_ID_SLOW SERCOM3_GCLK_ID_SLOW
#define BOOT_USART_PAD1 PINMUX_PB17C_SERCOM5_PAD1
#define BOOT_USART_PAD0 PINMUX_PB16C_SERCOM5_PAD0
#define BOOT_GCLK_ID_CORE SERCOM5_GCLK_ID_CORE
#define BOOT_GCLK_ID_SLOW SERCOM5_GCLK_ID_SLOW


#define HAS_CONFIG_DATA 1
Expand All @@ -41,21 +41,21 @@ const uint32_t config_data[] = {
513675505, 539130489, // magic
62, 100, // used entries, total entries
1, 0x2e, // PIN_ACCELEROMETER_INT = PB14
2, 0xd, // PIN_ACCELEROMETER_SCL = PIN_SCL
3, 0xc, // PIN_ACCELEROMETER_SDA = PIN_SDA
2, 0xd, // PIN_ACCELEROMETER_SCL = PIN_SCL (PA13)
3, 0xc, // PIN_ACCELEROMETER_SDA = PIN_SDA (PA12)
4, 0x3ee, // PIN_BTN_A = P_1006
5, 0x3ef, // PIN_BTN_B = P_1007
13, 0x17, // PIN_LED = PIN_D13
13, 0x17, // PIN_LED = PIN_D13 (PA23)
14, 0x24, // PIN_LIGHT = PB04
18, 0x36, // PIN_MISO = PB22
19, 0x37, // PIN_MOSI = PB23
20, 0xf, // PIN_NEOPIXEL = PA15
21, 0x11, // PIN_RX = PA17
21, 0x31, // PIN_RX = PB17
23, 0x11, // PIN_SCK = PA17
24, 0xd, // PIN_SCL = PA13
25, 0xc, // PIN_SDA = PA12
26, 0x1b, // PIN_SPEAKER_AMP = PA27
28, 0x10, // PIN_TX = PA16
28, 0x30, // PIN_TX = PB16
32, 0x2d, // PIN_DISPLAY_SCK = PB13
34, 0x2f, // PIN_DISPLAY_MOSI = PB15
35, 0x2c, // PIN_DISPLAY_CS = PB12
Expand Down
2 changes: 2 additions & 0 deletions boards/hallowing_m4/board.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CHIP_FAMILY = samd51
CHIP_VARIANT = SAMD51J19A
31 changes: 31 additions & 0 deletions boards/hallowing_m4/board_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#ifndef BOARD_CONFIG_H
#define BOARD_CONFIG_H

#define CRYSTALLESS 1

#define VENDOR_NAME "Adafruit Industries"
#define PRODUCT_NAME "HalloWing M4"
#define VOLUME_LABEL "HALLOM4BOOT"
#define INDEX_URL "http://adafru.it/"
#define BOARD_ID "SAMD51J19A-HalloM4-v0"

#define USB_VID 0x239A
#define USB_PID 0x0049

#define LED_PIN PIN_PA23

#define BOARD_NEOPIXEL_PIN PIN_PB16
#define BOARD_NEOPIXEL_COUNT 4

#define BOOT_USART_MODULE SERCOM4
#define BOOT_USART_MASK APBDMASK
#define BOOT_USART_BUS_CLOCK_INDEX MCLK_APBDMASK_SERCOM4
#define BOOT_USART_PAD_SETTINGS UART_RX_PAD1_TX_PAD0
#define BOOT_USART_PAD3 PINMUX_UNUSED
#define BOOT_USART_PAD2 PINMUX_UNUSED
#define BOOT_USART_PAD1 PINMUX_PB13C_SERCOM4_PAD1
#define BOOT_USART_PAD0 PINMUX_PB12C_SERCOM4_PAD0
#define BOOT_GCLK_ID_CORE SERCOM4_GCLK_ID_CORE
#define BOOT_GCLK_ID_SLOW SERCOM4_GCLK_ID_SLOW

#endif
2 changes: 2 additions & 0 deletions boards/hallowing_mask/board.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CHIP_FAMILY = samd51
CHIP_VARIANT = SAMD51G19A
29 changes: 29 additions & 0 deletions boards/hallowing_mask/board_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#ifndef BOARD_CONFIG_H
#define BOARD_CONFIG_H

#define CRYSTALLESS 1

#define VENDOR_NAME "Adafruit Industries"
#define PRODUCT_NAME "Hallowing Mask M4"
#define VOLUME_LABEL "MASKM4BOOT"
#define INDEX_URL "http://adafru.it/"
#define BOARD_ID "SAMD51G19A-Mask-v0"

#define USB_VID 0x239A
#define USB_PID 0x0047

#define LED_PIN PIN_PA27

// There isnt a clear UART but we can make one on the D2/D3 ports
#define BOOT_USART_MODULE SERCOM4
#define BOOT_USART_MASK APBDMASK
#define BOOT_USART_BUS_CLOCK_INDEX MCLK_APBDMASK_SERCOM4
#define BOOT_USART_PAD_SETTINGS UART_RX_PAD1_TX_PAD0
#define BOOT_USART_PAD3 PINMUX_UNUSED
#define BOOT_USART_PAD2 PINMUX_UNUSED
#define BOOT_USART_PAD1 PINMUX_PB09D_SERCOM4_PAD1
#define BOOT_USART_PAD0 PINMUX_PB08D_SERCOM4_PAD0
#define BOOT_GCLK_ID_CORE SERCOM4_GCLK_ID_CORE
#define BOOT_GCLK_ID_SLOW SERCOM4_GCLK_ID_SLOW

#endif

0 comments on commit 63b4c6f

Please sign in to comment.