fix pins for rev C

This commit is contained in:
lady ada 2020-09-22 23:28:23 -04:00
parent cc57ef8368
commit 5384479a61
3 changed files with 15 additions and 15 deletions

View File

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

View File

@ -1,7 +1,7 @@
#define MICROPY_HW_BOARD_NAME "Adafruit QT Py M0" #define MICROPY_HW_BOARD_NAME "Adafruit QT Py M0"
#define MICROPY_HW_MCU_NAME "samd21e18" #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_A (0)
#define MICROPY_PORT_B (0) #define MICROPY_PORT_B (0)
@ -9,9 +9,9 @@
#define IGNORE_PIN_PA00 1 #define IGNORE_PIN_PA00 1
#define IGNORE_PIN_PA01 1 #define IGNORE_PIN_PA01 1
#define IGNORE_PIN_PA09 1
#define IGNORE_PIN_PA12 1 #define IGNORE_PIN_PA12 1
#define IGNORE_PIN_PA13 1 #define IGNORE_PIN_PA13 1
#define IGNORE_PIN_PA14 1
#define IGNORE_PIN_PA20 1 #define IGNORE_PIN_PA20 1
#define IGNORE_PIN_PA21 1 #define IGNORE_PIN_PA21 1
// USB is always used internally so skip the pin objects for it. // 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_I2C_BUS_SDA (&pin_PA16)
#define DEFAULT_SPI_BUS_SCK (&pin_PA11) #define DEFAULT_SPI_BUS_SCK (&pin_PA11)
#define DEFAULT_SPI_BUS_MOSI (&pin_PA08) #define DEFAULT_SPI_BUS_MOSI (&pin_PA10)
#define DEFAULT_SPI_BUS_MISO (&pin_PA10) #define DEFAULT_SPI_BUS_MISO (&pin_PA09)
#define DEFAULT_UART_BUS_RX (&pin_PA07) #define DEFAULT_UART_BUS_RX (&pin_PA07)
#define DEFAULT_UART_BUS_TX (&pin_PA06) #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_A8), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_SCK), 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_D9), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PA10) }, { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA10) }, { 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_D10), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PA08) }, { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA08) }, { 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), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), 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_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },