forked from len0rd/rockbox
Remove card_enable_monitoring() and use a mutex instead. The card_enable_monitoring() method actually didn't eliminate the possible race conditions it was meant to fix.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26627 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4a2cab6aa1
commit
9c43b2ce17
12 changed files with 73 additions and 125 deletions
|
|
@ -214,18 +214,6 @@ static inline bool card_detect_target(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
void card_enable_monitoring_target(bool on)
|
||||
{
|
||||
if (on)
|
||||
{
|
||||
IEN |= EXT0_IRQ_MASK;
|
||||
}
|
||||
else
|
||||
{
|
||||
IEN &= ~EXT0_IRQ_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
static int sd1_oneshot_callback(struct timeout *tmo)
|
||||
{
|
||||
(void)tmo;
|
||||
|
|
@ -786,6 +774,7 @@ int sd_init(void)
|
|||
/* Configure interrupts for the card slot */
|
||||
TMODE &= ~EXT0_IRQ_MASK; /* edge-triggered */
|
||||
TMODEA |= EXT0_IRQ_MASK; /* trigger on both edges */
|
||||
IEN |= EXT0_IRQ_MASK; /* enable the interrupt */
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue