Skip to content

_cyw43_write_reg assigns to last_size/_header/_backplane_window variables which are never used #2305

@dpgeorge

Description

@dpgeorge

The cyw43 SPI transport _cyw43_write_reg() function has this bit of code in it:

    if (fn == BACKPLANE_FUNCTION) {
        // In case of f1 overflow
        self->last_size = 8;
        self->last_header[0] = buf[0];
        self->last_header[1] = buf[1];
        self->last_backplane_window = self->cur_backplane_window;
    }

(self is a cyw43 driver instance.)

These last_xxx variables are never used by cyw43-driver because F1_OVERFLOW_CHANGE is permanently disabled. And that feature even has comments that it never actually worked.

It would be good to get rid of these variables in the cyw43 driver data structure, to save a little bit of RAM and clean it up. So I propose removing their use from this sdk.

Alternatively the above code could be guarded by a #if F1_OVERFLOW_CHANGE, but then that config option would need to be made public, probably named CYW43_F1_OVERFLOW_CHANGE.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions