Commit Graph

27 Commits

Author SHA1 Message Date
Thomas Kohler 3559e7892e
Introduce I2cBusAdaptor for composition in platforms 2022-12-08 19:29:51 +01:00
Thomas Kohler 16a453248e Update go.mod to 1.17 and all modules incl. code upgrades 2022-10-19 19:32:56 +02:00
Tim Froidcoeur 40bf1710dd MCP3004: correct number of channels
the MCP3004 has 4 channels, not 3.

Fixes: b0160105("spi: Add MCP3202, MCP3204, MCP3208, and MCP3304
drivers")

Signed-off-by: Tim Froidcoeur <tim.froidcoeur@gmail.com>
2021-11-14 13:31:47 +01:00
Eithel 6bf5b3a532 #700 - Avoid to close the connection.
Each spi drivers must not close the connection: it's not its responsibility.
Robots should close the connection.

Signed-off-by: Eithel <tux.eithel@gmail.com>
2020-01-14 07:27:23 +01:00
Erwan Morvan d73466a5f9 Apa102 use default brightness (#671)
* spi/apa102: use uint8 type with a max of 31 for brightness

Signed-off-by: Erwan Morvan <air1bzz@gmail.com>
2019-05-31 11:34:00 +02:00
Ron Evans ee68549f94 spi: correct param used for APA102 Draw() method
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2019-05-22 11:34:39 +02:00
Mike Zange 78ec92af7a Stop using Red parameter for brightness value
This change corrects using Red parameter of RGBA for the Brightness value, to using the Alpha parameter of RGBA.

As the brightness max value for APA102 is `31` the `math.Min` stops the driver from using any value higher than 31.
2019-05-22 11:34:39 +02:00
Ron Evans 1d76ed6ce0 spi: add ShowImage() function to ssd1306 driver based on @mikegleasonjr suggestion
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2018-08-07 21:58:43 +02:00
Marc-Antoine Ruel 7bbdeee01f Bump periph.io/x/periph to v3.0.0
There was one breaking change in the spi.Port and spi.Conn interfaces.

As I ran "dep ensure" with dep v0.4.1, it decided to reformat the Gopkg.lock
file. :/
2018-07-03 09:29:15 -04:00
Ron Evans e9529e4c72 spi: remove unneeded type and cleanup GoDocs
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2018-04-16 13:29:35 +02:00
Ron Evans 06d26b4102 spi: remove unneeded code as suggested by @maruel
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2018-04-16 09:56:17 +02:00
Ron Evans f0b524efbf spi: update README to mention new periph.io implementation.
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2018-04-12 12:51:39 +02:00
Ron Evans 25930107fd spi: add optional params such as bus/chip to all current drivers
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2018-04-12 12:25:39 +02:00
Ron Evans 7637d90440 spi: switch to using periph.io for SPI interfaces
Signed-off-by: Ron Evans <ron@hybridgroup.com>
2018-04-12 12:25:39 +02:00
Ulises Flynn 447175629b added spi ssd1306 2018-04-12 12:25:39 +02:00
deadprogram c10828baf9 spi: Add MCP3202, MCP3204, MCP3208, and MCP3304 drivers to README
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-12-13 20:10:22 +01:00
deadprogram b0160105ca spi: Add MCP3202, MCP3204, MCP3208, and MCP3304 drivers
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-12-13 20:08:31 +01:00
deadprogram 6f2921ffb6 spi: add MCP3002 A/D converter
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-12-13 16:40:44 +01:00
deadprogram 41a04f76d0 spi: correct support for MCP3004/MCP3008 A/D converters
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-12-13 15:40:38 +01:00
deadprogram 55d3655d29 spi: add support for MCP3008 A/D converter
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-12-13 15:20:20 +01:00
deadprogram 2e7e59b1ce spi: add support for MCP3004 A/D converter
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-12-13 15:20:07 +01:00
deadprogram 71ca8ed02f apa102: adding initial support for APA102 LEDs, thanks to code sample from @rakyll
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-12-13 14:12:30 +01:00
deadprogram 8e28bcc54f up2: extract shared SPI init code into spi package
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-12-13 13:16:50 +01:00
deadprogram 019300cb34 docs: some helpful edits for the initial spi implementation
Signed-off-by: deadprogram <ron@hybridgroup.com>
2017-09-14 14:05:51 +02:00
Ulises Flynn d362e47874 Remove address from spi code 2017-09-12 00:51:01 -06:00
Ulises Flynn 4bd3b675c6 Moved gopigo3 to a platform 2017-09-06 23:53:28 -06:00
Ulises Flynn 94f5ded2d6 First cut of the GoPiGo3 driver, lacking grove peripherals. 2017-08-24 23:38:26 -06:00