Skip to content

Commit 773aac5

Browse files
committed
Update documentation
Signed-off-by: Ajay Bhargav <[email protected]>
1 parent 5257e82 commit 773aac5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1132
-173
lines changed

docs/Doxyfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ DOXYFILE_ENCODING = UTF-8
3232
# title of most generated pages and in a few other places.
3333
# The default value is: My Project.
3434

35-
PROJECT_NAME = "Logicrom SDK"
35+
PROJECT_NAME = "Logicrom OpenCPU SDK"
3636

3737
# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
3838
# could be handy for archiving the generated documentation or if some version
@@ -875,6 +875,7 @@ WARN_LOGFILE =
875875
# Note: If this tag is empty the current directory is searched.
876876

877877
INPUT = ../include/arpa/inet.h \
878+
../include/audio.h \
878879
../include/circbuf.h \
879880
../include/command.h \
880881
../include/console.h \
@@ -893,6 +894,7 @@ INPUT = ../include/arpa/inet.h \
893894
../include/gpsdriver.h \
894895
../include/gpslib.h \
895896
../include/hw/adc.h \
897+
../include/hw/bluetooth_le.h \
896898
../include/hw/bluetooth.h \
897899
../include/hw/display.h \
898900
../include/hw/gnss.h \
@@ -902,6 +904,7 @@ INPUT = ../include/arpa/inet.h \
902904
../include/hw/pwm.h \
903905
../include/hw/sdmmc.h \
904906
../include/hw/spi.h \
907+
../include/hw/usb.h \
905908
../include/int64str.h \
906909
../include/lib.h \
907910
../include/libtime.h \
@@ -920,6 +923,7 @@ INPUT = ../include/arpa/inet.h \
920923
../include/plat/def_spi.h \
921924
../include/proto/httpc.h \
922925
../include/proto/modbus.h \
926+
../include/proto/mqttclient.h \
923927
../include/proto/ntpc.h \
924928
../include/remotedbg.h \
925929
../include/ril/ril.h \
@@ -2365,7 +2369,8 @@ INCLUDE_FILE_PATTERNS =
23652369

23662370
PREDEFINED = _DOXYGEN_=1 \
23672371
__cplusplus \
2368-
SOC_RDA8910=1
2372+
SOC_RDA8910=1 \
2373+
__attribute__(x)=
23692374

23702375
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
23712376
# tag can be used to specify a list of macro names that should be expanded. The
2.07 MB
Loading
822 KB
Loading
738 KB
Loading

