Skip to content

Commit

Permalink
Update drv_gpio.c
Browse files Browse the repository at this point in the history
  • Loading branch information
newflydd authored Jan 9, 2025
1 parent 6aa5b72 commit f5b7844
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bsp/renesas/libraries/HAL_Drivers/drv_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,14 @@ static rt_err_t ra_pin_dettach_irq(struct rt_device *device, rt_base_t pin)
}

// USE "PXX_X" or "pXX_X" format, the character 'P'/'p' and '_' are required.
static rt_base_t ra_pin_get(const char *name)
static rt_base_t ra_pin_get(const char *name)
{
if ((rt_strlen(name) == 5) &&
((name[0] == 'P') || (name[0] == 'p')) &&
(name[3] == '_') &&
('0' <= (int) name[1] && (int) name[1] <= '1') &&
('0' <= (int) name[2] && (int) name[2] <= '9') &&
('0' <= (int) name[4] && (int) name[4] <= '7'))
('0' <= (int) name[4] && (int) name[4] <= '7'))
{
return (((int) name[1] - '0') * 10 + ((int) name[2] - '0')) * 0x100 + ((int) name[4] - '0');
}
Expand Down

0 comments on commit f5b7844

Please sign in to comment.