Skip to content

Feature: 'default' SPI support for atmel-samd boards #844

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

Merged

Conversation

matt-land
Copy link

This extends from PR #841 (which should merge first) to add SPI support in a similar fashion as default I2C support.

import board
my_spi = board.SPI()

Boards were chosen for support for having all of the following defined in pins.c for the target board:

  • MP_QSTR_SCK
  • MP_QSTR_MISO
  • MP_QSTR_MOSI

Boards that have support have the following in mpconfigboard.h:

  • #define DEFAULT_SPI_BUS_SCK (&pin_PB11)
  • #define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
  • #define DEFAULT_SPI_BUS_MISO (&pin_PA12)

To change default SPI for your board, change the pin targets in mpconfigboard.h

Supported boards:

  • arduino_zero
  • circuitplayground_express
  • feather_m0_adalogger
  • feather_m0_basic
  • feather_m0_express
  • feather_m0_rfm69
  • feather_m0_rfm9x
  • feather_m0_supersized
  • feather_m4_express
  • metro_m0_express
  • metro_m4_express
  • metro_m4_express_revb
  • itsybitsy_m0_express
  • itsybitsy_m4_express
  • trinket_m0
  • trinket_m0_haxpress

Not Supported:

  • gemma
  • pirkey
  • ugame10

@matt-land matt-land changed the title WIP: Feature: 'default' SPI support for atmel-samd boards Feature: 'default' SPI support for atmel-samd boards May 17, 2018
Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

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

Great! Thanks for adding SPI too!

@tannewt tannewt merged commit 8581ee3 into adafruit:master May 17, 2018
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.

2 participants