[−][src]Struct ffp::Programmer
Interface to FFP hardware
Methods
impl<'a> Programmer<'a>
[src]
pub fn from_handle(handle: DeviceHandle<'a>) -> Result<Self>
[src]
Create a new Programmer
using the provided DeviceHandle
.
Turns on the FFP LED.
pub fn get_serials(context: &'a Context) -> Result<Vec<String>>
[src]
Get a list of all attached FFP serial numbers
pub fn find(context: &'a Context) -> Result<Self>
[src]
Create a new Programmer
by finding an attached FFP on the USB bus
pub fn by_serial(context: &'a Context, serial: &str) -> Result<Self>
[src]
Create a new Programmer
by finding the specific FFP with given serial number
pub fn by_index(context: &'a Context, index: usize) -> Result<Self>
[src]
Create a new Programmer
by indexing the list of all found FFP devices
pub fn led_on(&self) -> Result<()>
[src]
Turn on the FFP LED
pub fn led_off(&self) -> Result<()>
[src]
Turn off the FFP LED
pub fn reset(&self) -> Result<()>
[src]
Assert the FPGA reset signal
pub fn unreset(&self) -> Result<()>
[src]
Deassert the FPGA reset signal
pub fn select(&self) -> Result<()>
[src]
Assert SPI CS
pub fn unselect(&self) -> Result<()>
[src]
Deassert SPI CS
pub fn high_z_mode(&self) -> Result<()>
[src]
Set SPI pins to high impedance
pub fn flash_mode(&self) -> Result<()>
[src]
Set SPI pins to flash mode (for communicating with SPI flash)
pub fn fpga_mode(&self) -> Result<()>
[src]
Set SPI pins to fpga mode (for communicating with FPGA)
pub fn power_on(&self) -> Result<()>
[src]
Enable target power switch on FFP
pub fn power_off(&self) -> Result<()>
[src]
Disable target power switch on FFP
pub fn bootload(&self) -> Result<()>
[src]
Reset FFP hardware into USB bootloader mode
pub fn write(&self, data: &[u8]) -> Result<Vec<u8>>
[src]
Write data
to the FFP's bulk data endpoint
Trait Implementations
impl<'a> Drop for Programmer<'a>
[src]
Auto Trait Implementations
impl<'a> Send for Programmer<'a>
impl<'a> Sync for Programmer<'a>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,