Skip to content

Commit

Permalink
style: format code with Autopep8, Black, ClangFormat, dotnet-format, …
Browse files Browse the repository at this point in the history
…Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf

This commit fixes the style issues introduced in 512bf8f according to the output
from Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java
Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt,
Scalafmt, StandardJS, StandardRB, swift-format and Yapf.

Details: None
  • Loading branch information
deepsource-autofix[bot] authored May 11, 2024
1 parent 512bf8f commit 2dd8024
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hardware_interface/i2c_communication.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import smbus


def open_i2c_bus(bus_number):
# Open an I2C bus using smbus or Adafruit-I2C

bus = smbus.SMBus(bus_number)

return bus


def write_i2c_data(bus, address, data):
# Write data to an I2C device

bus.write_i2c_block_data(address, 0, data)


def read_i2c_data(bus, address, num_bytes):
# Read data from an I2C device

Expand Down

0 comments on commit 2dd8024

Please sign in to comment.