# Instantiate Trill SDK

To instantiate, the <mark style="color:blue;">**trill\_init**</mark> method should be called to Initialise the SDK.&#x20;

&#x20; **This is also the first function to be called before SDK can be used.**

* @param init\_opt Initialization options. Refer to trill\_init\_opts\_t \<trill.h>
* @param handle SDK Handle. Preserve it to pass with other calls.

Trill Init Options structure:  This will include the details to license, memory that needs to be allocated

|                                                           |                                                                                                                                                                             |
| --------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| n\_rx\_channels                                           | Total number of RX Channels/Slots present in input block.                                                                                                                   |
| rx\_channels\_en\_bm                                      | <p>(Bitmap) Which rx channel/slot to process in input block.<br></p>                                                                                                        |
| aud\_buf\_rx\_block\_size\_bytes                          | <p>Size of Rx/detector audio buffer block.<br>Each sample size in a block is assumed to be 16 bits (Q15).<br>Block size should be = samples\_per\_block \* sample\_size</p> |
| aud\_buf\_rx\_n\_blocks                                   | Number of Rx audio buffer blocks.                                                                                                                                           |
| trill\_audio\_buf\_notify\_cb\_t aud\_buf\_rx\_notify\_cb | Rx audio buffer notification callback. Can be NULL.                                                                                                                         |
| aud\_buf\_tx\_block\_size\_bytes                          | <p>Size of Tx audio buffer block.<br>Each sample size in a block is 16 bits (Q15).</p>                                                                                      |
| aud\_buf\_tx\_n\_blocks                                   | Number of Tx audio buffer blocks                                                                                                                                            |
| aud\_buf\_tx\_notify\_cb                                  | Set to NULL. Reserved for future.                                                                                                                                           |
| audio\_tx\_enable\_fn                                     | Called by SDK to enable audio transmitter.                                                                                                                                  |
| aud\_buf\_en\_rx\_add\_block                              | <p>Set it to non-zero value to enable blocking<br>if audio buffer is full while adding blocks.</p>                                                                          |
| data\_link\_cb                                            | Called by SDK to notify data link layer events.                                                                                                                             |
| data\_link\_cb\_user\_data                                | User data. Will be returned in call back.                                                                                                                                   |

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://trillbit.gitbook.io/trillbit-sdk/embedded-linux/trill-sdk-for-embedded-linux/setup-guide/instantiate-trill-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