docs/book/COPYRIGHT.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Copyrights and Licenses
2+
=======================
3+
4+
Software Copyrights
5+
-------------------
6+
7+
All original source code in this repository is Copyright (C) 2021-2024 Waybyte Solutions. This source code is licensed under MIT as described in the file LICENSE.
8+
9+
Additional third party copyrighted code is included under the following licenses.
10+
11+
Where source code headers specify Copyright & License information, this information takes precedence over the summaries made here.
12+
13+
Firmware Components
14+
^^^^^^^^^^^^^^^^^^^
15+
16+
These third party libraries included into the application (firmware) produced by Logicrom OpenCPU SDK.
17+
18+
* `LittleFS <https://github.com/ARMmbed/littlefs>`_ library written by ARM Limited and released under the `BSD 3-clause license <https://github.com/ARMmbed/littlefs/blob/master/LICENSE.md>`_.
19+
20+
* `Int64String <https://github.com/djGrrr/Int64String>`_ library written by djGrrr and released under the `MIT license <https://github.com/djGrrr/Int64String/blob/master/LICENSE>`__.
21+
22+
* `PicoHTTPParser <https://github.com/h2o/picohttpparser>`_ library written by Kazuho Oku, Tokuhiro Matsuno, Daisuke Murase, Shigeo Mitsunari and released under the MIT license.
23+
24+
* `heatshrink <https://github.com/atomicobject/heatshrink>`_ library written by Scott Vokes and released under the `ISC license <https://github.com/atomicobject/heatshrink/blob/master/LICENSE>`_.
25+
26+
* `SimpleKalmanFilter <https://github.com/denyssene/SimpleKalmanFilter>`_ library written by Denys Sene and released under the `MIT license <https://github.com/denyssene/SimpleKalmanFilter/blob/master/LICENSE>`__.
27+
28+
* `OneWire <https://github.com/PaulStoffregen/OneWire>`_ library originally written by Jim Studt and later maintained by Paul Stoffregen, is released uder `custom license <https://github.com/PaulStoffregen/OneWire/blob/master/OneWire.cpp>`_.
29+
30+
* `Tiny AES <https://github.com/kokke/tiny-AES-c>`_ library, released under `Unlicense <https://github.com/kokke/tiny-AES-c/blob/master/unlicense.txt>`_.
31+
32+
* `Fusion <https://github.com/xioTechnologies/Fusion/>`_ library, Copyright 2021 x-io Technologies and released under `MIT License <https://github.com/xioTechnologies/Fusion/blob/main/LICENSE.md>`__.
33+
34+
* `MQTT Client <https://github.com/jiejieTop/mqttclient>`_ library, Copyright jiejie and released under `Apache License 2.0 <https://github.com/jiejieTop/mqttclient/blob/master/LICENSE>`_.
35+
36+
* `SPIFFS <https://github.com/pellepl/spiffs>`_ library, Copyright (c) 2013-2017 Peter Andersson, is licensed under `MIT license <https://github.com/pellepl/spiffs/blob/master/LICENSE>`__.
37+
38+
39+
Documentation
40+
^^^^^^^^^^^^^
41+
42+
* HTML version of the `Logicrom OpenCPU SDK <https://docs.logicrom.com>`_ uses the `Sphinx RTD theme <https://github.com/readthedocs/sphinx_rtd_theme>`_, which is Copyright (c) 2013-2018 Dave Snider, Read the Docs, Inc. & contributors, licensed under `MIT license <https://github.com/readthedocs/sphinx_rtd_theme/blob/master/LICENSE>`__.
43+

docs/book/api/peri/audio.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Audio APIs
2+
==========
3+
4+
.. note:: Audio interface is currently only supported on RDA8910 chipset.
5+
6+
Example Usage
7+
-------------
8+
9+
.. code-block:: c
10+
11+
#include <audio.h>
12+
13+
/* Play an MP3 file from sdcard */
14+
audio_file_play("/sd/file.mp3", AUDIO_PLAY_LOCAL, NULL);
15+
16+
/* Play an MP3 file from sdcard during call */
17+
audio_file_play("/sd/file.mp3", AUDIO_PLAY_VOICE, NULL);
18+
19+
/* set volume */
20+
audio_set_volume(100);
21+
22+
/* play DTMF tone */
23+
audio_play_dtmf("1234", 500, false, NULL);
24+
25+
/* Record from MIC */
26+
audio_record_start("/fs/record.amr", AUDIO_REC_TYPE_MIC, AUDIO_QUALITY_MEDIUM, 5000, NULL);
27+
28+
/* Record voice call */
29+
audio_record_start("/fs/call_record.amr", AUDIO_REC_TYPE_VOICE, AUDIO_QUALITY_MEDIUM, 0, NULL);
30+
31+
32+
.. Application Example
33+
.. -------------------
34+
.. TODO
35+
36+
API Reference
37+
-------------
38+
39+
.. include:: /inc/audio.inc

docs/book/api/peri/bluetooth.rst

Lines changed: 52 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,62 @@
11
Bluetooth
22
=========
33

4-
On RDA8910 chipset, BT 4.2 dual mode is available. However Logicrom currently only
5-
support BLE mode of operation as GATT server for Bluetooth CLI operation. More
6-
features will be added in future release.
4+
RDA8910
5+
-------
76

