diff --git a/atmel-samd/boards/cplay_m0_flash/pins.c b/atmel-samd/boards/cplay_m0_flash/pins.c index 8b2ef3772a..99c6d004b7 100644 --- a/atmel-samd/boards/cplay_m0_flash/pins.c +++ b/atmel-samd/boards/cplay_m0_flash/pins.c @@ -1,21 +1,33 @@ #include "samd21_pins.h" STATIC const mp_map_elem_t board_global_dict_table[] = { - { MP_OBJ_NEW_QSTR(MP_QSTR_D10), (mp_obj_t)&pin_PA06 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D9), (mp_obj_t)&pin_PA07 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D6), (mp_obj_t)&pin_PA04 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D12), (mp_obj_t)&pin_PA05 }, + // Rev C + // { MP_OBJ_NEW_QSTR(MP_QSTR_D10), (mp_obj_t)&pin_PA06 }, + // { MP_OBJ_NEW_QSTR(MP_QSTR_D9), (mp_obj_t)&pin_PA07 }, + // { MP_OBJ_NEW_QSTR(MP_QSTR_D6), (mp_obj_t)&pin_PA04 }, + // { MP_OBJ_NEW_QSTR(MP_QSTR_D12), (mp_obj_t)&pin_PA05 }, + // + // { MP_OBJ_NEW_QSTR(MP_QSTR_D0), (mp_obj_t)&pin_PB09 }, + // //{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), (mp_obj_t)&pin_PA11 }, + // { MP_OBJ_NEW_QSTR(MP_QSTR_D1), (mp_obj_t)&pin_PB08 }, + // //{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), (mp_obj_t)&pin_PA10 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D0), (mp_obj_t)&pin_PB09 }, + // Rev D + { MP_OBJ_NEW_QSTR(MP_QSTR_A11), (mp_obj_t)&pin_PA06 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A10), (mp_obj_t)&pin_PA07 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A9), (mp_obj_t)&pin_PA04 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A8), (mp_obj_t)&pin_PA05 }, + + { MP_OBJ_NEW_QSTR(MP_QSTR_A6), (mp_obj_t)&pin_PB09 }, //{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), (mp_obj_t)&pin_PA11 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D1), (mp_obj_t)&pin_PB08 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A7), (mp_obj_t)&pin_PB08 }, //{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), (mp_obj_t)&pin_PA10 }, { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), (mp_obj_t)&pin_PB23 }, { MP_OBJ_NEW_QSTR(MP_QSTR_MICROPHONE), (mp_obj_t)&pin_PA08 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), (mp_obj_t)&pin_PA10 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), (mp_obj_t)&pin_PA09 }, { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_SDA), (mp_obj_t)&pin_PA00 }, { MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_SCL), (mp_obj_t)&pin_PA01 }, @@ -25,13 +37,13 @@ STATIC const mp_map_elem_t board_global_dict_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_SLIDE_SWITCH), (mp_obj_t)&pin_PA15 }, { MP_OBJ_NEW_QSTR(MP_QSTR_SPEAKER), (mp_obj_t)&pin_PA02 }, { MP_OBJ_NEW_QSTR(MP_QSTR_LIGHT), (mp_obj_t)&pin_PA11 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_TEMPERATURE), (mp_obj_t)&pin_PA09 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_TEMPERATURE), (mp_obj_t)&pin_PA10 }, { MP_OBJ_NEW_QSTR(MP_QSTR_D13), (mp_obj_t)&pin_PA17 }, { MP_OBJ_NEW_QSTR(MP_QSTR_SDA), (mp_obj_t)&pin_PB02 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D2), (mp_obj_t)&pin_PB02 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A5), (mp_obj_t)&pin_PB02 }, { MP_OBJ_NEW_QSTR(MP_QSTR_SCL), (mp_obj_t)&pin_PB03 }, - { MP_OBJ_NEW_QSTR(MP_QSTR_D3), (mp_obj_t)&pin_PB03 }, + { MP_OBJ_NEW_QSTR(MP_QSTR_A4), (mp_obj_t)&pin_PB03 }, { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), (mp_obj_t)&pin_PB11 }, { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI), (mp_obj_t)&pin_PB10 }, { MP_OBJ_NEW_QSTR(MP_QSTR_MISO), (mp_obj_t)&pin_PA12 }, diff --git a/atmel-samd/samd21_pins.c b/atmel-samd/samd21_pins.c index dc1aad269a..485756211a 100644 --- a/atmel-samd/samd21_pins.c +++ b/atmel-samd/samd21_pins.c @@ -73,15 +73,15 @@ void reset_pin(uint8_t pin) { PIN(PA00, NO_ADC, NO_TOUCH, TCC(TCC2, 0, 0), NO_TIMER, - SERCOM(SERCOM1, 0), - NO_SERCOM); + NO_SERCOM, + SERCOM(SERCOM1, 0)); #endif #ifdef PIN_PA01 PIN(PA01, NO_ADC, NO_TOUCH, TCC(TCC2, 1, 1), NO_TIMER, - SERCOM(SERCOM1, 1), - NO_SERCOM); + NO_SERCOM, + SERCOM(SERCOM1, 1)); #endif #ifdef PIN_PA02 PIN(PA02, ADC_INPUT(ADC_POSITIVE_INPUT_PIN0), TOUCH(0), @@ -168,7 +168,7 @@ PIN(PA07, ADC_INPUT(ADC_POSITIVE_INPUT_PIN7), TOUCH(5), NO_SERCOM); #endif #ifdef PIN_PA08 -PIN(PA08, ADC_INPUT(ADC_POSITIVE_INPUT_PIN17), NO_TOUCH, +PIN(PA08, ADC_INPUT(ADC_POSITIVE_INPUT_PIN16), NO_TOUCH, TCC(TCC0, 0, 0), TCC(TCC1, 2, 2), SERCOM(SERCOM0, 0),