# vfPrintf()

## 解説

Outputs to the destination (UART) indicated by the [`tsFILE`](/en/hw-api-ref/perifuraru/uart/fprintf-raiburari/tsfile.md) structure using the printf format.

## Arguments

| Type                                                                   | None     | Remark             |
| ---------------------------------------------------------------------- | -------- | ------------------ |
| [tsFILE](/en/hw-api-ref/perifuraru/uart/fprintf-raiburari/tsfile.md)\* | psStream | Destination        |
| const char \*                                                          | pcFormat | Format string      |
| ...                                                                    |          | variable arguments |

#### Supported formats

| s | string                                   |
| - | ---------------------------------------- |
| d | integer (upto 32bits)                    |
| u | unsigned integer(upto 32bits)            |
| x | Hexadecimal numbers. a-f are lower case. |
| X | Hexadecimal numbers, A-F in upper case.  |
| b | 0/1 binary                               |

####

## Returns

None

## Sample code

```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/en/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.
