arch: cxd56xx: Return error for RTC alarm setting before initialization

Return EBUSY error for alarm setting before completion of RTC initialization.
This commit is contained in:
SPRESENSE 2023-09-14 15:47:07 +09:00 committed by Petro Karashchenko
parent 13f59128fd
commit 104dfb983d

View File

@ -553,7 +553,7 @@ int cxd56_rtc_setalarm(struct alm_setalarm_s *alminfo)
id = alminfo->as_id;
cbinfo = &g_alarmcb[id];
if (cbinfo->ac_cb == NULL)
if (g_rtc_enabled && (cbinfo->ac_cb == NULL))
{
/* The set the alarm */