Skip to content

Instantly share code, notes, and snippets.

@youngkin
Last active April 13, 2022 17:40
Show Gist options
  • Save youngkin/d88ef1fec18d9a8b587ec3dbbb4c1bf0 to your computer and use it in GitHub Desktop.
Save youngkin/d88ef1fec18d9a8b587ec3dbbb4c1bf0 to your computer and use it in GitHub Desktop.
void bcm_peri_set_bits(volatile uint32_t* paddr, uint32_t value, uint32_t mask)
{
uint32_t v = bcm_peri_read(paddr);
v = (v & ~mask) | (value & mask);
bcm_peri_write(paddr, v);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment