Struct stm32_uart_loader::Programmer [−][src]
Implementations
impl Programmer<Serial, Delay, IoErrorKind>
[src]
pub fn linux<P: AsRef<Path>>(
port: P,
baud: usize,
options: Options
) -> Result<Self, Error>
[src]
port: P,
baud: usize,
options: Options
) -> Result<Self, Error>
Create a new linux serial port programmer instance
impl<P, D, E> Programmer<P, D, E> where
P: SerialPort<E>,
D: DelayMs<u32>,
E: Debug,
[src]
P: SerialPort<E>,
D: DelayMs<u32>,
E: Debug,
pub fn new(port: P, delay: D, options: Options) -> Result<Self, Error<E>>
[src]
Create a new programmer instance and connect to the attached bootloader
pub fn info(&mut self) -> Result<u8, Error<E>>
[src]
Fetch bootloader info byte
pub fn erase(&mut self, page_offset: u8, page_count: u8) -> Result<(), Error<E>>
[src]
Erase pages by page offset and count
pub fn erase_pages(&mut self, pages: &[u8]) -> Result<(), Error<E>>
[src]
Erase pages by page number
pub fn erase_all(&mut self) -> Result<(), Error<E>>
[src]
Erase the entire flash
pub fn read(&mut self, addr: u32, data: &mut [u8]) -> Result<(), Error<E>>
[src]
Read memory from the device
pub fn write(&mut self, addr: u32, data: &[u8]) -> Result<(), Error<E>>
[src]
Write memory to the device
pub fn reset(&mut self, bootloader: bool) -> Result<(), Error<E>>
[src]
Reset the device using RTS while asserting DTR entering the bootloading or application
pub fn chip_id(&mut self) -> Result<u16, Error<E>>
[src]
Fetch device chip ID (not-working)
pub fn write_cmd(&mut self, command: Command) -> Result<(), Error<E>>
[src]
Write a bootloader command to the device
pub fn write_bytes(&mut self, data: &[u8]) -> Result<(), Error<E>>
[src]
pub fn write_bytes_csum(&mut self, data: &[u8]) -> Result<(), Error<E>>
[src]
Write data with xor checksum
pub fn read_char(&mut self) -> Result<u8, Error<E>>
[src]
Read a single character from the device
Auto Trait Implementations
impl<P, D, E> RefUnwindSafe for Programmer<P, D, E> where
D: RefUnwindSafe,
E: RefUnwindSafe,
P: RefUnwindSafe,
[src]
D: RefUnwindSafe,
E: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, D, E> Send for Programmer<P, D, E> where
D: Send,
E: Send,
P: Send,
[src]
D: Send,
E: Send,
P: Send,
impl<P, D, E> Sync for Programmer<P, D, E> where
D: Sync,
E: Sync,
P: Sync,
[src]
D: Sync,
E: Sync,
P: Sync,
impl<P, D, E> Unpin for Programmer<P, D, E> where
D: Unpin,
E: Unpin,
P: Unpin,
[src]
D: Unpin,
E: Unpin,
P: Unpin,
impl<P, D, E> UnwindSafe for Programmer<P, D, E> where
D: UnwindSafe,
E: UnwindSafe,
P: UnwindSafe,
[src]
D: UnwindSafe,
E: UnwindSafe,
P: 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,
pub 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.
pub 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>,