#include <debug.h>
#include <delayed_work.h>
#include <malloc.h>
#include <slist.h>
#include <workqueue.h>
#include <chip/portmux.h>
#include <gpio/gpio_irq_handler.h>
#include <sdmmc/sdmmc.h>
#include <app/timer.h>
#include <app/workqueue.h>

Go to the source code of this file.
Defines | |
| #define | SDMMC_CD_DELAY_US 20000 |
| SD/MMC debounce interval for card detection. | |
Functions | |
| struct sdmmc_cd * | sdmmc_cd_init (struct sdmmc_slot *slot, gpio_pin_t pin) |
| Initialize card detection handler. | |
| void | sdmmc_cd_enable (struct sdmmc_cd *cd) |
| Enable card detection handler. | |
Card detect handler that listens for interrupt on gpio line and notifies slot on changed status.
Definition in file card_detect.c.
| #define SDMMC_CD_DELAY_US 20000 |
SD/MMC debounce interval for card detection.
20 ms is assumed to be a good compromise between responsiveness and robustness.
Definition at line 63 of file card_detect.c.
Referenced by sdmmc_cd_enable().
| void sdmmc_cd_enable | ( | struct sdmmc_cd * | cd | ) |
Enable card detection handler.
| cd | Private data for card detction handler |
Definition at line 118 of file card_detect.c.
References delayed_work_run_us(), and SDMMC_CD_DELAY_US.

| struct sdmmc_cd* sdmmc_cd_init | ( | struct sdmmc_slot * | slot, | |
| gpio_pin_t | pin | |||
| ) | [read] |
Initialize card detection handler.
| slot | sdmmc_slot | |
| pin | gpio pin to use as card detect input |
Definition at line 97 of file card_detect.c.
References dbg_error, delayed_work_init(), gpio_init_irq_handler(), gpio_register_irq_handler(), and workqueue_init_item().
Referenced by sdmmc_mcihost_init().

1.5.8