pub struct SysControl<'i, I> { /* private fields */ }Implementations§
Source§impl<'i, I> SysControl<'i, I>
impl<'i, I> SysControl<'i, I>
Sourcepub fn read_all_registers(
&mut self,
callback: impl FnMut(u8, &'static str, FieldSetValue),
) -> Result<(), I::Error>where
I: RegisterInterface<AddressType = u8>,
pub fn read_all_registers(
&mut self,
callback: impl FnMut(u8, &'static str, FieldSetValue),
) -> Result<(), I::Error>where
I: RegisterInterface<AddressType = u8>,
Read all readable register values in this block from the device. The callback is called for each of them. Any registers in child blocks are not included.
The callback has three arguments:
- The address of the register
- The name of the register (with index for repeated registers)
- The read value from the register
This is useful for e.g. debug printing all values. The given field_sets::FieldSetValue has a Debug and Format implementation that forwards to the concrete type the lies within so it can be printed without matching on it.
Sourcepub async fn read_all_registers_async(
&mut self,
callback: impl FnMut(u8, &'static str, FieldSetValue),
) -> Result<(), I::Error>where
I: AsyncRegisterInterface<AddressType = u8>,
pub async fn read_all_registers_async(
&mut self,
callback: impl FnMut(u8, &'static str, FieldSetValue),
) -> Result<(), I::Error>where
I: AsyncRegisterInterface<AddressType = u8>,
Read all readable register values in this block from the device. The callback is called for each of them. Any registers in child blocks are not included.
The callback has three arguments:
- The address of the register
- The name of the register (with index for repeated registers)
- The read value from the register
This is useful for e.g. debug printing all values. The given field_sets::FieldSetValue has a Debug and Format implementation that forwards to the concrete type the lies within so it can be printed without matching on it.