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...
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...
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...
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().
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...
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...
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...
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...