Browse Source

soc: arm: nordic_nrf: align nrf_power calls to new scheme

Now the API to manage GPREGRET register is unified for all devices
having one or more GPREGRET entries.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
pull/64296/head
Nikodem Kastelik 2 years ago committed by Carles Cufí
parent
commit
a4cbe9e9c6
  1. 2
      soc/arm/nordic_nrf/nrf51/soc.c
  2. 2
      soc/arm/nordic_nrf/nrf52/soc.c

2
soc/arm/nordic_nrf/nrf51/soc.c

@ -29,7 +29,7 @@ LOG_MODULE_REGISTER(soc);
*/ */
void sys_arch_reboot(int type) void sys_arch_reboot(int type)
{ {
nrf_power_gpregret_set(NRF_POWER, (uint8_t)type); nrf_power_gpregret_set(NRF_POWER, 0, (uint8_t)type);
NVIC_SystemReset(); NVIC_SystemReset();
} }
#endif #endif

2
soc/arm/nordic_nrf/nrf52/soc.c

@ -31,7 +31,7 @@ LOG_MODULE_REGISTER(soc);
*/ */
void sys_arch_reboot(int type) void sys_arch_reboot(int type)
{ {
nrf_power_gpregret_set(NRF_POWER, (uint8_t)type); nrf_power_gpregret_set(NRF_POWER, 0, (uint8_t)type);
NVIC_SystemReset(); NVIC_SystemReset();
} }
#endif #endif

Loading…
Cancel
Save