mynewt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject [37/50] [abbrv] incubator-mynewt-core git commit: add better comments to the spi api
Date Thu, 28 Apr 2016 00:14:36 GMT
add better comments to the spi api


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/ddcd177b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/ddcd177b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/ddcd177b

Branch: refs/heads/master
Commit: ddcd177b42d4e5ca0de3159c15dd94961ace9375
Parents: c2959dc
Author: Paul Dietrich <paulfdietrich@yahoo.com>
Authored: Fri Apr 22 13:19:24 2016 -0700
Committer: Paul Dietrich <paulfdietrich@yahoo.com>
Committed: Fri Apr 22 13:19:24 2016 -0700

----------------------------------------------------------------------
 hw/hal/include/hal/hal_spi.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/ddcd177b/hw/hal/include/hal/hal_spi.h
----------------------------------------------------------------------
diff --git a/hw/hal/include/hal/hal_spi.h b/hw/hal/include/hal/hal_spi.h
index 6bfbde4..a483563 100644
--- a/hw/hal/include/hal/hal_spi.h
+++ b/hw/hal/include/hal/hal_spi.h
@@ -64,11 +64,15 @@ struct hal_spi_settings {
 struct hal_spi *
 hal_spi_init(enum system_device_id sysid);
 
-/* configure the spi */
+/* configure the spi., Reutrns 0 on success, negative on error */
 int 
 hal_spi_config(struct hal_spi *pspi, struct hal_spi_settings *psettings);
 
-/* do a blocking master spi transfer */
+/* Do a blocking master spi transfer of one SPI data word. 
+ * The data to send is an 8 or 9-bit pattern (depending on configuration) 
+ * stored in <tx>.  NOTE: This does not send multiple bytes. The argument is 
+ * a 16-bit number to allow up to 9-bit SPI data words.
+ * Returns the data received from the remote device or negative on error. */
 int 
 hal_spi_master_transfer(struct hal_spi *psdi, uint16_t tx);
 


Mime
View raw message