nrf53: Correct sync_rtc kconfig dependencies for simulation
Let's make the sync_rtc kconfig depend on the SOC_COMPATIBLE options which are set both by the real and simulated targets, so this code works in the same way for both. Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
32d0c8d8e5
commit
9834fabe2d
2 changed files with 7 additions and 7 deletions
|
@ -21,7 +21,7 @@ config NRF53_SYNC_RTC_INIT_PRIORITY
|
||||||
nRF53 Synchronized RTC initialization priority.
|
nRF53 Synchronized RTC initialization priority.
|
||||||
|
|
||||||
config NRF_RTC_TIMER_USER_CHAN_COUNT
|
config NRF_RTC_TIMER_USER_CHAN_COUNT
|
||||||
default 2 if NRF_802154_RADIO_DRIVER && SOC_NRF5340_CPUNET
|
default 2 if NRF_802154_RADIO_DRIVER && SOC_COMPATIBLE_NRF5340_CPUNET
|
||||||
default 3 if NRF_802154_RADIO_DRIVER
|
default 3 if NRF_802154_RADIO_DRIVER
|
||||||
default 1
|
default 1
|
||||||
|
|
||||||
|
@ -32,13 +32,13 @@ config NRF53_SYNC_RTC_LOG_TIMESTAMP
|
||||||
config NRF53_SYNC_RTC_IPM_OUT
|
config NRF53_SYNC_RTC_IPM_OUT
|
||||||
int "IPM channel from APP to NET"
|
int "IPM channel from APP to NET"
|
||||||
range 0 15
|
range 0 15
|
||||||
default 7 if SOC_NRF5340_CPUAPP
|
default 7 if SOC_COMPATIBLE_NRF5340_CPUAPP
|
||||||
default 8
|
default 8
|
||||||
|
|
||||||
config NRF53_SYNC_RTC_IPM_IN
|
config NRF53_SYNC_RTC_IPM_IN
|
||||||
int "IPM channel from APP to NET"
|
int "IPM channel from APP to NET"
|
||||||
range 0 15
|
range 0 15
|
||||||
default 8 if SOC_NRF5340_CPUAPP
|
default 8 if SOC_COMPATIBLE_NRF5340_CPUAPP
|
||||||
default 7
|
default 7
|
||||||
|
|
||||||
ipm_num = 0
|
ipm_num = 0
|
||||||
|
|
|
@ -119,7 +119,7 @@ static void free_resources(union rtc_sync_channels channels)
|
||||||
|
|
||||||
int z_nrf_rtc_timer_nrf53net_offset_get(void)
|
int z_nrf_rtc_timer_nrf53net_offset_get(void)
|
||||||
{
|
{
|
||||||
if (!IS_ENABLED(CONFIG_SOC_NRF5340_CPUNET)) {
|
if (!IS_ENABLED(CONFIG_SOC_COMPATIBLE_NRF5340_CPUNET)) {
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ static void rtc_cb(int32_t id, uint64_t cc_value, void *user_data)
|
||||||
|
|
||||||
channels.raw = (uint32_t)user_data;
|
channels.raw = (uint32_t)user_data;
|
||||||
ppi_rtc_to_ipc(channels, false);
|
ppi_rtc_to_ipc(channels, false);
|
||||||
if (IS_ENABLED(CONFIG_SOC_NRF5340_CPUAPP)) {
|
if (IS_ENABLED(CONFIG_SOC_COMPATIBLE_NRF5340_CPUAPP)) {
|
||||||
/* APP: Synchronized completed */
|
/* APP: Synchronized completed */
|
||||||
free_resources(channels);
|
free_resources(channels);
|
||||||
} else {
|
} else {
|
||||||
|
@ -165,7 +165,7 @@ static void remote_callback(void *user_data)
|
||||||
/* Clear previous task,event */
|
/* Clear previous task,event */
|
||||||
ppi_ipc_to_rtc(channels, false);
|
ppi_ipc_to_rtc(channels, false);
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_SOC_NRF5340_CPUAPP)) {
|
if (IS_ENABLED(CONFIG_SOC_COMPATIBLE_NRF5340_CPUAPP)) {
|
||||||
/* Setup new connection from RTC to IPC and set RTC to a new
|
/* Setup new connection from RTC to IPC and set RTC to a new
|
||||||
* interval that contains captured offset.
|
* interval that contains captured offset.
|
||||||
*/
|
*/
|
||||||
|
@ -258,7 +258,7 @@ static int sync_rtc_setup(void)
|
||||||
|
|
||||||
nrfx_gppi_channels_enable(BIT(channels.ch.ppi));
|
nrfx_gppi_channels_enable(BIT(channels.ch.ppi));
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_SOC_NRF5340_CPUAPP)) {
|
if (IS_ENABLED(CONFIG_SOC_COMPATIBLE_NRF5340_CPUAPP)) {
|
||||||
ppi_ipc_to_rtc(channels, true);
|
ppi_ipc_to_rtc(channels, true);
|
||||||
} else {
|
} else {
|
||||||
ppi_rtc_to_ipc(channels, true);
|
ppi_rtc_to_ipc(channels, true);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue