If a type has a flexible array member, any other types which use the type with a flexible array member in their own type does not have the generic for the flexible array member propagated.
#[repr(C, packed)]
pub struct scan_params<FAM: ?Sized = [::core::ffi::c_uint; 0]> {
#[doc = " If 0x1, RPU force passive scan on all channels"]
pub passive_scan: ::core::ffi::c_ushort,
#[doc = " Number of ssid's in scan_ssids parameter"]
pub num_scan_ssids: ::core::ffi::c_uchar,
#[doc = " Specific SSID's to scan for"]
pub scan_ssids: [ssid; 2usize],
#[doc = " used to send probe requests at non CCK rate in 2GHz band"]
pub no_cck: ::core::ffi::c_uchar,
#[doc = " Bitmap of bands to be scanned. Value Zero will scan both 2.4 and 5 GHZ"]
pub bands: ::core::ffi::c_uchar,
#[doc = " Information element(s) data ie"]
pub ie: ie,
#[doc = " MAC address"]
pub mac_addr: [::core::ffi::c_uchar; 6usize],
#[doc = " Max scan duration in active scan. If zero rpu programs 50msec"]
pub dwell_time_active: ::core::ffi::c_ushort,
#[doc = " Max scan duration in passive scan. If zero rpu programs 150msec"]
pub dwell_time_passive: ::core::ffi::c_ushort,
#[doc = " Number of channels to be scanned"]
pub num_scan_channels: ::core::ffi::c_ushort,
#[doc = " If true, skip local and IANA Unicast reserved MACs"]
pub skip_local_admin_macs: ::core::ffi::c_uchar,
#[doc = " specific channels to be scanned"]
pub center_frequency: ::core::mem::ManuallyDrop<FAM>,
}
If a type has a flexible array member, any other types which use the type with a flexible array member in their own type does not have the generic for the flexible array member propagated.
For example,
scan_params
has an FAM (with a regex pass to wrap the FAM in aManuallyDrop
(see https://github.com/rust-lang/rust-bindgen/issues/2936): https://github.com/i509VCB/nrf70/blob/issue/fam-bindgen/fw/bindings.rs#L3209-L3236But then
scan_params
when used inumac_scan_info
, theFAM
type is not expanded: https://github.com/i509VCB/nrf70/blob/issue/fam-bindgen/fw/bindings.rs#L3489-L3495Since the
FAM
type is not propagated toumac_scan_info
, it is not possible to use theFAM
parameterBindgen invocation: https://github.com/i509VCB/nrf70/blob/issue/fam-bindgen/gen.py#L111-L124