pic32mx: sched_lock should replace with enter_critical_secion
Signed-off-by: hujun5 <hujun5@xiaomi.com>
This commit is contained in:
parent
d93d377257
commit
3f8f3340d1
@ -136,6 +136,7 @@ int pic32mx_configgpio(uint16_t cfgset)
|
||||
unsigned int pin = pic32mx_pinno(cfgset);
|
||||
uint32_t mask = (1 << pin);
|
||||
uintptr_t base;
|
||||
irqstate_t flags;
|
||||
|
||||
/* Verify that the port number is within range */
|
||||
|
||||
@ -147,7 +148,7 @@ int pic32mx_configgpio(uint16_t cfgset)
|
||||
|
||||
/* Is this an input or an output? */
|
||||
|
||||
sched_lock();
|
||||
flags = enter_critical_section();
|
||||
if (pic32mx_output(cfgset))
|
||||
{
|
||||
/* Not analog */
|
||||
@ -203,7 +204,7 @@ int pic32mx_configgpio(uint16_t cfgset)
|
||||
#endif
|
||||
}
|
||||
|
||||
sched_unlock();
|
||||
leave_critical_section(flags);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user