WIRELESS CONNECTIVITY & SENSORS
User manual Thyone-I
• if
Function
is disconnected, Length is 0x03:
0x00:
value field must use 0x00.
• if
Function
is input, Length is 0x03:
0x00:
GPIO has no pull resistor
0x01:
GPIO has internal pull down resistor
0x02:
GPIO has internal pull up resistor
• if
Function
is output, Length is 0x03:
0x00:
GPIO is output LOW
0x01:
GPIO is output HIGH
• if
Function
is PWM, Length is 0x05 (see chapter
Byte 0 and 1:
LSB first uint16 PWM period in ms (1 - 500 ms)
Byte 2:
Ratio (0x00=0%,. . . , 0xFE=100%)
CMD_GPIO_LOCAL_SET_CONFIG_CNF block structure
Each
Block
has the following format:
Length
GPIO_ID
Status
0x02
1 Byte
1 Byte
Length:
Length of the subsequent bytes in this block
GPIO_ID:
ID of the GPIO, see chapter
Status:
0x00:
Success
0x01:
Failed
7.6.1.1. Example: Configure two GPIOs to output high
Configure the GPIOs with ID
0x01
and
0x02
to output HIGH:
Start signal
Command
Length
Block
1
Block
2
CS
0x02
0x25
0x08 0x00
0x03
0x01
0x02 0x01
0x03
0x02
0x02 0x01
0x2C
Response:
Start signal
Command | 0x40
Length
Block
1
Block
2
CS
0x02
0x65
0x07 0x00
0x00
0x02
0x01
0x00
0x02
0x02
0x00
0x63
Configured both GPIOs with success.
Order code 2611011021000
54
Version 2.3 , July 2022