Search results

  1. 8

    Trick: Reversing bits using hw

    Thank you. I did those and looks good to me now.
  2. 8

    Trick: Reversing bits using hw

    Thank you. I learned something new. I'm still stuck in 1980's. Is there a better way to implement it than below? There is an __RBIT(uint32_t value) defined in cmsis_gcc.h. uint32_t value = 0x12345678; uint32_t result; asm volatile ("rbit %0, %1" : "=r" (result) : "r" (value) )...
  3. 8

    is there a usb hub that allows me to connect and disconnect without screwing up windows

    You are looking for a controlled USB hubs such as https://acroname.com/. These USB hubs can be remotely controlled to connect/disconnect power & data lines. We use them for device testing at work. I think there are a few others too.
  4. 8

    Trick: Reversing bits using hw

    If you need to reverse bits, FLEXIO module already has several registers that do it automatically. You write it to one register and can read it from a few others that have different bit flippings... This was very handy for my transputer project where I have to reverse 32bits constantly. FYI...
  5. 8

    weak function definitions for pinMode, digitalWrite, digitalRead, etc.

    Hurray, I confirm if I redefine all the functions in a core file, then override works. I copied the digital.c from core to the project folder and I can modify the functions without error. One undesired side effect is I have to keep a copy of the original core functions in my project because I...
  6. 8

    weak function definitions for pinMode, digitalWrite, digitalRead, etc.

    I posted a message about failure when redefining pinMode and digitalWrite. After rereading your comment, I think I have to redefine ALL the functions in a file. Let me try that and come back. Stay tuned.
  7. 8

    weak function definitions for pinMode, digitalWrite, digitalRead, etc.

    I am thinking you were thinking of "variants". Arduino IDE lets one to add variants for the existing boards, with slight modifications to pins definitions and a few core files. I'm going down this path now. It is a mix of options 3 and 4. I will report back once I figure out the details. Thanks...
  8. 8

    weak function definitions for pinMode, digitalWrite, digitalRead, etc.

    After spending a bit more into library sources, my learnings are: if library doesn't change pin directions, then we are good. For example, FastLED library works without problems. I think LiquidCrystal also should work (I think it doesn't read from the lcd) but I want to verify on actual hw...
  9. 8

    weak function definitions for pinMode, digitalWrite, digitalRead, etc.

    Thank you for your comment. Would you be able to explain this a bit more? I was thinking of a teensy user modifying the library source files they downloaded (both in Arduino Library/ folder and/or platformio's library folders). This means everybody has to modify their libraries and redo it...
  10. 8

    weak function definitions for pinMode, digitalWrite, digitalRead, etc.

    It turns out we need the override :( - There are existing Arduino libraries (for example LiquidCrystal) that use pinMode(), digitalWrite(), digitalRead().
  11. 8

    weak function definitions for pinMode, digitalWrite, digitalRead, etc.

    Hi, I'm working on a "yet another" adapter board that converts Teensy 4.1 to Arduino Mega 2560 form-factor, with true 5V push-pull signaling. 5V push-pull is done with the circuitry that sits between Teensy 4.1 and the outside world. My goal is to use existing mega shields with teensy 4.1 I...
Back
Top