Skip to content
Commit 59702c76 authored by Tomasz Moń's avatar Tomasz Moń Committed by Anas Nashif
Browse files

drivers: udc_dwc2: Avoid unnecessary register accesses



Do not use sys_clear_bits() followed by sys_set_bits() on DCTL register
to avoid writing to DCTL register twice - first with zeroed out address,
and then with the new address. Change the code to write the address in
one DCTL register write.

Do not use sys_set_bits() to set test mode, but rather prepare the
correct value first.

Set DCFG and GUSBCFG registers in one go. There is no point in reading
back the value or doing multiple subsequent writes to these registers.

Signed-off-by: default avatarTomasz Moń <tomasz.mon@nordicsemi.no>
parent 2c9371ea
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment