- <variablelist>
- <title>AltOS radio functions</title>
- <varlistentry>
- <term>ao_radio_set_telemetry</term>
- <listitem>
- <programlisting>
-void
-ao_radio_set_telemetry(void);
- </programlisting>
- <para>
- Configures the radio to send or receive telemetry
- packets. This includes packet length, modulation scheme and
- other RF parameters. It does not include the base frequency
- or channel though. Those are set at the time of transmission
- or reception, in case the values are changed by the user.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ao_radio_set_packet</term>
- <listitem>
- <programlisting>
-void
-ao_radio_set_packet(void);
- </programlisting>
- <para>
- Configures the radio to send or receive packet data. This
- includes packet length, modulation scheme and other RF
- parameters. It does not include the base frequency or
- channel though. Those are set at the time of transmission or
- reception, in case the values are changed by the user.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ao_radio_set_rdf</term>
- <listitem>
- <programlisting>
-void
-ao_radio_set_rdf(void);
- </programlisting>
- <para>
- Configures the radio to send RDF 'packets'. An RDF 'packet'
- is a sequence of hex 0x55 bytes sent at a base bit rate of
- 2kbps using a 5kHz deviation. All of the error correction
- and data whitening logic is turned off so that the resulting
- modulation is received as a 1kHz tone by a conventional 70cm
- FM audio receiver.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ao_radio_idle</term>
- <listitem>
- <programlisting>
-void
-ao_radio_idle(void);
- </programlisting>
- <para>
- Sets the radio device to idle mode, waiting until it reaches
- that state. This will terminate any in-progress transmit or
- receive operation.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ao_radio_get</term>
- <listitem>
- <programlisting>
-void
-ao_radio_get(void);
- </programlisting>
- <para>
- Acquires the radio mutex and then configures the radio
- frequency using the global radio calibration and channel
- values.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ao_radio_put</term>
- <listitem>
- <programlisting>
-void
-ao_radio_put(void);
- </programlisting>
- <para>
- Releases the radio mutex.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ao_radio_abort</term>
- <listitem>
- <programlisting>
-void
-ao_radio_abort(void);
- </programlisting>
- <para>
- Aborts any transmission or reception process by aborting the
- associated DMA object and calling ao_radio_idle to terminate
- the radio operation.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <variablelist>
- <title>AltOS radio telemetry functions</title>
- <para>
- In telemetry mode, you can send or receive a telemetry
- packet. The data from receiving a packet also includes the RSSI
- and status values supplied by the receiver. These are added
- after the telemetry data.
- </para>
- <varlistentry>
- <term>ao_radio_send</term>
- <listitem>
- <programlisting>
-void
-ao_radio_send(__xdata struct ao_telemetry *telemetry);
- </programlisting>
- <para>
- This sends the specific telemetry packet, waiting for the
- transmission to complete. The radio must have been set to
- telemetry mode. This function calls ao_radio_get() before
- sending, and ao_radio_put() afterwards, to correctly
- serialize access to the radio device.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ao_radio_recv</term>
- <listitem>
- <programlisting>
-void
-ao_radio_recv(__xdata struct ao_radio_recv *radio);
- </programlisting>
- <para>
- This blocks waiting for a telemetry packet to be received.
- The radio must have been set to telemetry mode. This
- function calls ao_radio_get() before receiving, and
- ao_radio_put() afterwards, to correctly serialize access
- to the radio device. This returns non-zero if a packet was
- received, or zero if the operation was aborted (from some
- other task calling ao_radio_abort()).
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <variablelist>
- <title>AltOS radio direction finding function</title>
- <para>
- In radio direction finding mode, there's just one function to
- use
- </para>
- <varlistentry>
- <term>ao_radio_rdf</term>
- <listitem>
- <programlisting>
-void
-ao_radio_rdf(int ms);
- </programlisting>
- <para>
- This sends an RDF packet lasting for the specified amount
- of time. The maximum length is 1020 ms.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- <variablelist>
- <title>Packet mode functions</title>
- <para>
- Packet mode is asymmetrical and is configured at compile time
- for either master or slave mode (but not both). The basic I/O
- functions look the same at both ends, but the internals are
- different, along with the initialization steps.
- </para>
- <varlistentry>
- <term>ao_packet_putchar</term>
- <listitem>
- <programlisting>
-void
-ao_packet_putchar(char c);
- </programlisting>
- <para>
- If the output queue is full, this first blocks waiting for
- that data to be delivered. Then, queues a character for
- packet transmission. On the master side, this will
- transmit a packet if the output buffer is full. On the
- slave side, any pending data will be sent the next time
- the master polls for data.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ao_packet_pollchar</term>
- <listitem>
- <programlisting>
-char
-ao_packet_pollchar(void);
- </programlisting>
- <para>
- This returns a pending input character if available,
- otherwise returns AO_READ_AGAIN. On the master side, if
- this empties the buffer, it triggers a poll for more data.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ao_packet_slave_start</term>
- <listitem>
- <programlisting>
-void
-ao_packet_slave_start(void);
- </programlisting>
- <para>
- This is available only on the slave side and starts a task
- to listen for packet data.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ao_packet_slave_stop</term>
- <listitem>
- <programlisting>
-void
-ao_packet_slave_stop(void);
- </programlisting>
- <para>
- Disables the packet slave task, stopping the radio receiver.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ao_packet_slave_init</term>
- <listitem>
- <programlisting>
-void
-ao_packet_slave_init(void);
- </programlisting>
- <para>
- Adds the packet stdio functions to the stdio package so
- that when packet slave mode is enabled, characters will
- get send and received through the stdio functions.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>ao_packet_master_init</term>
- <listitem>
- <programlisting>
-void
-ao_packet_master_init(void);
- </programlisting>
- <para>
- Adds the 'p' packet forward command to start packet mode.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
+ <section>
+ <title>ao_radio_set_telemetry</title>
+ <programlisting>
+ void
+ ao_radio_set_telemetry(void);
+ </programlisting>
+ <para>
+ Configures the radio to send or receive telemetry
+ packets. This includes packet length, modulation scheme and
+ other RF parameters. It does not include the base frequency
+ or channel though. Those are set at the time of transmission
+ or reception, in case the values are changed by the user.
+ </para>
+ </section>
+ <section>
+ <title>ao_radio_set_packet</title>
+ <programlisting>
+ void
+ ao_radio_set_packet(void);
+ </programlisting>
+ <para>
+ Configures the radio to send or receive packet data. This
+ includes packet length, modulation scheme and other RF
+ parameters. It does not include the base frequency or
+ channel though. Those are set at the time of transmission or
+ reception, in case the values are changed by the user.
+ </para>
+ </section>
+ <section>
+ <title>ao_radio_set_rdf</title>
+ <programlisting>
+ void
+ ao_radio_set_rdf(void);
+ </programlisting>
+ <para>
+ Configures the radio to send RDF 'packets'. An RDF 'packet'
+ is a sequence of hex 0x55 bytes sent at a base bit rate of
+ 2kbps using a 5kHz deviation. All of the error correction
+ and data whitening logic is turned off so that the resulting
+ modulation is received as a 1kHz tone by a conventional 70cm
+ FM audio receiver.
+ </para>
+ </section>
+ <section>
+ <title>ao_radio_idle</title>
+ <programlisting>
+ void
+ ao_radio_idle(void);
+ </programlisting>
+ <para>
+ Sets the radio device to idle mode, waiting until it reaches
+ that state. This will terminate any in-progress transmit or
+ receive operation.
+ </para>
+ </section>
+ <section>
+ <title>ao_radio_get</title>
+ <programlisting>
+ void
+ ao_radio_get(void);
+ </programlisting>
+ <para>
+ Acquires the radio mutex and then configures the radio
+ frequency using the global radio calibration and channel
+ values.
+ </para>
+ </section>
+ <section>
+ <title>ao_radio_put</title>
+ <programlisting>
+ void
+ ao_radio_put(void);
+ </programlisting>
+ <para>
+ Releases the radio mutex.
+ </para>
+ </section>
+ <section>
+ <title>ao_radio_abort</title>
+ <programlisting>
+ void
+ ao_radio_abort(void);
+ </programlisting>
+ <para>
+ Aborts any transmission or reception process by aborting the
+ associated DMA object and calling ao_radio_idle to terminate
+ the radio operation.
+ </para>
+ </section>
+ <para>
+ In telemetry mode, you can send or receive a telemetry
+ packet. The data from receiving a packet also includes the RSSI
+ and status values supplied by the receiver. These are added
+ after the telemetry data.
+ </para>
+ <section>
+ <title>ao_radio_send</title>
+ <programlisting>
+ void
+ ao_radio_send(__xdata struct ao_telemetry *telemetry);
+ </programlisting>
+ <para>
+ This sends the specific telemetry packet, waiting for the
+ transmission to complete. The radio must have been set to
+ telemetry mode. This function calls ao_radio_get() before
+ sending, and ao_radio_put() afterwards, to correctly
+ serialize access to the radio device.
+ </para>
+ </section>
+ <section>
+ <title>ao_radio_recv</title>
+ <programlisting>
+ void
+ ao_radio_recv(__xdata struct ao_radio_recv *radio);
+ </programlisting>
+ <para>
+ This blocks waiting for a telemetry packet to be received.
+ The radio must have been set to telemetry mode. This
+ function calls ao_radio_get() before receiving, and
+ ao_radio_put() afterwards, to correctly serialize access
+ to the radio device. This returns non-zero if a packet was
+ received, or zero if the operation was aborted (from some
+ other task calling ao_radio_abort()).
+ </para>
+ </section>
+ <para>
+ In radio direction finding mode, there's just one function to
+ use
+ </para>
+ <section>
+ <title>ao_radio_rdf</title>
+ <programlisting>
+ void
+ ao_radio_rdf(int ms);
+ </programlisting>
+ <para>
+ This sends an RDF packet lasting for the specified amount
+ of time. The maximum length is 1020 ms.
+ </para>
+ </section>
+ <para>
+ Packet mode is asymmetrical and is configured at compile time
+ for either master or slave mode (but not both). The basic I/O
+ functions look the same at both ends, but the internals are
+ different, along with the initialization steps.
+ </para>
+ <section>
+ <title>ao_packet_putchar</title>
+ <programlisting>
+ void
+ ao_packet_putchar(char c);
+ </programlisting>
+ <para>
+ If the output queue is full, this first blocks waiting for
+ that data to be delivered. Then, queues a character for
+ packet transmission. On the master side, this will
+ transmit a packet if the output buffer is full. On the
+ slave side, any pending data will be sent the next time
+ the master polls for data.
+ </para>
+ </section>
+ <section>
+ <title>ao_packet_pollchar</title>
+ <programlisting>
+ char
+ ao_packet_pollchar(void);
+ </programlisting>
+ <para>
+ This returns a pending input character if available,
+ otherwise returns AO_READ_AGAIN. On the master side, if
+ this empties the buffer, it triggers a poll for more data.
+ </para>
+ </section>
+ <section>
+ <title>ao_packet_slave_start</title>
+ <programlisting>
+ void
+ ao_packet_slave_start(void);
+ </programlisting>
+ <para>
+ This is available only on the slave side and starts a task
+ to listen for packet data.
+ </para>
+ </section>
+ <section>
+ <title>ao_packet_slave_stop</title>
+ <programlisting>
+ void
+ ao_packet_slave_stop(void);
+ </programlisting>
+ <para>
+ Disables the packet slave task, stopping the radio receiver.
+ </para>
+ </section>
+ <section>
+ <title>ao_packet_slave_init</title>
+ <programlisting>
+ void
+ ao_packet_slave_init(void);
+ </programlisting>
+ <para>
+ Adds the packet stdio functions to the stdio package so
+ that when packet slave mode is enabled, characters will
+ get send and received through the stdio functions.
+ </para>
+ </section>
+ <section>
+ <title>ao_packet_master_init</title>
+ <programlisting>
+ void
+ ao_packet_master_init(void);
+ </programlisting>
+ <para>
+ Adds the 'p' packet forward command to start packet mode.
+ </para>
+ </section>