Closed pftbest closed 5 years ago
For example to reset SPI I need to do two operations: First set Reset flag:
let rcc2 = stm32ral::rcc::RCC::take().unwrap(); modify_reg!(stm32ral::rcc, rcc2, APB1RSTR, SPI2RST: Reset);
Then I need to clear it:
modify_reg!(stm32ral::rcc, rcc2, APB1RSTR, SPI2RST: 0);
But there is no constant defined for this, so I have to use literal 0 instead. It would be great to have a flag like ResetClear for example.
0
Good point, probably just Clear would work even. This would need to be fixed in stm32-rs upstream, i.e. by adding some Clear values to this field, and then stm32ral could be updated.
Clear
For example to reset SPI I need to do two operations: First set Reset flag:
Then I need to clear it:
But there is no constant defined for this, so I have to use literal
0
instead. It would be great to have a flag like ResetClear for example.