Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

mcp23xxx: support for Microchip MCP23 family of IO extenders #433

Merged
merged 12 commits into from
Mar 3, 2020

Conversation

balazsgrill
Copy link
Contributor

@balazsgrill balazsgrill commented Feb 22, 2020

This driver supports the following I2C and SPI IO extenders:

  • MCP23016
  • MCP23017/MCP23S17
  • MCP23018/MCP23S18
  • MCP23008/MCP23S08
  • MCP23009/MCP23S09

The driver is still under development, Interrupt support is not yet implemented.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@maruel
Copy link
Contributor

maruel commented Feb 25, 2020

Sorry for the delay. I can't approve because both the CLA checker and Travis failed. For the CLA checker, see the instructions above.

For travis, if you click through, you'll end up on https://travis-ci.org/google/periph/jobs/653761040 and scrolling a bit you'll find the red text:

Check Code is well formatted
The command "if [[ $TRAVIS_GO_VERSION != 1.7.6 ]]; then echo 'Check Code is well formatted'; ! gofmt -s -d . | read; fi" exited with 1.

Basically, run gofmt -s on the new files and it should do a small number of modifications.

@balazsgrill
Copy link
Contributor Author

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

1 similar comment
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@balazsgrill balazsgrill marked this pull request as ready for review February 27, 2020 20:28
@codecov-io
Copy link

codecov-io commented Feb 27, 2020

Codecov Report

Merging #433 into master will decrease coverage by 0.14%.
The diff coverage is 55.04%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #433      +/-   ##
==========================================
- Coverage   63.51%   63.36%   -0.15%     
==========================================
  Files         117      120       +3     
  Lines       12187    12425     +238     
==========================================
+ Hits         7740     7873     +133     
- Misses       4249     4344      +95     
- Partials      198      208      +10
Impacted Files Coverage Δ
experimental/devices/mcp23xxx/pins.go 33.33% <33.33%> (ø)
experimental/devices/mcp23xxx/mcp23xxx.go 54.8% <54.8%> (ø)
experimental/devices/mcp23xxx/registers.go 92% <92%> (ø)
devices/lepton/lepton.go 88.41% <0%> (+1.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b7d83e...0c17bcc. Read the comment docs.

@maruel
Copy link
Contributor

maruel commented Feb 29, 2020

gohci

@maruel
Copy link
Contributor

maruel commented Feb 29, 2020

Could you fix some of the comments? In practice the copyright one is the one I care the most about.

Copy link
Contributor

@maruel maruel left a comment

Choose a reason for hiding this comment

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

Sigh. I had forgotten to press submit review. My apologies.

experimental/cmd/mcp23xxx/main.go Outdated Show resolved Hide resolved
// Package mcp23xxx controls IO extenders belonging to Microchip MCP23 family
//
// Supported variants:
// * MCP23008/MCP23S08
Copy link
Contributor

Choose a reason for hiding this comment

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

This will show up weirdly in godoc. You can confirm with godoc -http=:8080 then browsing to http://localhost:8080/pkg/periph.io/x/periph/experimental/devices/mcp23xxx

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For now, I removed this list from here and tried to document the supported variants at the appropriate constant declarations, although godoc doesn't render the comments there. Do you have any suggestions?

experimental/devices/mcp23xxx/mcp23xxx.go Outdated Show resolved Hide resolved
experimental/devices/mcp23xxx/mcp23xxx.go Outdated Show resolved Hide resolved
experimental/devices/mcp23xxx/pins.go Outdated Show resolved Hide resolved
experimental/devices/mcp23xxx/pins.go Outdated Show resolved Hide resolved
experimental/devices/mcp23xxx/mcp23xxx.go Outdated Show resolved Hide resolved
experimental/devices/mcp23xxx/pins.go Outdated Show resolved Hide resolved
experimental/devices/mcp23xxx/registers.go Outdated Show resolved Hide resolved
@maruel
Copy link
Contributor

maruel commented Mar 3, 2020

gohci

@maruel
Copy link
Contributor

maruel commented Mar 3, 2020

Thanks!

@maruel maruel merged commit a28d420 into google:master Mar 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants