mirror of
https://github.com/lupyuen/pinephone-nuttx.git
synced 2025-01-13 05:08:32 +08:00
11 lines
416 B
C
11 lines
416 B
C
/// Modify the specified bits in a memory mapped register.
|
|
/// Based on https://github.com/apache/nuttx/blob/master/arch/arm64/src/common/arm64_arch.h#L473
|
|
void modreg32(
|
|
uint32_t val, // Bits to set, like (1 << bit)
|
|
uint32_t mask, // Bits to clear, like (1 << bit)
|
|
unsigned long addr // Address to modify
|
|
);
|
|
|
|
uint32_t getreg32(unsigned long addr);
|
|
|
|
void putreg32(uint32_t data, unsigned long addr);
|