From 774a57383e72661da7b438089a1a87b78e1f20eb Mon Sep 17 00:00:00 2001 From: Laymer Date: Sat, 24 Aug 2019 04:00:37 +0200 Subject: [PATCH] docs --- src/pmod_nav.erl | 74 ++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 69 insertions(+), 5 deletions(-) diff --git a/src/pmod_nav.erl b/src/pmod_nav.erl index 84f81d8e..cf1ed647 100644 --- a/src/pmod_nav.erl +++ b/src/pmod_nav.erl @@ -1,8 +1,72 @@ -% LSM9DS1 3-axis accelerometer, 3-axis gyroscope, 3-axis magnetometer: -% http://www.st.com/web/en/resource/technical/document/datasheet/DM00103319.pdf -% -% LPS25HB digital barometer -% http://www.st.com/web/en/resource/technical/document/datasheet/DM00141379.pdf +%%%------------------------------------------------------------------- +%%% @doc Driver module for the Pmod_NAV 9-axis sensor device. +%%% +%%%

WARNING :

+%%% +%%% PMODs are intended to be connected at startup and never added or +%%% removed while the board is being powered on. Doing so may result in +%%% damage to the PMOD depending on its specification and build quality. +%%% Always power down the board before adding or removing PMODs! +%%% +%%% For further information please refer to the dedicated GRiSP Wiki page : +%%% +%%% PmodNAV Tutorial : +%%% Pmod_NAV. +%%% +%%% This device provides sensor data from one of these three +%%% main components : +%%% +%%% +%%% +%%% These components are able to provide raw data measurements for : +%%% +%%% +%%% +%%% The GRiSP application can be setup through the `sys.config' +%%% by specifying that a Pmod_NAV device is connected to the +%%% SPI1 slot : +%%% +%%% ``` +%%% {grisp , [ +%%% {drivers , [ +%%% {spi , grisp_spi_drv} +%%% ]} , +%%% {devices , [ +%%% {spi1 , pmod_nav} +%%% ]} +%%% ]}. +%%% ''' +%%% +%%% Or added at runtime by calling : +%%% +%%% ``` +%%% 1> grisp:add_device(spi1, pmod_nav). +%%% {device,spi1,pmod_nav,<0.124.0>, +%%% #Ref<0.4148633910.4154982401.135288>} +%%% ''' +%%% +%%% Data can be retrieved as follows : +%%% +%%% ``` +%%% Temperature = pmod_nav:read(acc, [out_temp]). +%%% ''' +%%% +%%% Where `acc' is the component providing the +%%% data and `[out_temp]' is the list of registers +%%% that is read. +%%% +%%% @end +%%%------------------------------------------------------------------- -module(pmod_nav). -behavior(gen_server).