> For the complete documentation index, see [llms.txt](https://mwx.twelite.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mwx.twelite.info/v0.1.3/api-reference/functions-1/dio/digitalread.md).

# digitalRead()

入力設定のポートの値を読み出す。

```cpp
static inline E_PIN_STATE digitalRead(uint8_t u8pin)
```

事前に入力に設定したピンの入力値を`LOW`または`HIGH`で得ます。

{% hint style="info" %}
`E_PIN_STATE`型から`int`型への変換演算子は定義していないため、数値型への直接的な代入はできません。
{% endhint %}
