Skip to content

Commit a5187f3

Browse files
committed
README.md added.
rpi directory has been renamed to rpi_pico
1 parent 6bc90e1 commit a5187f3

16 files changed

Lines changed: 92 additions & 2 deletions

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,47 @@
11
# duplex-i2s-pico
22
An experimental Duplex I2S implementation on PIO and its example applications.
3+
4+
## Details
5+
This is an experimental project for the Raspberry Pi Pico I2S implementation. This project targets :
6+
- Supports Duplex I2S in Slave mode.
7+
- Only 32bit data on I2S is supported.
8+
- Supports both RP2040 and RP2350.
9+
- Unit test by [GoogleTest](https://google.github.io/googletest/) and [fff](https://github.com/meekrosoft/fff).
10+
- Possible to build on Ubuntu Desktop or WSL.
11+
12+
## How to obtain this project
13+
14+
The newest copy of this project is found in the [GitHub repository](https://github.com/suikan4github/duplex-i2s-pico).
15+
16+
17+
## Building sample
18+
All the sample and I2S driver code are under rpi directory.
19+
20+
See the [rpi/BUILD.md](rpi/BUILD.md)
21+
## Installing tool
22+
To build the samples or test, you need to install the build tools on Ubuntu :
23+
24+
```sh
25+
apt-get -y update
26+
apt-get -y install build-essential cmake ninja-build git doxygen
27+
apt-get -y install gcc-arm-none-eabi libnewlib-arm-none-eabi
28+
```
29+
30+
## Building test
31+
The sample program and I2S drivers are tested by GoogleTest and fff. Follow the procedure to build the test.
32+
33+
From the repository root ( where this README.md stays), run the following commands.
34+
```sh
35+
mkdir build
36+
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \
37+
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE \
38+
-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc \
39+
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++ \
40+
--no-warn-unused-cli \
41+
-S . \
42+
-B build \
43+
-G Ninja
44+
cmake --build build --config Debug --target all --
45+
```
46+
## License.
47+
This project is provided under [MIT License](LICENSE).

rpi_pico/BUILD.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Building the sample for RP2040
2+
The sample program and I2S drivers are stored in the rpi directory. Follow the procedure to build the test.
3+
4+
From the repository root ( where this README.md stays), run the following commands.
5+
6+
```sh
7+
cd rpi_pico
8+
9+
# Configure the project for Rpi Pico(RP2040)
10+
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \
11+
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE \
12+
-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/arm-none-eabi-gcc \
13+
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/arm-none-eabi-g++ \
14+
--no-warn-unused-cli \
15+
-S . \
16+
-B build \
17+
-G Ninja
18+
19+
# Build
20+
cmake --build build --config Debug --target all
21+
```
22+
23+
# Building the sample for RP2350
24+
In the case of RP2035, the build procedure should be changed to the followings :
25+
26+
```sh
27+
cd rpi_pico
28+
29+
# Configure the project for Rpi Pico(RP2040)
30+
cmake -DCMAKE_BUILD_TYPE:STRING=Debug \
31+
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE \
32+
-DCMAKE_C_COMPILER:FILEPATH=/usr/bin/arm-none-eabi-gcc \
33+
-DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/arm-none-eabi-g++ \
34+
--no-warn-unused-cli \
35+
-DPICO_PLATFORM=rp2350 \
36+
-DPICO_BOARD=pico2 \
37+
-S . \
38+
-B build \
39+
-G Ninja
40+
41+
# Build
42+
cmake --build build --config Debug --target all
43+
```
44+
45+
The PICO_PLATFORM macro and PICO_BOARD macro are added in the configuration phase.
File renamed without changes.

rpi/samples/interrupt_sample/algorithm/CMakeLists.txt renamed to rpi_pico/samples/interrupt_sample/algorithm/CMakeLists.txt

File renamed without changes.

rpi/samples/interrupt_sample/algorithm/duration.cpp renamed to rpi_pico/samples/interrupt_sample/algorithm/duration.cpp

File renamed without changes.

rpi/samples/interrupt_sample/algorithm/duration.hpp renamed to rpi_pico/samples/interrupt_sample/algorithm/duration.hpp

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)