Skip to content

Commit 1cc0763

Browse files
committed
update according to @bulislaw's & @AnotherButler reviews
1 parent eb3c3a8 commit 1cc0763

File tree

2 files changed

+3
-9
lines changed

2 files changed

+3
-9
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
tags

docs/reference/contributing/target/sai.md

+2-9
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ This highly configurable interface has a wide range of elements you can adjust:
1616
- Clocks polarity and phase.
1717
- Data alignment.
1818

19-
Please refer to your device's reference manual for more details on its capabilities.
20-
21-
This API provides a way to receive or send audio sample through this interface.
22-
23-
Transfer and free functions, plus an init function, comprise this API.
24-
25-
`sai_init` is in charge of initializing this the whole interface and ensuring that the device supports the requested format. It also has to make sure the clocks are configured to generate the requested frequency with a reasonable error margin (depending on the master/slave tolerance).
26-
2719
<span class="warnings">**Warning:** We are introducing the SAI API in an upcoming release of Mbed OS. This page documents code that exists on a feature branch of Mbed OS. You can find details on how it may affect you in the [implementing the SAI API](#implementing-the-sai-api) section.
2820

2921
### Assumptions
@@ -35,7 +27,7 @@ Transfer and free functions, plus an init function, comprise this API.
3527
- `sai_init()` returns `SAI_RESULT_CONFIG_UNSUPPORTED` if the device can never support this configuration.
3628
- `sai_init()` returns `SAI_RESULT_CONFIG_MISMATCH` if the device is not able to support this configuration now because of other 'live' constraints, such as a shared format or clock configuration with a sibling.
3729
- `sai_free()` does nothing if passed a NULL pointer.
38-
- `sai_free()` deinitializes and unclocks the unused part of the device.
30+
- `sai_free()` deinitializes and disables associated clocks if the peripheral is no longer in use.
3931
- You can reinitialize a device or block by using `sai_init()` after you use `sai_free()` on it.
4032

4133
If the device is a *receiver*:
@@ -62,6 +54,7 @@ If the device is a *transmitter*:
6254
A target must also define these elements to allow tests to be run:
6355

6456
- `#define SAI_DEFAULT_SAMPLE_RATE (xxxxxU)`.
57+
The tests use this macro to validate that the device behaves as expected. This parameter is device dependent; you need to set it to any value that the target supports.
6558
- Pins for 2 SAI or I2S interfaces, including MCLK, BCLK, WCLK and SD named:
6659
- SAI_A_MCLK, SAI_A_BCLK, SAI_A_WCLK and SAI_A_SD.
6760
- SAI_B_MCLK, SAI_B_BCLK, SAI_B_WCLK and SAI_B_SD.

0 commit comments

Comments
 (0)