samples: mbox: Align to NO MULTITHREADING
Removed k_sleep dependencies in non-multithreaded runs. Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
This commit is contained in:
parent
bb5b98f16c
commit
485a2cc0bf
|
@ -51,6 +51,12 @@ int main(void)
|
|||
printk("Maximum TX channels: %d\n", mbox_max_channels_get_dt(&tx_channel));
|
||||
|
||||
while (1) {
|
||||
#if defined(CONFIG_MULTITHREADING)
|
||||
k_sleep(K_MSEC(3000));
|
||||
#else
|
||||
k_busy_wait(3000000);
|
||||
#endif
|
||||
|
||||
printk("Ping (on channel %d)\n", tx_channel.channel_id);
|
||||
|
||||
ret = mbox_send_dt(&tx_channel, NULL);
|
||||
|
@ -58,10 +64,7 @@ int main(void)
|
|||
printk("Could not send (%d)\n", ret);
|
||||
return 0;
|
||||
}
|
||||
|
||||
k_sleep(K_MSEC(3000));
|
||||
}
|
||||
#endif /* CONFIG_TX_ENABLED */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -78,3 +78,38 @@ tests:
|
|||
regex:
|
||||
- "Ping \\(on channel 16\\)"
|
||||
- "Pong \\(on channel 15\\)"
|
||||
|
||||
sample.drivers.mbox.nrf54l15_no_multithreading:
|
||||
platform_allow:
|
||||
- nrf54l15pdk/nrf54l15/cpuapp
|
||||
integration_platforms:
|
||||
- nrf54l15pdk/nrf54l15/cpuapp
|
||||
extra_args:
|
||||
mbox_SNIPPET=nordic-flpr
|
||||
mbox_CONFIG_MULTITHREADING=n
|
||||
remote_CONFIG_MULTITHREADING=n
|
||||
sysbuild: true
|
||||
harness: console
|
||||
harness_config:
|
||||
type: multi_line
|
||||
ordered: false
|
||||
regex:
|
||||
- "Ping \\(on channel 16\\)"
|
||||
- "Pong \\(on channel 15\\)"
|
||||
|
||||
sample.drivers.mbox.nrf54l15_remote_no_multithreading:
|
||||
platform_allow:
|
||||
- nrf54l15pdk/nrf54l15/cpuapp
|
||||
integration_platforms:
|
||||
- nrf54l15pdk/nrf54l15/cpuapp
|
||||
extra_args:
|
||||
mbox_SNIPPET=nordic-flpr
|
||||
remote_CONFIG_MULTITHREADING=n
|
||||
sysbuild: true
|
||||
harness: console
|
||||
harness_config:
|
||||
type: multi_line
|
||||
ordered: false
|
||||
regex:
|
||||
- "Ping \\(on channel 16\\)"
|
||||
- "Pong \\(on channel 15\\)"
|
||||
|
|
|
@ -47,7 +47,11 @@ int main(void)
|
|||
printk("Maximum TX channels: %d\n", mbox_max_channels_get_dt(&tx_channel));
|
||||
|
||||
while (1) {
|
||||
#if defined(CONFIG_MULTITHREADING)
|
||||
k_sleep(K_MSEC(2000));
|
||||
#else
|
||||
k_busy_wait(2000000);
|
||||
#endif
|
||||
|
||||
printk("Ping (on channel %d)\n", tx_channel.channel_id);
|
||||
|
||||
|
|
Loading…
Reference in New Issue