Skip to content

Instantly share code, notes, and snippets.

@roblabla
Created February 17, 2019 19:50
Show Gist options
  • Save roblabla/379faf8bac81f7934a87571184809099 to your computer and use it in GitHub Desktop.
Save roblabla/379faf8bac81f7934a87571184809099 to your computer and use it in GitHub Desktop.
u32 elpdr_config_val = ((pinmux_config_val >> 0x0B) & 0x100); // Gets CONFIG bit 19 in bit 8
/* Adjust ELpdr */
if (pinmux_config_mask_val & 0x800) { // Checks CONFIG_MASK bit 11
/* This pin supports ELpdr change */
if (pinmux_mask_val & 0x100) { // Checks MASK bit 8
/* Change ELpdr */
if (((pinmux_val >> 0x08) ^ (pinmux_config_val >> 0x0B)) & 0x01) { // if VAL bit 8 != CONFIG bit 11
pinmux_val |= elpdr_config_val; // set VAL bit 8 to CONFIG bit 19
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment