mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
608afc4777
- Included a collection of cpu-dependent headers in core/include/arch - Extracted all interfaces that need to be implemented for a cpu - Created a mapping between those interfaces and the old ones - added flag for disabling arch interface - added missing state to lpm_arch interface - added arch interface for reboot - fixed newline issues that were pointed out - documentation fixes to cpu-core interface
63 lines
1.4 KiB
C
63 lines
1.4 KiB
C
/*
|
|
* Copyright (C) 2013 Freie Universität Berlin
|
|
*
|
|
* This file subject to the terms and conditions of the GNU Lesser General
|
|
* Public License. See the file LICENSE in the top level directory for more
|
|
* details.
|
|
*/
|
|
|
|
/**
|
|
* @defgroup core_irq IRQ Handling
|
|
* @ingroup core
|
|
* @brief Provides an API to control interrupt processing
|
|
* @{
|
|
*
|
|
* @file irq.h
|
|
* @brief IRQ driver interface
|
|
*
|
|
* @author Freie Universität Berlin, Computer Systems & Telematics
|
|
*/
|
|
|
|
#ifndef IRQ_H_
|
|
#define IRQ_H_
|
|
|
|
#include <stdbool.h>
|
|
#include "arch/irq_arch.h"
|
|
|
|
/**
|
|
* @brief This function sets the IRQ disable bit in the status register
|
|
*
|
|
* @note This function should be used in favour of dINT().
|
|
*
|
|
* @return previous value of status register
|
|
*/
|
|
unsigned disableIRQ(void);
|
|
|
|
/**
|
|
* @brief This function clears the IRQ disable bit in the status register
|
|
* @return previous value of status register
|
|
*
|
|
* @see restoreIRQ
|
|
*/
|
|
unsigned enableIRQ(void);
|
|
|
|
/**
|
|
* @brief This function restores the IRQ disable bit in the status register
|
|
* to the value contained within passed state
|
|
* @param state state to restore
|
|
*
|
|
* @note This function should be used in favour of eINT().
|
|
*
|
|
* @see disableIRQ
|
|
*/
|
|
void restoreIRQ(unsigned state);
|
|
|
|
/**
|
|
* @brief Check whether called from interrupt service routine
|
|
* @return true, if in interrupt service routine, false if not
|
|
*/
|
|
int inISR(void);
|
|
|
|
/** @} */
|
|
#endif /* IRQ_H_ */
|