> For the complete documentation index, see [llms.txt](https://sdk.twelite.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sdk.twelite.info/hw-api-ref/perifuraru/uart/serial-raiburari/serial_vinit.md).

# SERIAL\_vInit()

## 解説

UART （シリアルポート）の初期化を行う。

本関数では１つの UART ポートの初期化を行い SERIAL ライブラリによるアクセスを可能とします。

{% hint style="info" %}
初期化時に SERIAL ライブラリが内部的に利用する FIFO バッファーのメモリ領域を静的に確保する必要があります。
{% endhint %}

{% hint style="info" %}
同時に、出力用の [vfPrintf](/hw-api-ref/perifuraru/uart/fprintf-raiburari/vfprintf.md)(), [vPutChar](/hw-api-ref/perifuraru/uart/fprintf-raiburari/vputchar.md)() を行うため [tsFILE](/hw-api-ref/perifuraru/uart/fprintf-raiburari/tsfile.md) 構造体の初期化を行っておきます。
{% endhint %}

## 引数

| 型                                                                                        | 名前      | 詳細             |
| ---------------------------------------------------------------------------------------- | ------- | -------------- |
| [tsSerialPortSetup](/hw-api-ref/perifuraru/uart/serial-raiburari/tsserialportsetup.md)\* | psSetup | UART の設定用の構造体。 |

## 戻り値

なし

## サンプル

[tsSerialPortSetup](/hw-api-ref/perifuraru/uart/serial-raiburari/tsserialportsetup.md) 参照。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://sdk.twelite.info/hw-api-ref/perifuraru/uart/serial-raiburari/serial_vinit.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.
