| Byte 0 | Byte 1 | Byte 2 | Byte 3 | Byte 4 | Byte 5 | Byte 6 | Byte 7 |
|---|---|---|---|---|---|---|---|
| GPIO_SET_ HPWM_ CFG (0x14) | ECHO | HPWM_ NUMBER | ON | TL | TH | T1L | T1H |
PWM mode is configured specifying the high time (T1) and period (T) in µs. These values can vary from 1 µs to 340 µs.
Command is an 8-byte array of the following format:
0 – A.5;
1 – B.5.
1 – enable HPWM on HPWM_NUMBER pin;
0 – disable PWM on PWM_NUMBER pin.
Least significant byte (low byte) of period in µs.
Most significant byte (high byte) of period in µs.
Least significant byte (low byte) of high time in µs.
Most significant byte (high byte) of high time in µs.
typedef struct _GPIO_SET_HPWM_CFG_CMD
{
unsigned char id; // = GPIO_SET_HPWM_CFG;
unsigned char echo;
unsigned char hpwm_number;
unsigned char on;
unsigned short t;
unsigned short t1;
} __PACKED_ATTR GPIO_SET_HPWM_CFG_CMD, *PGPIO_SET_HPWM_CFG_CMD;
GPIO-24 adapter sends GPIO_SET_HPWM_CFG response after command execution.