Coder Social home page Coder Social logo

Multitap (devel branch) about psxnewlib HOT 6 OPEN

sukkopera avatar sukkopera commented on May 31, 2024
Multitap (devel branch)

from psxnewlib.

Comments (6)

SukkoPera avatar SukkoPera commented on May 31, 2024

IIRC the code uses interrupts to detect the falling edge on the ACK line between bytes, so it needs interrupts to be enabled. What would be the reason for disabling them BTW? 😅

I think there's also a "backend" that doesn't use the ACK line as in previous versions, but can't remember exactly.

from psxnewlib.

sonik-br avatar sonik-br commented on May 31, 2024

Just trying to get it to run as fast as possible.
But the ACK pin is not even connected XD

from psxnewlib.

SukkoPera avatar SukkoPera commented on May 31, 2024

Mmmmh...

So, the PsxDriverHwSpiWithAck driver uses a pin-change interrupt to detect the falling edge on the ACK pin.

If you are not using that, but rather the PsxDriverHwSpi driver, it doesn't seem to require interrupts, but maybe the Arduino SPI library does?

If you want to go faster, you can raise the SPI clock, anyway.

from psxnewlib.

sonik-br avatar sonik-br commented on May 31, 2024

The old lib works fine in HwSpi mode with disabled interrupts.
But that's ok. I will test with the guncon and see if the added latency will impact it.
Fell free to close this. I still need to add guncon support for doing the test and it can take a while.

from psxnewlib.

SukkoPera avatar SukkoPera commented on May 31, 2024

OK, I think the code hangs because of this (the value returned by millis() will not increment while interrupts are disabled).

Adding a setAttentionInterval(0) call might fix the issue but make sure not to poll the controller too often.

from psxnewlib.

sonik-br avatar sonik-br commented on May 31, 2024

Just calling setAttentionInterval(0) did not fix.
Had to comment out the line. :)

I will add support for the guncon and test to see if it's required to disable the interrupts.

from psxnewlib.

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.