From e56f1205597e38956cee9b42a58b08c1109d71f8 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 4 Jun 2016 23:25:42 +0200 Subject: [PATCH] add some docs --- pinos/spi/node.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pinos/spi/node.h b/pinos/spi/node.h index 306fb8823..6cd007604 100644 --- a/pinos/spi/node.h +++ b/pinos/spi/node.h @@ -184,6 +184,21 @@ struct _SpiNode { */ SpiResult (*send_command) (SpiNode *node, SpiCommand *command); + /** + * SpiNode::set_event_callback: + * @node: a #SpiNode + * @callback: a callback + * @user_data: user data passed in the callback + * + * Set a callback to receive events from @node. if @callback is %NULL, the + * current callback is removed. + * + * The callback can be emited from any thread. The caller should take + * appropriate actions to handle the event in other threads when needed. + * + * Returns: #SPI_RESULT_OK on success + * #SPI_RESULT_INVALID_ARGUMENTS when node is %NULL + */ SpiResult (*set_event_callback) (SpiNode *node, SpiEventCallback callback, void *user_data);