> 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_i16rxchar.md).

# SERIAL\_i16RxChar()

## 解説

FIFOキューから１文字取り出す。

## 引数

| 型     | 名前           | 詳細                                                  |
| ----- | ------------ | --------------------------------------------------- |
| uint8 | u8SerialPort | シリアルポート (E\_AHI\_UART\_0 または E\_AHI\_UART\_1 を指定する） |

## 戻り値

| 型     | 詳細                                          |
| ----- | ------------------------------------------- |
| int16 | 0x00-0xFF なら正しく１バイトを取り出せたことを示し、それ以外はエラーとなる。 |

## サンプル

```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);
		...
	}
}
```
