[bsp] fix mismatched function types in rt_pin_ops (#7161)
This commit is contained in:
parent
ce346d798b
commit
dd17ca01e6
|
@ -163,7 +163,7 @@ static rt_base_t at32_pin_get(const char *name)
|
|||
return pin;
|
||||
}
|
||||
|
||||
static void at32_pin_write(rt_device_t dev, rt_base_t pin, rt_base_t value)
|
||||
static void at32_pin_write(rt_device_t dev, rt_base_t pin, rt_uint8_t value)
|
||||
{
|
||||
gpio_type *gpio_port;
|
||||
|
||||
|
@ -180,7 +180,7 @@ static void at32_pin_write(rt_device_t dev, rt_base_t pin, rt_base_t value)
|
|||
gpio_bits_write(gpio_port, gpio_pin, (confirm_state)value);
|
||||
}
|
||||
|
||||
static int at32_pin_read(rt_device_t dev, rt_base_t pin)
|
||||
static rt_int8_t at32_pin_read(rt_device_t dev, rt_base_t pin)
|
||||
{
|
||||
gpio_type *gpio_port;
|
||||
uint16_t gpio_pin;
|
||||
|
@ -197,7 +197,7 @@ static int at32_pin_read(rt_device_t dev, rt_base_t pin)
|
|||
return value;
|
||||
}
|
||||
|
||||
static void at32_pin_mode(rt_device_t dev, rt_base_t pin, rt_base_t mode)
|
||||
static void at32_pin_mode(rt_device_t dev, rt_base_t pin, rt_uint8_t mode)
|
||||
{
|
||||
gpio_init_type gpio_init_struct;
|
||||
gpio_type *gpio_port;
|
||||
|
@ -279,8 +279,8 @@ rt_inline const struct pin_irq_map *get_pin_irq_map(uint32_t pinbit)
|
|||
return &pin_irq_map[mapindex];
|
||||
};
|
||||
|
||||
static rt_err_t at32_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
||||
rt_uint32_t mode, void (*hdr)(void *args), void *args)
|
||||
static rt_err_t at32_pin_attach_irq(struct rt_device *device, rt_base_t pin,
|
||||
rt_uint8_t mode, void (*hdr)(void *args), void *args)
|
||||
{
|
||||
uint16_t gpio_pin;
|
||||
rt_base_t level;
|
||||
|
@ -324,7 +324,7 @@ static rt_err_t at32_pin_attach_irq(struct rt_device *device, rt_int32_t pin,
|
|||
return RT_EOK;
|
||||
}
|
||||
|
||||
static rt_err_t at32_pin_dettach_irq(struct rt_device *device, rt_int32_t pin)
|
||||
static rt_err_t at32_pin_dettach_irq(struct rt_device *device, rt_base_t pin)
|
||||
{
|
||||
uint16_t gpio_pin;
|
||||
rt_base_t level;
|
||||
|
@ -360,7 +360,7 @@ static rt_err_t at32_pin_dettach_irq(struct rt_device *device, rt_int32_t pin)
|
|||
}
|
||||
|
||||
static rt_err_t at32_pin_irq_enable(struct rt_device *device, rt_base_t pin,
|
||||
rt_uint32_t enabled)
|
||||
rt_uint8_t enabled)
|
||||
{
|
||||
gpio_init_type gpio_init_struct;
|
||||
exint_init_type exint_init_struct;
|
||||
|
|
Loading…
Reference in New Issue