Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Picoplanet #3267

Merged
merged 6 commits into from
Aug 12, 2020
Merged

Picoplanet #3267

merged 6 commits into from
Aug 12, 2020

Conversation

bleeptrack
Copy link

Hi, I'd like to add the description for the generative PicoPlanet boards :)

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just two minor things. After this, submit a PR to https://github.com/adafruit/circuitpython-org.

Comment on lines 31 to 52
#define IGNORE_PIN_PB01 1
#define IGNORE_PIN_PB02 1
#define IGNORE_PIN_PB03 1
#define IGNORE_PIN_PB04 1
#define IGNORE_PIN_PB05 1
#define IGNORE_PIN_PB06 1
#define IGNORE_PIN_PB07 1
#define IGNORE_PIN_PB08 1
#define IGNORE_PIN_PB09 1
#define IGNORE_PIN_PB10 1
#define IGNORE_PIN_PB11 1
#define IGNORE_PIN_PB12 1
#define IGNORE_PIN_PB13 1
#define IGNORE_PIN_PB14 1
#define IGNORE_PIN_PB15 1
#define IGNORE_PIN_PB16 1
#define IGNORE_PIN_PB17 1
#define IGNORE_PIN_PB22 1
#define IGNORE_PIN_PB23 1
#define IGNORE_PIN_PB30 1
#define IGNORE_PIN_PB31 1
#define IGNORE_PIN_PB00 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need these because these pins are not even defined for SAMD21E variant.

Comment on lines 4 to 34


{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA04) },


{ MP_ROM_QSTR(MP_QSTR_D5),MP_ROM_PTR(&pin_PA05) },
{ MP_ROM_QSTR(MP_QSTR_D6),MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_D7),MP_ROM_PTR(&pin_PA07) },


{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) },

{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) },

{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA16) },

{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) },

{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA30) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA30) },

{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as you're editing this, could you touch up the indentation here, and remove the double blank lines?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks so much for your feedback! I fixed indentation and double blank lines, but it seems pre-commit still fails. Did I miss something?

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA04) },
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have trailing white space at the end of this line. The pre-commit check doesn't like it.

{ 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_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You also need a newline at the end of the file.

//#define CP_RGB_STATUS_G (&pin_PA05)
//#define CP_RGB_STATUS_B (&pin_PA07)
//#define CP_RGB_STATUS_INVERTED_PWM
//#define CP_RGB_STATUS_LED
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More trailing whitespace here.

{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) },

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it also doesn't like the spaces on the empty lines.

@deshipu
Copy link

deshipu commented Aug 11, 2020

If you click on "details" by the failed test, you can see what failed exactly. It also shows you the diff of what needs to be changed.

@dhalbert
Copy link
Collaborator

Check here and similar for the details about what's wrong. https://github.com/adafruit/circuitpython/runs/973297866

Which editor are you using? emacs and other editors can automatically remove trailing whitespace (and fix missing newlines) on save.

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay! Thanks for your patience with the pre-commit checker.

@bleeptrack
Copy link
Author

Thank you so much for your patience with me :)

@dhalbert dhalbert merged commit 0e09c26 into adafruit:main Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants