/*
 * Copyright (C) 2020-2021 Aloysius Indrayanto
 *
 * This file is part of the eCxx library, see LICENSE file for the license details.
 */


#ifndef ECXX_PLATFORM_AVR_COMMON_INTERNAL_H
#define ECXX_PLATFORM_AVR_COMMON_INTERNAL_H


#include <eCxx/eCxx_Internal.h>
#include <eCxx/Platform/Common/Application.h>


namespace eCxx {

namespace AVR {


//
// Interrupt-related data types
//
typedef Application::VoidFuncPtr    VoidFuncPtr;
typedef Application::VoidFuncPtrArg VoidFuncPtrArg;

typedef Application::InterruptMode  InterruptMode;


//
// Function prototypes
//
extern bool attachInterrupt(uint8_t pin, VoidFuncPtr userFunc, InterruptMode mode);
extern bool attachInterruptArg(uint8_t pin, VoidFuncPtrArg userFunc, void* arg, InterruptMode mode);
extern bool detachInterrupt(uint8_t pin);


} // namespace AVR

} // namespace eCxx


#endif
