Giter Club home page Giter Club logo

Comments (3)

salkinium avatar salkinium commented on May 28, 2024

image
Our I2C implementation needs to 🔥.

You'd have to implement the I2cMaster Transaction state machine on top of a I2c Transaction state machine and then provide 8 access ports to it.
You'd then wrap this in a shim layer like GpioExpander, so you can bind the Tca9548a object to a static type.

modm::Tca9548a<modm::platform::I2cMaster2> multiplexor;
using Port0 = modm::tca9548a::Multiplexor<multiplexor, 0>;

You'll most likely need to consider atomics at this point, since your Tca9548a implementation will have to be synced with its interrupts. Don't worry about AVRs for this, just use std::atomics and enable the driver only for Cortex-M.

from modm.

strongly-typed avatar strongly-typed commented on May 28, 2024

Sounds like fun, working on it!

from modm.

strongly-typed avatar strongly-typed commented on May 28, 2024

You'll most likely need to consider atomics at this point, since your Tca9548a implementation will have to be synced with its interrupts

Prefixing every I2C transaction with a transaction addressed to the PCA to select the channel seems to work. The underlying I2C master is queuing I2C transactions (and not reordering!) and sending them in order.

Todos:

  • Make PCA9548 a template parameter to i2c_multiplexer.hpp
  • Discuss the need for RF_CALL_BLOCKING
  • Only return true in I2cMultiplexerChannel when both transactions were queued successfully.
  • Use information of current channel to avoid idempotent channel selections.

from modm.

Related Issues (20)

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.