Coder Social home page Coder Social logo

esp32-smbus's Introduction

esp32-smbus

Introduction

This component provides a subset of the System Management Bus (SMBus) version 3.0 protocol, used to communicate with SMBus-compatible devices over a 2-wire I2C bus. Only 7-bit I2C addresses are currently supported. SMBus PEC is not supported.

It is written and tested for the ESP-IDF environment, version 2.1, using the xtensa-esp32-elf toolchain (gcc version 5.2.0).

Example

An example of this component in use can be found at DavidAntliff/esp32-tsl2561-example

Features

Supports the following SMBus and I2C operations:

  • Quick Command - send the R/W bit to the slave.
  • Send Byte - send a single byte value to the slave.
  • Receive Byte - receive a single byte value from the slave.
  • Write Byte - send a command code and byte to the slave.
  • Read Byte - receive a byte from the slave in response to a command code.
  • Write Word - send a command code and word (two bytes) to the slave.
  • Read Word - receive a word (two bytes) from the slave in response to a command code. A byte count is transferred.
  • SMBus Write Block - send a command code followed by a block of bytes to the slave. A byte count is transferred
  • SMBus Read Block - receive a block of bytes from the slave in response to a command code. No byte count is used.
  • I2C Write Block - send a command code followed by a block of bytes to the slave. No byte count is used.

In addition, the I2C timeout can be configured.

Documentation

Automatically generated API documentation (doxygen) is available here.

Source Code

The source is available from GitHub.

License

The code in this project is licensed under the MIT license - see LICENSE for details.

Links

Acknowledgements

  • "I2C" is a registered trademark of Phillips Corporation.
  • "SMBus" is a trademark of Intel Corporation.

Roadmap

The following features are anticipated but not yet implemented:

  • 10-bit I2C addresses.
  • SMBus Packet Error Checking (PEC).
  • Support for Process Calls.
  • Support for Block-Write-Read Process Calls.

esp32-smbus's People

Contributors

davidantliff avatar elviseshikena avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.