You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/contributing/target/sai.md
+2-9
Original file line number
Diff line number
Diff line change
@@ -16,14 +16,6 @@ This highly configurable interface has a wide range of elements you can adjust:
16
16
- Clocks polarity and phase.
17
17
- Data alignment.
18
18
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
-
27
19
<spanclass="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.
28
20
29
21
### Assumptions
@@ -35,7 +27,7 @@ Transfer and free functions, plus an init function, comprise this API.
35
27
-`sai_init()` returns `SAI_RESULT_CONFIG_UNSUPPORTED` if the device can never support this configuration.
36
28
-`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.
37
29
-`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.
39
31
- You can reinitialize a device or block by using `sai_init()` after you use `sai_free()` on it.
40
32
41
33
If the device is a *receiver*:
@@ -62,6 +54,7 @@ If the device is a *transmitter*:
62
54
A target must also define these elements to allow tests to be run:
63
55
64
56
-`#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.
65
58
- Pins for 2 SAI or I2S interfaces, including MCLK, BCLK, WCLK and SD named:
66
59
- SAI_A_MCLK, SAI_A_BCLK, SAI_A_WCLK and SAI_A_SD.
67
60
- SAI_B_MCLK, SAI_B_BCLK, SAI_B_WCLK and SAI_B_SD.
0 commit comments