Giter Site home page Giter Site logo

Support for Raspberry RP2040 about onewirehub HOT 3 OPEN

ahorn42 avatar ahorn42 commented on June 12, 2024
Support for Raspberry RP2040

from onewirehub.

Comments (3)

orgua avatar orgua commented on June 12, 2024 1

That's mostly Atmel-related lowlevel-stuff to access pins that was needed to allow the fast overdrive-mode of Onewire. Maybe it's time to remove all that error-prone platform-glue and use arduino-commands by default.
I will order a RP2040 and look into either porting the lib or advance to pure-arduino as a major v3-step

from onewirehub.

ahorn42 avatar ahorn42 commented on June 12, 2024

Just found the calibrate_by_bus_timing script and it seems to work now with IPL = 25 :)

Unfortunately I still don't understand what the other values mean that were configured in platform.h

#define PIN_TO_BASEREG(pin)             (portInputRegister(digitalPinToPort(pin)))
#define PIN_TO_BITMASK(pin)             (digitalPinToBitMask(pin))
#define DIRECT_READ(base, mask)         (((*(base)) & (mask)) ? 1 : 0)
#define DIRECT_MODE_INPUT(base, mask)   ((*((base)+1)) &= ~(mask))
#define DIRECT_MODE_OUTPUT(base, mask)  ((*((base)+1)) |= (mask))
#define DIRECT_WRITE_LOW(base, mask)    ((*((base)+2)) &= ~(mask))
#define DIRECT_WRITE_HIGH(base, mask)   ((*((base)+2)) |= (mask))
using io_reg_t = uint8_t; // define special datatype for register-access

Above is the sample for AVR, I kind of have an idea what it should do, but I think I need some further hints how to adapt this to the RP2040 ;)

from onewirehub.

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.