soc: npcx: fix warning message for psl function
The compiler shows the array bounds warning message for some boards which don't set the PSL function. Change npcx_pinctrl_psl_input_asserted() input parameter from int to uint32_t to fix it. Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com>
This commit is contained in:
parent
f47334aa15
commit
d3469f99e7
2 changed files with 3 additions and 3 deletions
|
@ -127,11 +127,11 @@ void npcx_pinctrl_psl_output_set_inactive(void)
|
|||
inst->PDOUT |= BIT(pin);
|
||||
}
|
||||
|
||||
bool npcx_pinctrl_psl_input_asserted(int i)
|
||||
bool npcx_pinctrl_psl_input_asserted(uint32_t i)
|
||||
{
|
||||
struct glue_reg *const inst_glue = HAL_GLUE_INST();
|
||||
|
||||
if (i >= ARRAY_SIZE(psl_in_confs)) {
|
||||
if (i >= ARRAY_SIZE(psl_in_confs)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ void npcx_pinctrl_psl_input_configure(void);
|
|||
* @param i index of 'psl-in-pads' prop
|
||||
* @return 1 is asserted, otherwise de-asserted.
|
||||
*/
|
||||
bool npcx_pinctrl_psl_input_asserted(int i);
|
||||
bool npcx_pinctrl_psl_input_asserted(uint32_t i);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue