Merge pull request #3457 from ladyada/qtpy_m0

fix pins for rev C
This commit is contained in:
Scott Shawcroft 2020-09-23 11:31:28 -07:00 committed by GitHub
commit bcabf5e019
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 15 deletions

View File

@ -30,9 +30,10 @@
#include "hal/include/hal_gpio.h"
void board_init(void) {
gpio_set_pin_function(PIN_PA18, GPIO_PIN_FUNCTION_OFF);
gpio_set_pin_direction(PIN_PA18, GPIO_DIRECTION_OUT);
gpio_set_pin_level(PIN_PA18, true); // Turn on neopixel by default
gpio_set_pin_function(PIN_PA15, GPIO_PIN_FUNCTION_OFF);
gpio_set_pin_direction(PIN_PA15, GPIO_DIRECTION_OUT);
gpio_set_pin_level(PIN_PA15, true); // Turn on neopixel by default
never_reset_pin_number(PIN_PA15);
}
bool board_requests_safe_mode(void) {

View File

@ -1,7 +1,7 @@
#define MICROPY_HW_BOARD_NAME "Adafruit QT Py M0"
#define MICROPY_HW_MCU_NAME "samd21e18"
#define MICROPY_HW_NEOPIXEL (&pin_PA19)
#define MICROPY_HW_NEOPIXEL (&pin_PA18)
#define MICROPY_PORT_A (0)
#define MICROPY_PORT_B (0)
@ -9,9 +9,9 @@
#define IGNORE_PIN_PA00 1
#define IGNORE_PIN_PA01 1
#define IGNORE_PIN_PA09 1
#define IGNORE_PIN_PA12 1
#define IGNORE_PIN_PA13 1
#define IGNORE_PIN_PA14 1
#define IGNORE_PIN_PA20 1
#define IGNORE_PIN_PA21 1
// USB is always used internally so skip the pin objects for it.
@ -48,8 +48,8 @@
#define DEFAULT_I2C_BUS_SDA (&pin_PA16)
#define DEFAULT_SPI_BUS_SCK (&pin_PA11)
#define DEFAULT_SPI_BUS_MOSI (&pin_PA08)
#define DEFAULT_SPI_BUS_MISO (&pin_PA10)
#define DEFAULT_SPI_BUS_MOSI (&pin_PA10)
#define DEFAULT_SPI_BUS_MISO (&pin_PA09)
#define DEFAULT_UART_BUS_RX (&pin_PA07)
#define DEFAULT_UART_BUS_TX (&pin_PA06)

View File

@ -31,16 +31,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_PA15) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },