# drivers/sdmmc/probe.c File Reference

SD/MMC probe engine. More...

`#include <bitops.h>`
`#include <byteorder.h>`
`#include <debug.h>`
`#include <delay.h>`
`#include <errno.h>`
`#include <stdbool.h>`
`#include <string.h>`
`#include <util.h>`
`#include <workqueue.h>`
`#include <delayed_work.h>`
`#include <malloc.h>`
`#include <sdmmc/sdmmc.h>`
`#include <buffer.h>`
`#include "protocol.h"`
`#include <app/timer.h>`
`#include <app/workqueue.h>`
`#include <board/sdmmc.h>`

Include dependency graph for probe.c:

Go to the source code of this file.

## Functions
void | sdmmc_probe_notify_card_detect (void *context)
| Notify probe about card detect change.
void * | sdmmc_probe_init (struct sdmmc_slot *slot, void(*event)(struct sdmmc_slot *slot, void *context), void *context)
| Init slot. Start probing for card.

## Detailed Description

SD/MMC probe engine.

SD/MMC probe engine identifies card in slot and notifies and listening instance about change in card presence.

- Compiler: IAR EWAVR32 and GNU GCC for AVR32
- Supported devices: All devices
- AppNote:

Author:
  Atmel Corporation: http://www.atmel.com
  Support and FAQ: http://support.atmel.no/

Definition in file probe.c.

## Function Documentation

void* sdmmc_probe_init | ( | struct sdmmc_slot * | slot,
|  | void(*)(struct sdmmc_slot *slot, void *context) | event,
|  | void * | context |
| ) |  |  |

Init slot. Start probing for card.

Parameters:

  | slot | sdmmc_slot
  | event | Callback for card detection
  | context | Private data for event callback

Returns:
  pointer to private probe data on success and 0 on failure

Definition at line 538 of file probe.c.

References sdmmc_slot::context, delayed_work_init(), memset(), sdmmc_slot::notify_card_detect, sdmmc_probe_notify_card_detect(), and workqueue_init_item().

Referenced by sdmmc_blkdev_init_new().

Here is the call graph for this function:

void sdmmc_probe_notify_card_detect | ( | void * | data | ) |

Notify probe about card detect change.

Parameters:

  | data | Pointer to private data for probe

Definition at line 528 of file probe.c.

References workqueue_add_item().

Referenced by sdmmc_probe_init().

Here is the call graph for this function: