diff options
Diffstat (limited to 'components/drivers/include')
| -rw-r--r-- | components/drivers/include/drivers/dev_pin.h | 2 | ||||
| -rw-r--r-- | components/drivers/include/drivers/dev_serial_v2.h | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/components/drivers/include/drivers/dev_pin.h b/components/drivers/include/drivers/dev_pin.h index 2039870983..7155ef0624 100644 --- a/components/drivers/include/drivers/dev_pin.h +++ b/components/drivers/include/drivers/dev_pin.h @@ -122,7 +122,7 @@ struct rt_device_pin #ifdef RT_USING_PINCTRL enum { - PIN_CONFIG_BIAS_BUS_HOLD, + PIN_CONFIG_BIAS_BUS_HOLD = RT_DEVICE_CTRL_BASE(Pin) + 1, PIN_CONFIG_BIAS_DISABLE, PIN_CONFIG_BIAS_HIGH_IMPEDANCE, PIN_CONFIG_BIAS_PULL_DOWN, diff --git a/components/drivers/include/drivers/dev_serial_v2.h b/components/drivers/include/drivers/dev_serial_v2.h index 2a8d9145e6..daa1a0ef58 100644 --- a/components/drivers/include/drivers/dev_serial_v2.h +++ b/components/drivers/include/drivers/dev_serial_v2.h @@ -186,10 +186,15 @@ /** * hw serial control commands + * + * The 0x40-0x4f index range is reserved for hardware serial controls. */ -#define RT_HW_SERIAL_CTRL_GETC 0x01 /* Tx irq get char */ -#define RT_HW_SERIAL_CTRL_PUTC 0x02 /* Rx irq put char */ -#define RT_HW_SERIAL_CTRL_GET_DMA_PING_BUF 0x03 /* Get DMA ping-pong buffer */ +typedef enum rt_hw_serial_ctrl_cmd +{ + RT_HW_SERIAL_CTRL_GETC = RT_DEVICE_CTRL_BASE(Char) + 0x40, /* Tx irq get char */ + RT_HW_SERIAL_CTRL_PUTC, /* Rx irq put char */ + RT_HW_SERIAL_CTRL_GET_DMA_PING_BUF, /* Get DMA ping-pong buffer */ +} rt_hw_serial_ctrl_cmd_t; /** * hw isr event |
