/      日本語

General Purpose Digital IO

Functions to handle DIO ports

The following functions are used to operate General Purpose Digital IO (DIO).

  • pinMode()
  • digitalWrite()
  • digitalRead()
  • attachIntDio()
  • detachIntDio()

Constants

Pin Names and Numbers

DefinitionName
const uint8_t PIN_DIGITAL::DIO0 .. 19DIO pins 0 to 19
const uint8_t PIN_DIGITAL::DO0 .. 1DO pins 0,1

Pin Modes (DIO0..19)

The following enumerated values are handled by the type E_PIN_MODE.

DefinitionPull-upName
PIN_MODE::INPUTNoInput
PIN_MODE::OUTPUTNoOutput
PIN_MODE::INPUT_PULLUPYesInput with Pull-up
PIN_MODE::OUTPUT_INIT_HIGHNoOutput (initial state HIGH)
PIN_MODE::OUTPUT_INIT_LOWNoOutput (initial state LOW)
PIN_MODE::WAKE_FALLINGNoInput, wake pin, falling edge
PIN_MODE::WAKE_RISINGNoInput, wake pin, rising edge
PIN_MODE::WAKE_FALLING_PULLUPYesInput, wake pin, falling edge with pull-up
PIN_MODE::WAKE_RISING_PULLUPYesInput, wake pin, rising edge with pull-up
PIN_MODE::DISABLE_OUTPUTYesReturn to input state

Pin Modes (DO0,1)

The following enumerated values are handled by the type E_PIN_MODE.

DefinitionName
PIN_MODE::OUTPUTOutput
PIN_MODE::OUTPUT_INIT_HIGHOutput (initial state HIGH)
PIN_MODE::OUTPUT_INIT_LOWOutput (initial state LOW)
PIN_MODE::DISABLE_OUTPUTStop output setting

Pin States

The following enumerated values are handled by the type E_PIN_STATE.

DefinitionValueName
PIN_STATE::HIGH1HIGH level (=Vcc level)
PIN_STATE::LOW0LOW level (=GND level)

Pin Rising and Falling Edges

The following enumerated values are handled by the type E_PIN_INT_MODE.

DefinitionName
PIN_INT_MODE::FALLINGFalling edge
PIN_INT_MODE::RISINGRising edge

pinMode()

Initialization function

digitalWrite()

Digital output function

digitalRead()

Digital input function

attachIntDio()

Function to register a DIO interrupt handler

detachIntDio()

Function to unregister a DIO interrupt handler

digitalReadBitmap()

Digital input function (batch)