[][src]Struct punt::TargetHandle

pub struct TargetHandle<T: UsbContext> { /* fields omitted */ }

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]

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]

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

impl<T> Send for TargetHandle<T>

impl<T> Sync for TargetHandle<T>

impl<T> Unpin for TargetHandle<T> where
    T: Unpin

impl<T> UnwindSafe for TargetHandle<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.