fel
Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to represent a connected USB device in FEL mode.

Hierarchy

  • FelDevice

Index

Constructors

constructor

  • new FelDevice(device: Device, iface: Interface, inEndpoint: InEndpoint, outEndpoint: OutEndpoint): FelDevice
  • Constructs a new FEL device.

    Parameters

    • device: Device
    • iface: Interface
    • inEndpoint: InEndpoint
    • outEndpoint: OutEndpoint

    Returns FelDevice

Properties

isOpen

isOpen: boolean = false

If the device is open

Methods

close

  • close(force?: boolean): Promise<void>
  • Closes the FEL device

    Parameters

    • Default value force: boolean = false

    Returns Promise<void>

execute

  • execute(address: number): Promise<void>
  • Executes the code at the given address.

    Parameters

    • address: number

      The address to jump to.

    Returns Promise<void>

felRead

  • felRead(length: number): Promise<Buffer>
  • Reads data from the FEL device.

    Parameters

    • length: number

      length The length of data to read.

    Returns Promise<Buffer>

    A Buffer of the given length containing data from the FEL device.

felRequest

  • felRequest(command: RequestType, address?: undefined | number, length?: undefined | number): Promise<void>
  • Send a FEL request to the device

    Parameters

    • command: RequestType

      The command to send

    • Optional address: undefined | number

      The address to set on the command

    • Optional length: undefined | number

      The length to set on the command

    Returns Promise<void>

felWrite

  • felWrite(buffer: Buffer): Promise<void>
  • Writes data to the FEL device.

    Parameters

    • buffer: Buffer

    Returns Promise<void>

getFes1Bin

  • getFes1Bin(): Buffer
  • Gets the FES1 binary data.

    Returns Buffer

    The FES1 binary data

getUbootBin

  • getUbootBin(): Buffer
  • Gets the uboot binary data

    Returns Buffer

    The uboot binary data

initializeDRAM

  • initializeDRAM(): Promise<boolean>
  • Initializes the system DRAM once fes1 and uboot have been loaded.

    Returns Promise<boolean>

    Whether or not the DRAM was initialized

isFes1Loaded

  • isFes1Loaded(): boolean
  • Returns boolean

isUbootLoaded

  • isUbootLoaded(): boolean
  • Returns boolean

loadFes1

  • loadFes1(fes1Path: string): void
  • Loads the fes1 into memory.

    Parameters

    • fes1Path: string

    Returns void

loadUboot

  • loadUboot(ubootPath: string): Promise<void>
  • Loads the uboot into memory.

    Parameters

    • ubootPath: string

    Returns Promise<void>

open

  • open(force?: boolean): Promise<void>
  • Opens the FEL device. When you are finished communicating with the device, you should call the close() method.

    Parameters

    • Default value force: boolean = false

    Returns Promise<void>

readDeviceFlash

  • readDeviceFlash(address: number, length: number, progressCallback?: ProgressCallback): Promise<Buffer>
  • Reads froms the device NAND

    Parameters

    Returns Promise<Buffer>

readDeviceMemory

  • readDeviceMemory(address: number, length: number, progressCallback?: ProgressCallback): Promise<Buffer>
  • Read data directly from the FEL device's memory.

    Parameters

    • address: number

      The address to read from

    • length: number

      The length of data to read

    • Optional progressCallback: ProgressCallback

    Returns Promise<Buffer>

    A Buffer representing the data at the given address of the given length

readFromUSB

  • readFromUSB(length: number): Promise<Buffer>
  • Reads data directly from the USB interface.

    Parameters

    • length: number

      The amount of bytes to read

    Returns Promise<Buffer>

runUbootCommand

  • runUbootCommand(command: string, noReturn: boolean, progressCallback?: ProgressCallback): Promise<void>
  • Runs the given uboot command

    Parameters

    • command: string

      The uboot command to run

    • noReturn: boolean

      Whether or not to check for FEL connectivity afterward

    • Optional progressCallback: ProgressCallback

    Returns Promise<void>

setFes1Bin

  • setFes1Bin(fes1Bin: Buffer): void
  • Sets the FES1 binary data

    Parameters

    • fes1Bin: Buffer

      The FES1 binary data

    Returns void

setUbootBin

  • setUbootBin(ubootBin: Buffer): void
  • Sets the uboot binary data

    Parameters

    • ubootBin: Buffer

      The uboot binary data

    Returns void

verifyDevice

writeDeviceFlash

  • writeDeviceFlash(address: number, buffer: Buffer, progressCallback?: ProgressCallback): Promise<void>
  • Writes to the device NAND

    Parameters

    Returns Promise<void>

writeDeviceMemory

  • writeDeviceMemory(address: number, buffer: Buffer, progressCallback?: ProgressCallback): Promise<void>
  • Writes data directly to the FEL device's memory.

    Parameters

    • address: number

      The address to write to

    • buffer: Buffer

      The data to write to memory

    • Optional progressCallback: ProgressCallback

    Returns Promise<void>

writeToUSB

  • writeToUSB(buffer: Buffer): Promise<void>
  • Sends data directly to the USB interface for the FEL device

    Parameters

    • buffer: Buffer

    Returns Promise<void>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc