寄存器位写操作
void reg_indirect_write(u32 addr, u32 new_value,u32 mask)
{
u32 mask;
u32 value;
reg_read(addr, &value);
value &= mask;
value |= ((~mask) & (new_value));
reg_write(addr, value);
}
void reg_indirect_write(u32 addr, u32 new_value,u32 mask)
{
u32 mask;
u32 value;
reg_read(addr, &value);
value &= mask;
value |= ((~mask) & (new_value));
reg_write(addr, value);
}