Skip to content

Commit f3c53ca

Browse files
committed
cmake support
1 parent fc28cb8 commit f3c53ca

Some content is hidden

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

69 files changed

+4889
-3248
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.DS_Store
2-
._.DS_Store
2+
._.DS_Store
3+
build/

CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
# set the project name
4+
project(arduino-wm8960)
5+
6+
set(CMAKE_CXX_STANDARD 17)
7+
8+
file(GLOB_RECURSE SRC_LIST_C CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/src/*.c" )
9+
10+
# define libraries
11+
add_library (arduino-wm8960 mtb_wm8960.cpp)
12+
13+
# define location for header files
14+
target_include_directories(arduino-wm8960 PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src )

Doxyfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ WARN_LOGFILE =
908908
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
909909
# Note: If this tag is empty the current directory is searched.
910910

911-
INPUT =
911+
INPUT =
912912

913913
# This tag can be used to specify the character encoding of the source files
914914
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -1122,7 +1122,7 @@ FILTER_SOURCE_PATTERNS =
11221122
# (index.html). This can be useful if you have a project on for instance GitHub
11231123
# and want to reuse the introduction page also for the doxygen output.
11241124

1125-
USE_MDFILE_AS_MAINPAGE =
1125+
USE_MDFILE_AS_MAINPAGE = README.md
11261126

11271127
# The Fortran standard specifies that for fixed formatted Fortran code all
11281128
# characters from position 72 are to be considered as comment. A common

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ It can drive some speakers via the amplifier output and supports full duplex mod
88

99
This library is based on the [original provided by Infineon](https://github.com/Infineon/audio-codec-wm8960) and has been adapted for Arduino to use the Wire API.
1010

11+
Though this library can be used stand alone, I recommend to use it with the WM8960Stream class provided by the [AudioTools](https://github.com/pschatzmann/arduino-audio-tool) project.
12+
1113
### Documentation
1214

1315
- [API](https://pschatzmann.github.io/arduino-wm8960/docs/html/group__wm8960.html)
16+
- [Boards](https://github.com/pschatzmann/arduino-wm8960/wiki/Pins-Connections)
17+
1418

15-
### WM8960 Audio HAT
19+
### Installation in Arduino
1620

17-
![WM8960](docs/img/WM8960.jpeg)
21+
You can download the library as zip and call include Library -> zip library. Or you can git clone this project into the Arduino libraries folder e.g. with
1822

19-
Func | Module | Description
20-
-------|--------|-----------------------------------
21-
5V | 5V | Power positive (5V power input)
22-
GND | GND | Power Ground
23-
SDA | P2/SDA | I2C data input
24-
SCL | P3/SCL | I2C clock Input
25-
CLK | P18 | I2S bit clock input
26-
LRCLK | P19 | I2S frame clock input
27-
DAC | P21 | I2S serial data output
28-
ADC | P20 | I2S serial data input
29-
Button | P17 | Configurable Button
23+
```
24+
cd ~/Documents/Arduino/libraries
25+
git clone pschatzmann/arduino-wm8960.git
26+
```
3027

28+
I recommend to use git because you can easily update to the latest version just by executing the ```git pull``` command in the project folder.
3129

3230

31+
### Desktop Installation
3332

33+
You can use this library also outside of Arduino with cmake. In this case you need to provide the implementation for the i2c_write function yourself!

docs/html/annotated.html

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2-
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
2+
<html xmlns="http://www.w3.org/1999/xhtml">
33
<head>
44
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5-
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
6-
<meta name="generator" content="Doxygen 1.9.5"/>
5+
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6+
<meta name="generator" content="Doxygen 1.9.1"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
88
<title>Arduino WM8060 Audio Codec: Class List</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
@@ -19,8 +19,8 @@
1919
<div id="titlearea">
2020
<table cellspacing="0" cellpadding="0">
2121
<tbody>
22-
<tr id="projectrow">
23-
<td id="projectalign">
22+
<tr style="height: 56px;">
23+
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">Arduino WM8060 Audio Codec
2525
</div>
2626
</td>
@@ -29,22 +29,21 @@
2929
</table>
3030
</div>
3131
<!-- end header part -->
32-
<!-- Generated by Doxygen 1.9.5 -->
32+
<!-- Generated by Doxygen 1.9.1 -->
3333
<script type="text/javascript">
34-
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
35-
var searchBox = new SearchBox("searchBox", "search/",'.html');
34+
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
35+
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
3636
/* @license-end */
3737
</script>
3838
<script type="text/javascript" src="menudata.js"></script>
3939
<script type="text/javascript" src="menu.js"></script>
4040
<script type="text/javascript">
41-
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
41+
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
4242
$(function() {
4343
initMenu('',true,false,'search.php','Search');
4444
$(document).ready(function() { init_search(); });
4545
});
46-
/* @license-end */
47-
</script>
46+
/* @license-end */</script>
4847
<div id="main-nav"></div>
4948
</div><!-- top -->
5049
<!-- window showing the filter options -->
@@ -56,20 +55,14 @@
5655

5756
<!-- iframe showing the search results (closed by default) -->
5857
<div id="MSearchResultsWindow">
59-
<div id="MSearchResults">
60-
<div class="SRPage">
61-
<div id="SRIndex">
62-
<div id="SRResults"></div>
63-
<div class="SRStatus" id="Loading">Loading...</div>
64-
<div class="SRStatus" id="Searching">Searching...</div>
65-
<div class="SRStatus" id="NoMatches">No Matches</div>
66-
</div>
67-
</div>
68-
</div>
58+
<iframe src="javascript:void(0)" frameborder="0"
59+
name="MSearchResults" id="MSearchResults">
60+
</iframe>
6961
</div>
7062

7163
<div class="header">
72-
<div class="headertitle"><div class="title">Class List</div></div>
64+
<div class="headertitle">
65+
<div class="title">Class List</div> </div>
7366
</div><!--header-->
7467
<div class="contents">
7568
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
@@ -80,7 +73,7 @@
8073
</div><!-- contents -->
8174
<!-- start footer part -->
8275
<hr class="footer"/><address class="footer"><small>
83-
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
76+
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
8477
</small></address>
8578
</body>
8679
</html>

docs/html/classes.html

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2-
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
2+
<html xmlns="http://www.w3.org/1999/xhtml">
33
<head>
44
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5-
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
6-
<meta name="generator" content="Doxygen 1.9.5"/>
5+
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
6+
<meta name="generator" content="Doxygen 1.9.1"/>
77
<meta name="viewport" content="width=device-width, initial-scale=1"/>
88
<title>Arduino WM8060 Audio Codec: Class Index</title>
99
<link href="tabs.css" rel="stylesheet" type="text/css"/>
@@ -19,8 +19,8 @@
1919
<div id="titlearea">
2020
<table cellspacing="0" cellpadding="0">
2121
<tbody>
22-
<tr id="projectrow">
23-
<td id="projectalign">
22+
<tr style="height: 56px;">
23+
<td id="projectalign" style="padding-left: 0.5em;">
2424
<div id="projectname">Arduino WM8060 Audio Codec
2525
</div>
2626
</td>
@@ -29,22 +29,21 @@
2929
</table>
3030
</div>
3131
<!-- end header part -->
32-
<!-- Generated by Doxygen 1.9.5 -->
32+
<!-- Generated by Doxygen 1.9.1 -->
3333
<script type="text/javascript">
34-
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
35-
var searchBox = new SearchBox("searchBox", "search/",'.html');
34+
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
35+
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
3636
/* @license-end */
3737
</script>
3838
<script type="text/javascript" src="menudata.js"></script>
3939
<script type="text/javascript" src="menu.js"></script>
4040
<script type="text/javascript">
41-
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
41+
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
4242
$(function() {
4343
initMenu('',true,false,'search.php','Search');
4444
$(document).ready(function() { init_search(); });
4545
});
46-
/* @license-end */
47-
</script>
46+
/* @license-end */</script>
4847
<div id="main-nav"></div>
4948
</div><!-- top -->
5049
<!-- window showing the filter options -->
@@ -56,32 +55,26 @@
5655

5756
<!-- iframe showing the search results (closed by default) -->
5857
<div id="MSearchResultsWindow">
59-
<div id="MSearchResults">
60-
<div class="SRPage">
61-
<div id="SRIndex">
62-
<div id="SRResults"></div>
63-
<div class="SRStatus" id="Loading">Loading...</div>
64-
<div class="SRStatus" id="Searching">Searching...</div>
65-
<div class="SRStatus" id="NoMatches">No Matches</div>
66-
</div>
67-
</div>
68-
</div>
58+
<iframe src="javascript:void(0)" frameborder="0"
59+
name="MSearchResults" id="MSearchResults">
60+
</iframe>
6961
</div>
7062

7163
<div class="header">
72-
<div class="headertitle"><div class="title">Class Index</div></div>
64+
<div class="headertitle">
65+
<div class="title">Class Index</div> </div>
7366
</div><!--header-->
7467
<div class="contents">
7568
<div class="qindex"><a class="qindex" href="#letter__">_</a></div>
7669
<div class="classindex">
7770
<dl class="classindex even">
78-
<dt class="alphachar"><a id="letter__" name="letter__">_</a></dt>
71+
<dt class="alphachar"><a name="letter__">_</a></dt>
7972
<dd><a class="el" href="struct__mtb__wm8960__operation__t.html">_mtb_wm8960_operation_t</a></dd></dl>
8073
</div>
8174
</div><!-- contents -->
8275
<!-- start footer part -->
8376
<hr class="footer"/><address class="footer"><small>
84-
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
77+
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
8578
</small></address>
8679
</body>
8780
</html>

0 commit comments

Comments
 (0)