/*
 * Interrupt.h
 *
 *  Created on: Nov 25, 2016
 *      Author: B50961
 */

#ifndef SOURCES_INTERRUPT_H_
#define SOURCES_INTERRUPT_H_


//void Enable_NVIC_IT (void);
//void Disable_NVIC_IT (void);
//void IntRestoreAll(uint32_t var);

#define ENABLE_NVIC_IT	__asm("CPSIE i")
#define DISABLE_NVIC_IT	__asm ("CPSID i")

/*
 * Below is to set the priority of the different interrupts
 * There are four levels of priority, choose between 0 (highest priority), 1, 2 or 3 (lowest priority)
 */

#define TPM0_INTERRUPT_PRIORITY			3
#define TPM1_INTERRUPT_PRIORITY			3
#define UART0_INTERRUPT_PRIORITY		2
#define UART0_ERROR_INTERRUPT_PRIORITY	2

#endif /* SOURCES_INTERRUPT_H_ */
