# vfPrintf()

## 解説

[tsFILE](/hw-api-ref/perifuraru/uart/fprintf-raiburari/tsfile.md) 構造体の示す出力先（UART）に printf 書式にて出力する。

## 引数

| 型                                                                   | 名前       | 詳細   |
| ------------------------------------------------------------------- | -------- | ---- |
| [tsFILE](/hw-api-ref/perifuraru/uart/fprintf-raiburari/tsfile.md)\* | psStream | 出力先  |
| const char \*                                                       | pcFormat | 出力書式 |
| ...                                                                 |          | 可変引数 |

#### 対応する書式

| s | 文字列             |
| - | --------------- |
| d | 整数(32bitまで)     |
| u | 符号なし整数(32bitまで) |
| x | 16進数。a-f は小文字。  |
| X | 16進数。A-Fは大文字。   |
| b | bit列            |

####

## 戻り値

なし。

## サンプル

```c
void cbToCoNet_vMain(void) {
	while (!SERIAL_bRxQueueEmpty(sSerPort.u8SerialPort)) {
		int16 i16Char;
​		i16Char = SERIAL_i16RxChar(sSerPort.u8SerialPort);
​		vfPrintf(&sSerStream, "\n\r# [%c] --> ", i16Char);
	    SERIAL_vFlush(sSerStream.u8Device);
		...
	}
}
```


---

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