WIRELESS CONNECTIVITY & SENSORS
User manual Thyone-I
7.6.2. CMD_GPIO_LOCAL_GET_CONFIG_REQ
This command reads the current configuration of the free GPIOs of the radio module.
Format:
Start signal
Command
Length
CS
0x02
0x26
0x00 0x00
0x24
Response (
Start signal
Command | 0x40
Length
Block
1
. . .
Block
n
CS
0x02
0x66
2 Bytes
1 Byte
x Bytes
x Bytes
1 Byte
CMD_GPIO_LOCAL_GET_CONFIG_CNF block structure
Each
Block
has the following format:
Length
GPIO_ID
Function
Values
1 Byte
1 Byte
1 Byte
(Length - 2) Bytes
Length:
Length of the subsequent bytes in this block
GPIO_ID:
ID of the GPIO, see chapter
Function:
0x00:
GPIO disconnected
0x01:
GPIO works as input
0x02:
GPIO works as output
0x03:
GPIO works as PWM
Values:
• if
Function
is disconnected, Length is 0x02:
value field is not used in this block
• if
Function
is input, Length is 0x03:
0x00:
GPIO has no pull resistor
0x01:
GPIO has pull down resistor
0x02:
GPIO has 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%)
Order code 2611011021000
55
Version 2.3 , July 2022