diff options
author | Lukas Larsson <[email protected]> | 2014-01-08 18:54:15 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-02-24 15:16:03 +0100 |
commit | cd69c2a54201b4e0c4ba86d4248937120e1957e7 (patch) | |
tree | d9bdfe069adfb87d850f609753a342e4c9b4e899 /lib/ose/doc/src/ose_erl_driver.xml | |
parent | b309ad9b4a3e4ff2d6d3a6e6270d37355a798bb1 (diff) | |
download | otp-cd69c2a54201b4e0c4ba86d4248937120e1957e7.tar.gz otp-cd69c2a54201b4e0c4ba86d4248937120e1957e7.tar.bz2 otp-cd69c2a54201b4e0c4ba86d4248937120e1957e7.zip |
ose: Create OSE application
Create an specific OSE application that mainly contains documentation
around the OSE specific part of Erlang/OTP.
Diffstat (limited to 'lib/ose/doc/src/ose_erl_driver.xml')
-rw-r--r-- | lib/ose/doc/src/ose_erl_driver.xml | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/lib/ose/doc/src/ose_erl_driver.xml b/lib/ose/doc/src/ose_erl_driver.xml new file mode 100644 index 0000000000..6687d78087 --- /dev/null +++ b/lib/ose/doc/src/ose_erl_driver.xml @@ -0,0 +1,109 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE cref SYSTEM "cref.dtd"> + +<cref> + <header> + <copyright> + <year>2013</year><year>2014</year> + <holder>Ericsson AB. All Rights Reserved.</holder> + </copyright> + <legalnotice> + The contents of this file are subject to the Erlang Public License, + Version 1.1, (the "License"); you may not use this file except in + compliance with the License. You should have received a copy of the + Erlang Public License along with this software. If not, it can be + retrieved online at http://www.erlang.org/. + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + the License for the specific language governing rights and limitations + under the License. + + </legalnotice> + + <title>erl_driver for Enea OSE</title> + <prepared>Lukas Larsson</prepared> + <docno></docno> + <date>2014-01-08</date> + <rev>A</rev> + <file>ose_erl_driver.xml</file> + </header> + <lib>ose_erl_driver</lib> + <libsummary>Linked-in drivers in Enea OSE</libsummary> + <description> + <p>Writing Linked-in drivers that also work on Enea OSE is very similar for + how you would do it for Unix. The difference from Unix is that + driver_select, ready_input and ready_output all work with signals + instead of file descriptors. This means that the driver_select is + used to specify which type of signal should trigger calls to + ready_input/ready_output. The functions described below are available + to driver programmers on Enea OSE to facilitate this. + </p> + </description> + <section> + <title>DATA TYPES</title> + + <taglist> + <tag><marker id="union_SIGNAL"/>union SIGNAL</tag> + <item>See the Enea OSE SPI documentation for a description.</item> + <tag><marker id="SIGSELECT"/>SIGSELECT</tag> + <item>See the Enea OSE SPI documentation for a description.</item> + <tag><marker id="ErlDrvEvent"/>ErlDrvEvent</tag> + <item>The <c>ErlDrvEvent</c> is a handle to a signal number and id combination. It is passed to <seealso marker="erts:erl_driver#driver_select">driver_select(3)</seealso>.</item> + <tag><marker id="ErlDrvOseEventId"/>ErlDrvOseEventId</tag> + <item>This is the id used to associate a specific signal to a + certain driver instance. </item> + </taglist> + </section> + <funcs> + <func> + <name><ret>union SIGNAL *</ret><nametext>erl_drv_ose_get_signal(ErlDrvEvent drv_event)</nametext></name> + <desc> + <marker id="erl_drv_ose_get_signal"></marker> + <p>Fetch the next signal associated with <c>drv_event</c>. + Signals will be returned in the order which they were received and + when no more signals are available <c>NULL</c> will be returned. + Use this function in the ready_input/ready_output callbacks + to get signals.</p> + </desc> + </func> + <func> + <name><ret>ErlDrvEvent</ret><nametext>erl_drv_ose_event_alloc(SIGSELECT signo, ErlDrvOseEventId id, ErlDrvOseEventId (*resolve_signal)(union SIGNAL* sig))</nametext></name> + <desc> + <marker id="erl_drv_ose_event_alloc"></marker> + <p>Create a new <c>ErlDrvEvent</c> associated with <c>signo</c>, + <c>id</c> and uses the <c>resolve_signal</c> function to extract + the <c>id</c> from a signal with <c>signo</c>. See + <seealso marker="ose_erl_driver_chapter#driver"> + Signals in a Linked-in driver</seealso> in the OSE User's Guide. + </p> + </desc> + </func> + <func> + <name><ret>void</ret><nametext>erl_drv_ose_event_free(ErlDrvEvent drv_event)</nametext></name> + <desc> + <marker id="erl_drv_ose_event_free"></marker> + <p>Free a <c>ErlDrvEvent</c>. This should always be done in the + <seealso marker="erts:driver_entry#stop_select">stop_select</seealso> + callback when the event is no longer being used.</p> + </desc> + </func> + <func> + <name><ret>void</ret><nametext>erl_drv_ose_event_fetch(ErlDrvEvent drv_event, SIGSELECT *signo, int *id)</nametext></name> + <desc> + <marker id="erl_drv_ose_event_fetch"></marker> + <p>Write the signal number and id associated with <c>drv_event</c> + into <c>*signo</c> and <c>*id</c> respectively. <c>NULL</c> can be + also passed as <c>signo</c> or <c>id</c> in order to ignore that field. + </p> + </desc> + </func> + </funcs> + <section> + <title>SEE ALSO</title> + <p> + <seealso marker="erts:driver_entry">driver_entry(3)</seealso>, + <seealso marker="erts:erl_driver">erl_driver(3)</seealso> + </p> + </section> +</cref> |