Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions samples/drivers/mbox/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ int main(void)
printk("Maximum bytes of data in the TX message: %d\n", mbox_mtu_get_dt(&tx_channel));
printk("Maximum TX channels: %d\n", mbox_max_channels_get_dt(&tx_channel));

#ifndef CONFIG_COVERAGE
while (1) {
#else
for (int i = 0; i < 5; i++) {
#endif
#if defined(CONFIG_MULTITHREADING)
k_sleep(K_MSEC(2000));
#else
Expand All @@ -62,5 +66,13 @@ int main(void)
}
}
#endif /* CONFIG_TX_ENABLED */

#ifdef CONFIG_RX_ENABLED
ret = mbox_set_enabled_dt(&rx_channel, false);
if (ret < 0) {
printk("Could not disable RX channel %d (%d)\n", rx_channel.channel_id, ret);
return 0;
}
#endif /* CONFIG_RX_ENABLED */
return 0;
}