You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2022/05/17 07:11:30 UTC
[GitHub] [mynewt-core] kasjer commented on a diff in pull request #2839: nrf5340: avoid have 2 interrupts for each IPC message
kasjer commented on code in PR #2839:
URL: https://github.com/apache/mynewt-core/pull/2839#discussion_r874446894
##########
hw/drivers/ipc_nrf5340/include/ipc_nrf5340/ipc_nrf5340.h:
##########
@@ -56,6 +56,18 @@ void ipc_nrf5340_reset(void);
*/
void ipc_nrf5340_recv(int channel, ipc_nrf5340_recv_cb cb, void *user_data);
+/**
+ * Sends single byte data over specified IPC channel. IPC uses ring buffer for data passing.
+ * If IPC_NRF5340_BLOCKING_WRITE is not enable and there is not enough space to
+ * store data SYS_ENOMEM error is returned. This function does not notify the other side
+ *
+ * @param channel IPC channel number to send on
+ * @param data Data to be sent over IPC.
+ *
+ * @return 0 on success and negative error on failure
+ */
+int ipc_nrf5340_send_no_notify(int channel, uint8_t data);
Review Comment:
Maybe `int ipc_nrf5340_write(int channel, const void *data, uint16_t len, bool last)`
then current `ipc_nrf5340_send()` could just call it with **true**;
and new function could grab current code of ipc_nrf5340_send() and have something like that
```c
if (last) {
NRF_IPC->TASKS_SEND[channel] = 1;
}
```
just an idea to thing about
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org