[−][src]Struct punt::TargetHandle
Contains a connected target and allows operations to be carried out.
Methods
impl<T: UsbContext> TargetHandle<T>
[src]
pub fn bootloader_info(&mut self) -> Result<BootloaderInfo>
[src]
Queries bootloader information from the target.
pub fn read_crc(&mut self, start: u32, length: usize) -> Result<u32>
[src]
Queries a CRC32 from the target for a given memory area.
pub fn verify(&mut self, data: &[u8], address: u32) -> Result<()>
[src]
Verifies the supplied buffer against the target memory region beginning at the supplied address with a CRC32 check.
pub fn erase_pages(&mut self, pages: &[Page]) -> Result<Erase<T>>
[src]
Erases a number of pages.
pub fn erase_area(&mut self, start: u32, length: usize) -> Result<Erase<T>>
[src]
Erases the minimum number of pages to ensure the supplied area is completely erased. This will, in general, erase a larger area due to the page-wise erase of the microcontroller's flash memory.
pub fn program_at<'d>(
&mut self,
data: &'d [u8],
address: u32
) -> Result<Program<'d, '_, T>>
[src]
&mut self,
data: &'d [u8],
address: u32
) -> Result<Program<'d, '_, T>>
Programs a buffer's contents into the microcontroller's flash at the given start address. The flash area must have been erased already for this operation to succeed.
pub fn read_at<'d>(
&mut self,
buffer: &'d mut [u8],
address: u32
) -> Result<Read<'d, '_, T>>
[src]
&mut self,
buffer: &'d mut [u8],
address: u32
) -> Result<Read<'d, '_, T>>
Reads from the target's memory into a buffer.
pub fn exit_bootloader(&mut self) -> Result<()>
[src]
Lets the target exit from the bootloader and start its application.
Auto Trait Implementations
impl<T> RefUnwindSafe for TargetHandle<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for TargetHandle<T>
impl<T> Sync for TargetHandle<T>
impl<T> Unpin for TargetHandle<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for TargetHandle<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,