Skip to content
Commit 2e009235 authored by Bjarki Arge Andreasen's avatar Bjarki Arge Andreasen Committed by Benjamin Cabé
Browse files

drivers: i2c: nrfx_twim_rtio: cast buf to non-const



RTIO correctly declares tx buffers as const, however, the
existing I2C API and NRFX (SDK) drivers don't. Therefor cast the
const buf to non-const when passing the tx buf to the twim driver
from the RTIO call to avoid the const warning.

The tx buffer is being treated as const data naturally in the
NRFX driver, its just not declared as such since we reuse the
buffer for both RX and TX data.

Alternatively the SDK and "shim" drivers built on top of it need
to be updated, which is quite a bit of work :)

Signed-off-by: default avatarBjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
parent ee22f5ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment