Nominal Animal

Latest activity Postings About

    • Nominal Animal
      For a 8-bit wide bus using GPIO6 bits 16-19, 24-27, I'd use temp = val ^ state; GPIO6_DR_TOGGLE = ((temp & 15) << 16) | ((temp & 240) << 20); state = val & 1023; to update the bus state to val. For a 10-bit wide bus using GPIO6 bits 16-19...
    • Nominal Animal
      Nominal Animal reacted to MarkT's post in the thread Directional change in joystick with Like Like.
      Whoops, yes you're right... Its much easier in 3 dimensions with quaternions (!)
    • Nominal Animal
      Nominal Animal reacted to PaulStoffregen's post in the thread GPIO2 DMA access issue with Like Like.
      Try running this. It may not answer all your questions, but the LED does blink and reading the register shows the bit changing. Hopefully that helps? #include <Arduino.h> #include <imxrt.h> const int gpio = LED_BUILTIN; static volatile...
    • Nominal Animal
      Nominal Animal replied to the thread Is GPIO9_DR volatile?.
      As you can see in cores/teensy/imxrt.h, GPIO9_DR is accessed via a structure where the target member is volatile. The link is to Paul's Github repo for the Teensyduino cores, with each release version having their own tag. It is possible to use...
    • Nominal Animal
      Nominal Animal replied to the thread GPIO2 DMA access issue.
      You also need to select GPIO2 instead of GPIO7 for pin 13, by clearing bit 3 of IOMUXC_GPR_GPR27; see page 323 of the reference manual. That is, add IOMUXC_GPR_GPR27 &= ~(0b1 << 3); in setup().
    • Nominal Animal
      I love to help with applied math stuff, especially 2D vector algebra and versors/unit quaternions/bivectors describing rotations and orientations (the implemented math is exactly the same for the four components), most recently this one. These...
    • Nominal Animal
      I'll expand on MarkT's post above, starting from the very basics, so that everyone can follow. (Also, MarkT, your rotation matrix is transposed wrt. standard right-handed coordinate system and column vectors: it's usually the upper right sine...
    • Nominal Animal
      C and C++ are completely different programming languages. The snippet shown uses C++ syntax, and does not compile as C, not even as C23. I stand by my claim of using the C++11 and later syntax for specifying the underlying type for the enum...
    • Nominal Animal
      The quoted code is C++, not C, and since C++11, one can define the underlying type for the enum as I showed above.
    • Nominal Animal
      Use typedef enum LEP_SYS_ENABLE_E_TAG: uint32_t { LEP_SYS_DISABLE = 0, LEP_SYS_ENABLE, } LEP_SYS_ENABLE_E, *LEP_SYS_ENABLE_E_PTR; so that the underlying type of the enum is an unsigned 32-bit integer. You can use any other integral type...
  • Loading…
  • Loading…
Back
Top