Change the setting of the digital output pins.
Change the setting of the digital output pins.
The first parameter specifies the pin number to be set, and the second parameter specifies either HIGH
or LOW
.
The input is of type E_PIN_STATE
. The conversion operator from E_PIN_STATE
to int
type is not defined, so direct numeric input is not allowed.
to enable DIO interrupt.
Enables DIO interrupts.
For a preconfigured pin, the first parameter is the pin number for which you want to enable interrupts, the second is the interrupt direction (rising, falling.
Interrupt handlers and event handlers are written in Application BEHAVIOR.
Set up an interrupt to be generated when the DIO5 pin changes from HIGH to LOW.
Basic definition of the application behavior myAppClass
. Details are omitted.
Description of the interrupt handler of the application behavior myAppClass
, which inverts the output setting of DIO12 when an interrupt of DIO5 is generated and displays *
on the serial port Serial
for events occurring after the interrupt handler is finished.
Reads the values of all ports in the input settings at once.
Included in mwx library 0.1.4 or later
Reads the values of all ports in the input settings at once.
The values are stored in the order of DIO0 ... DIO19 from the LSB side. DIO19 are stored in this order.
The pins on the HIGH side are set to 1 and the pins on the LOW side are set to 0.
to unregister the interrupt handler.
Unregisters the interrupt handler.
Reads the value of the port of the input configuration.
Reads the value of the port of the input configuration.
Get the input value of a pin that has been previously set as an input, either LOW
or HIGH
.
No conversion operator from type E_PIN_STATE
to type int
is defined, so direct assignment to a numeric type is not possible.
API for DIO (General-purpose digital IO)
The following functions are used for general-purpose digital IO (DIO) operations.
pinMode()
digitalWrite()
digitalRead()
attachIntDio()
detachIntDio()
Definition | Name |
---|
The following enumeration values are handled with the type name E_PIN_MODE
.
Definition | Pull-up | Name |
---|
The following enumeration values are handled with the type name E_PIN_MODE
.
The following enumeration values are handled with the type name E_PIN_STATE
.
The following enumeration values are handled with the type name E_PIN_INT_MODE
.
Sets the DIO (general-purpose digital IO) pin.
Sets the DIO (general-purpose digital IO) pin.
This function allows you to change the state of DIO0..19 and the pins DO0,1. The setting contents are described in the enumeration value of E_PIN_MODE
, and .
DO0,1 are special pins, which in principle are used for other purposes, but can also be configured as outputs. However, these pins have hardware restrictions, so care must be taken when using them.
Both pins must be guaranteed to be at a HIGH level when power is applied. If the circuit is configured to take unstable voltages, the module will not start up.
Definition | Name |
---|
Definition | Value | Name |
---|
Definition | Name |
---|
| DIO pins 0 to 19 |
| DO pin 0,1 |
| None | Input |
| None | Output |
| Yes | Input |
| None | Output(init HIGH) |
| None | Output(init LOW) |
| None | Input, raised pin, falling |
| None | Input, rising pin, rising |
| Yes | Input, raised pin, falling |
| Yes | Input, rising pin, rising |
| Yes | return to the input state |
| Contribute |
| Output (initial state HIGH) |
| Output (initial state LOW) |
| Stop setting output |
| 1 | HIGH(=Vcc) level |
| 0 | LOW(=GND) level |
| falling edge |
| rising edge |