Slim down Arduino Zero build by turning off mass storage LEDs.

This commit is contained in:
Scott Shawcroft 2016-11-29 14:07:08 -08:00
parent 94bde17256
commit ddfa7595b0
2 changed files with 12 additions and 14 deletions

View File

@ -18,20 +18,20 @@ extern struct usart_module usart_instance;
void configure_usart(void) void configure_usart(void)
{ {
struct usart_config config_usart; struct usart_config config_usart;
usart_get_config_defaults(&config_usart); usart_get_config_defaults(&config_usart);
config_usart.baudrate = 115200; config_usart.baudrate = 115200;
config_usart.mux_setting = EDBG_CDC_SERCOM_MUX_SETTING; config_usart.mux_setting = EDBG_CDC_SERCOM_MUX_SETTING;
config_usart.pinmux_pad0 = EDBG_CDC_SERCOM_PINMUX_PAD0; config_usart.pinmux_pad0 = EDBG_CDC_SERCOM_PINMUX_PAD0;
config_usart.pinmux_pad1 = EDBG_CDC_SERCOM_PINMUX_PAD1; config_usart.pinmux_pad1 = EDBG_CDC_SERCOM_PINMUX_PAD1;
config_usart.pinmux_pad2 = EDBG_CDC_SERCOM_PINMUX_PAD2; config_usart.pinmux_pad2 = EDBG_CDC_SERCOM_PINMUX_PAD2;
config_usart.pinmux_pad3 = EDBG_CDC_SERCOM_PINMUX_PAD3; config_usart.pinmux_pad3 = EDBG_CDC_SERCOM_PINMUX_PAD3;
while (usart_init(&usart_instance, EDBG_CDC_MODULE, &config_usart) != STATUS_OK) { while (usart_init(&usart_instance, EDBG_CDC_MODULE, &config_usart) != STATUS_OK) {
} }
usart_enable(&usart_instance); usart_enable(&usart_instance);
} }
void board_init(void) void board_init(void)

View File

@ -3,12 +3,10 @@
#define MICROPY_HW_BOARD_NAME "Arduino Zero" #define MICROPY_HW_BOARD_NAME "Arduino Zero"
#define MICROPY_HW_MCU_NAME "samd21g18" #define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_HW_LED_MSC PIN_PA17 // red // #define MICROPY_HW_LED_MSC PIN_PA17 // red
#define MICROPY_HW_LED_TX PIN_PA27 #define MICROPY_HW_LED_TX PIN_PA27
#define MICROPY_HW_LED_RX PIN_PB03 #define MICROPY_HW_LED_RX PIN_PB03
#define MICROPY_HW_NEOPIXEL &pin_PB22
#define AUTORESET_DELAY_MS 500 #define AUTORESET_DELAY_MS 500
#include "internal_flash.h" #include "internal_flash.h"