Class

FwupdPluginCfiDevice

Description [src]

class FwupdPlugin.CfiDevice : FwupdPlugin.Device {
  parent_instance: FuDevice
}

A chip conforming to the Common Flash Memory Interface, typically a SPI flash chip.

Where required, the quirks instance IDs will be added in ->setup().

The defaults are set as follows, and can be overridden in quirk files:

  • PageSize: 0x100
  • SectorSize: 0x1000
  • BlockSize: 0x10000

See also: FuDevice

Constructors

fu_cfi_device_new

Creates a new FuCfiDevice.

Available since: 1.7.1

Instance methods

fu_cfi_device_chip_select

Sets the chip select value.

Available since: 1.8.0

fu_cfi_device_chip_select_locker_new

Creates a custom device locker that asserts and deasserts the chip select signal.

Available since: 1.8.0

fu_cfi_device_get_block_size

Gets the chip block size. This is typically the largest erasable block size.

Available since: 1.7.4

fu_cfi_device_get_cmd

Gets the self vendor code.

Available since: 1.7.1

fu_cfi_device_get_flash_id

Gets the chip ID used to identify the device.

Available since: 1.7.1

fu_cfi_device_get_page_size

Gets the chip page size. This is typically the largest writable block size.

Available since: 1.7.3

fu_cfi_device_get_sector_size

Gets the chip sector size. This is typically the smallest erasable page size.

Available since: 1.7.3

fu_cfi_device_get_size

Gets the chip maximum size.

Available since: 1.7.1

fu_cfi_device_send_command

Sends an unspecified command stream to the CFI device.

Available since: 1.9.1

fu_cfi_device_set_block_size

Sets the chip block size. This is typically the largest erasable chunk size.

Available since: 1.7.4

fu_cfi_device_set_flash_id

Sets the chip ID used to identify the device.

Available since: 1.7.1

fu_cfi_device_set_page_size

Sets the chip page size. This is typically the largest writable block size.

Available since: 1.7.3

fu_cfi_device_set_sector_size

Sets the chip sector size. This is typically the smallest erasable page size.

Available since: 1.7.3

fu_cfi_device_set_size

Sets the chip maximum size.

Available since: 1.7.1

Methods inherited from FuDevice (163)

Please see FuDevice for a full list of methods.

Methods inherited from FwupdDevice (118)

Please see FwupdDevice for a full list of methods.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

FwupdPlugin.CfiDevice:flash-id

The CCI JEDEC flash ID.

Available since: 1.7.1

Properties inherited from FuDevice (8)
FwupdPlugin.Device:backend-id

The device backend ID.

Available since: 1.5.8

FwupdPlugin.Device:context

The FuContext to use.

Available since: 1.6.0

FwupdPlugin.Device:internal-flags

The device internal flags.

Available since: 1.9.1

FwupdPlugin.Device:logical-id

The device logical ID.

Available since: 1.1.2

FwupdPlugin.Device:parent

The device parent.

Available since: 1.0.8

FwupdPlugin.Device:physical-id

The device physical ID.

Available since: 1.1.2

FwupdPlugin.Device:private-flags

The device private flags.

Available since: 1.9.1

FwupdPlugin.Device:proxy

The device proxy to use.

Available since: 1.4.1

Properties inherited from FwupdDevice (15)
Fwupd.Device:battery-level

The device battery level in percent.

Available since: 1.5.8

Fwupd.Device:battery-threshold

The device battery threshold in percent.

Available since: 1.5.8

Fwupd.Device:flags

The device flags.

Available since: 0.9.3

Fwupd.Device:parent

The device parent.

Available since: 1.0.8

Fwupd.Device:percentage

The current device percentage.

Available since: 1.8.11

Fwupd.Device:problems

The problems with the device that the user could fix, e.g. “lid open”.

Available since: 1.8.1

Fwupd.Device:protocol

The device protocol.

Available since: 1.3.6

Deprecated since: 1.5.8

Fwupd.Device:request-flags

The device request flags.

Available since: 1.9.10

Fwupd.Device:status

The current device status.

Available since: 1.4.0

Fwupd.Device:update-error

The device update error.

Available since: 0.9.8

Fwupd.Device:update-image

The update image for the device.

Available since: 1.4.5

Fwupd.Device:update-message

The device update message.

Available since: 1.2.4

Fwupd.Device:update-state

The device update state.

Available since: 0.9.8

Fwupd.Device:version

The device version.

Available since: 1.8.15

Fwupd.Device:version-format

The version format of the device.

Available since: 1.2.9

Signals

Signals inherited from FuDevice (3)
FwupdPlugin.Device::child-added

The ::child-added signal is emitted when a device has been added as a child.

Available since: 1.0.8

FwupdPlugin.Device::child-removed

The ::child-removed signal is emitted when a device has been removed as a child.

Available since: 1.0.8

FwupdPlugin.Device::request

The ::request signal is emitted when the device needs interactive action from the user.

Available since: 1.6.2

Signals inherited from GObject (1)
GObject.Object::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct FwupdPluginCfiDeviceClass {
  FuDeviceClass parent_class;
  gboolean (* chip_select) (
    FuCfiDevice* self,
    gboolean value,
    GError** error
  );
  gboolean (* send_command) (
    FuCfiDevice* self,
    const guint8* wbuf,
    gsize wbufsz,
    guint8* rbuf,
    gsize rbufsz,
    FuProgress* progress,
    GError** error
  );
  
}
Class members
parent_class
FuDeviceClass
  No description available.
chip_select
gboolean (* chip_select) (
    FuCfiDevice* self,
    gboolean value,
    GError** error
  )
  No description available.
send_command
gboolean (* send_command) (
    FuCfiDevice* self,
    const guint8* wbuf,
    gsize wbufsz,
    guint8* rbuf,
    gsize rbufsz,
    FuProgress* progress,
    GError** error
  )
  No description available.

Virtual methods

FwupdPlugin.CfiDeviceClass.chip_select

Sets the chip select value.

Available since: 1.8.0

FwupdPlugin.CfiDeviceClass.send_command

Sends an unspecified command stream to the CFI device.

Available since: 1.9.1