Lancaster University's (short term!) clone of mbed-src for micro:bit. This is a copy of the github branch https://github.com/lancaster-university/mbed-classic

Fork of mbed-src by mbed official

targets/hal/TARGET_Atmel/TARGET_SAM21/drivers/extint/extint_callback.h

Committer:
mbed_official
Date:
2015-07-17
Revision:
592:a274ee790e56
Parent:
579:53297373a894

File content as of revision 592:a274ee790e56:

#ifndef EXTINT_CALLBACK_H_INCLUDED
#define EXTINT_CALLBACK_H_INCLUDED

#include <compiler.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * \addtogroup asfdoc_sam0_extint_group
 *
 * @{
 */

/** \name Callback Configuration and Initialization
 * @{
 */

/** Enum for the possible callback types for the EXTINT module. */
enum extint_callback_type {
    /** Callback type for when an external interrupt detects the configured
     *  channel criteria (i.e. edge or level detection)
     */
    EXTINT_CALLBACK_TYPE_DETECT,
};

enum status_code extint_register_callback(
    const extint_callback_t callback,
    const uint8_t channel,
    const enum extint_callback_type type);

enum status_code extint_unregister_callback(
    const extint_callback_t callback,
    const uint8_t channel,
    const enum extint_callback_type type);

uint8_t extint_get_current_channel(void);

/** @} */

/** \name Callback Enabling and Disabling (Channel)
 * @{
 */

enum status_code extint_chan_enable_callback(
    const uint8_t channel,
    const enum extint_callback_type type);

enum status_code extint_chan_disable_callback(
    const uint8_t channel,
    const enum extint_callback_type type);

/** @} */

/** @} */

#ifdef __cplusplus
}
#endif

#endif