8-
On MT2503/MT6261 chipset, BT3.0 with EDR can work in BT host and client mode. No BLE
9-
is available.
7+
On the RDA8910 chipset, BT 4.2 dual mode is available. However, Logicrom currently only
8+
supports BLE mode of operation as a GATT server and GATT client for connecting other external
9+
BLE devices.
1010

11-
Currently only SPP profile is supported by SDK.
11+
BLE server can be used either in command line interface mode or as a Bluetooth serial port.
12+
When using in BLE serial port mode, a device file is created with the name ``/dev/blehost0``
13+
which supports standard IO calls similar to UART. Refer to the :doc:`UART API <uart>` for
14+
more information.
1215

13-
System create device file ``/dev/bthost0`` for host mode of operation. This file
14-
can be used to perform standard IO operations (open, close, read, write etc.).
15-
SDK also provide api to enable console over bluetooth, If console is enabled
16-
then host operation file will not be available for application.
16+
The SDK offers GATT client interface APIs to facilitate interaction with external BLE devices.
17+
These APIs enable various operations, including:
1718

18-
For client mode of operation device files are created under ``/dev/btclient/``
19-
after Bluetooth device search is performed. Application can initiate pairing
20-
and standard io operation can then be performed via system calls.
19+
- **Search**: Discover available BLE devices in the vicinity.
20+
21+
- **Find Services**: Identify services offered by the connected BLE device.
22+
23+
- **Find Characteristics and Descriptors**: Explore specific characteristics and associated descriptors within the discovered services.
24+
25+
- **Read/Write Characteristic**: Retrieve information from or send data to the identified characteristics.
26+
27+
BLE API Reference
28+
-----------------
29+
30+
.. toctree::
31+
:maxdepth: 2
32+
33+
Bluetooth LE <bt_le>
34+
35+
36+
MT2503/MT6261
37+
-------------
38+
39+
On MediaTek GSM chipset, BT3.0 with EDR can work in BT host and client mode. Currently, only
40+
the SPP profile is supported by the SDK. BT host supports command line interface mode and
41+
BT serial (SPP) mode. In BT serial mode, a device file with the name ``/dev/bthost0`` is
42+
created to use Bluetooth host as a standard UART interface. Refer to the :doc:`UART API <uart>`
43+
for more information.
44+
45+
For client mode of operation, device files are created under ``/dev/btclient/`` after
46+
Bluetooth device search is performed. The application can initiate pairing, and standard IO operation
47+
can then be performed via system calls.
48+
49+
50+
Bluetooth API Reference
51+
-----------------------
52+
53+
.. toctree::
54+
:maxdepth: 2
55+
56+
Bluetooth Classic <bt_classic>
57+
58+
59+
.. note:: Some ASR1603 based module has Bluetooth hardware support but it is not currently supported by Logicrom OpenCPU SDK.
2160

2261

2362
Example Usage
@@ -40,11 +79,3 @@ Example Usage
4079
* Initialize BT in classic mode with CLI enable
4180
*/
4281
bt_device_init(BT_CLASSIC, "Custom Name", TRUE);
43-
44-
45-
46-
API Reference
47-
-------------
48-
49-
.. include:: /inc/bluetooth.inc
50-

docs/book/api/peri/bt_classic.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Bluetooth Classic Mode API Reference
2+
====================================
3+
4+
.. include:: /inc/bluetooth.inc
5+

docs/book/api/peri/bt_le.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Bluetooth LE Mode API Reference
2+
===============================
3+
4+
.. include:: /inc/bluetooth_le.inc
5+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GNSS Hardware API
22
=================
33

4-
.. note:: For Neoway N58 and Quectel EC200U-CNAA module only.
4+
.. note:: For A9G, Neoway N58 and Quectel EC200U-CNAA modules only.
55

66
.. include:: /inc/gnss.inc

0 commit comments

Comments
 (0)