lol

Dependencies:   MMA8451Q

Fork of Application by Mateusz Kowalik

Committer:
danix
Date:
Sun Jan 21 22:28:30 2018 +0000
Revision:
12:3a30cdffa27c
Parent:
10:41552d038a69
Working acelerometer and mouse

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Zaitsev 10:41552d038a69 1 /**
Zaitsev 10:41552d038a69 2 ******************************************************************************
Zaitsev 10:41552d038a69 3 * @file exceptions.c
Zaitsev 10:41552d038a69 4 * @brief Contains relocatable exception table.
Zaitsev 10:41552d038a69 5 * @internal
Zaitsev 10:41552d038a69 6 * @author ON Semiconductor
Zaitsev 10:41552d038a69 7 * $Rev: 2074 $
Zaitsev 10:41552d038a69 8 * $Date: 2013-07-10 14:36:15 +0200 (Wed, 10 Jul 2013) $
Zaitsev 10:41552d038a69 9 ******************************************************************************
Zaitsev 10:41552d038a69 10 * Copyright 2016 Semiconductor Components Industries LLC (d/b/a “ON Semiconductor”).
Zaitsev 10:41552d038a69 11 * All rights reserved. This software and/or documentation is licensed by ON Semiconductor
Zaitsev 10:41552d038a69 12 * under limited terms and conditions. The terms and conditions pertaining to the software
Zaitsev 10:41552d038a69 13 * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf
Zaitsev 10:41552d038a69 14 * (“ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software”) and
Zaitsev 10:41552d038a69 15 * if applicable the software license agreement. Do not use this software and/or
Zaitsev 10:41552d038a69 16 * documentation unless you have carefully read and you agree to the limited terms and
Zaitsev 10:41552d038a69 17 * conditions. By using this software and/or documentation, you agree to the limited
Zaitsev 10:41552d038a69 18 * terms and conditions.
Zaitsev 10:41552d038a69 19 *
Zaitsev 10:41552d038a69 20 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
Zaitsev 10:41552d038a69 21 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
Zaitsev 10:41552d038a69 22 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
Zaitsev 10:41552d038a69 23 * ON SEMICONDUCTOR SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL,
Zaitsev 10:41552d038a69 24 * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
Zaitsev 10:41552d038a69 25 * @endinternal
Zaitsev 10:41552d038a69 26 *
Zaitsev 10:41552d038a69 27 * @ingroup app
Zaitsev 10:41552d038a69 28 *
Zaitsev 10:41552d038a69 29 * @details
Zaitsev 10:41552d038a69 30 */
Zaitsev 10:41552d038a69 31
Zaitsev 10:41552d038a69 32 /*************************************************************************************************
Zaitsev 10:41552d038a69 33 * *
Zaitsev 10:41552d038a69 34 * Header files *
Zaitsev 10:41552d038a69 35 * *
Zaitsev 10:41552d038a69 36 *************************************************************************************************/
Zaitsev 10:41552d038a69 37
Zaitsev 10:41552d038a69 38 /* BSP inclusions */
Zaitsev 10:41552d038a69 39 #include "device.h"
Zaitsev 10:41552d038a69 40 #include "uart_16c550.h"
Zaitsev 10:41552d038a69 41
Zaitsev 10:41552d038a69 42 #include "memory_map.h"
Zaitsev 10:41552d038a69 43 #include "timer.h"
Zaitsev 10:41552d038a69 44
Zaitsev 10:41552d038a69 45 /* Other inclusions */
Zaitsev 10:41552d038a69 46 #include "types.h"
Zaitsev 10:41552d038a69 47
Zaitsev 10:41552d038a69 48
Zaitsev 10:41552d038a69 49 #include "rtc.h"
Zaitsev 10:41552d038a69 50 #include "gpio.h"
Zaitsev 10:41552d038a69 51 #include "uart_16c550.h"
Zaitsev 10:41552d038a69 52
Zaitsev 10:41552d038a69 53 /*************************************************************************************************
Zaitsev 10:41552d038a69 54 * *
Zaitsev 10:41552d038a69 55 * Externally declarewd functions *
Zaitsev 10:41552d038a69 56 * *
Zaitsev 10:41552d038a69 57 *************************************************************************************************/
Zaitsev 10:41552d038a69 58 extern void fSysTickHandler(void);
Zaitsev 10:41552d038a69 59 /*************************************************************************************************
Zaitsev 10:41552d038a69 60 * *
Zaitsev 10:41552d038a69 61 * Functions *
Zaitsev 10:41552d038a69 62 * *
Zaitsev 10:41552d038a69 63 *************************************************************************************************/
Zaitsev 10:41552d038a69 64
Zaitsev 10:41552d038a69 65 /** Not implemented exception, exception handler */
Zaitsev 10:41552d038a69 66 void NotImplemented_Handler(void)
Zaitsev 10:41552d038a69 67 {
Zaitsev 10:41552d038a69 68 while (1) {};
Zaitsev 10:41552d038a69 69 }
Zaitsev 10:41552d038a69 70
Zaitsev 10:41552d038a69 71 /** Hardware fault interrupt handler */
Zaitsev 10:41552d038a69 72 void HardFault_Handler(void)
Zaitsev 10:41552d038a69 73 {
Zaitsev 10:41552d038a69 74 while (1) {};
Zaitsev 10:41552d038a69 75 }
Zaitsev 10:41552d038a69 76
Zaitsev 10:41552d038a69 77 /*************************************************************************************************
Zaitsev 10:41552d038a69 78 * *
Zaitsev 10:41552d038a69 79 * Functions *
Zaitsev 10:41552d038a69 80 * *
Zaitsev 10:41552d038a69 81 *************************************************************************************************/
Zaitsev 10:41552d038a69 82 /** MacHw IRQ handler implemented in the RF driver stack */
Zaitsev 10:41552d038a69 83
Zaitsev 10:41552d038a69 84 /** Call the Timer0 IRQ handler */
Zaitsev 10:41552d038a69 85 void fIrqTim0Handler()
Zaitsev 10:41552d038a69 86 {
Zaitsev 10:41552d038a69 87 us_timer_isr();
Zaitsev 10:41552d038a69 88 }
Zaitsev 10:41552d038a69 89
Zaitsev 10:41552d038a69 90 /** Call the Timer1 IRQ handler */
Zaitsev 10:41552d038a69 91 void fIrqTim1Handler()
Zaitsev 10:41552d038a69 92 {
Zaitsev 10:41552d038a69 93 us_ticker_isr();
Zaitsev 10:41552d038a69 94 }
Zaitsev 10:41552d038a69 95
Zaitsev 10:41552d038a69 96 /** Call the Timer2 IRQ handler */
Zaitsev 10:41552d038a69 97 void fIrqTim2Handler()
Zaitsev 10:41552d038a69 98 {
Zaitsev 10:41552d038a69 99 NotImplemented_Handler();
Zaitsev 10:41552d038a69 100 }
Zaitsev 10:41552d038a69 101
Zaitsev 10:41552d038a69 102 /** Call the Gpio IRQ handler */
Zaitsev 10:41552d038a69 103 void fIrqGpioHandler()
Zaitsev 10:41552d038a69 104 {
Zaitsev 10:41552d038a69 105 fGpioHandler();
Zaitsev 10:41552d038a69 106 }
Zaitsev 10:41552d038a69 107
Zaitsev 10:41552d038a69 108 /** Call the Spi IRQ handler */
Zaitsev 10:41552d038a69 109 void fIrqSpiHandler()
Zaitsev 10:41552d038a69 110 {
Zaitsev 10:41552d038a69 111 NotImplemented_Handler();
Zaitsev 10:41552d038a69 112 }
Zaitsev 10:41552d038a69 113
Zaitsev 10:41552d038a69 114 /** Call the Uart 1 IRQ handler */
Zaitsev 10:41552d038a69 115 void fIrqUart1Handler(void)
Zaitsev 10:41552d038a69 116 {
Zaitsev 10:41552d038a69 117 Uart1_Irq();
Zaitsev 10:41552d038a69 118 }
Zaitsev 10:41552d038a69 119
Zaitsev 10:41552d038a69 120 /** Call the Uart 2 IRQ handler */
Zaitsev 10:41552d038a69 121 void fIrqUart2Handler(void)
Zaitsev 10:41552d038a69 122 {
Zaitsev 10:41552d038a69 123 Uart2_Irq();
Zaitsev 10:41552d038a69 124 }
Zaitsev 10:41552d038a69 125
Zaitsev 10:41552d038a69 126 /** Call the RTC IRQ handler */
Zaitsev 10:41552d038a69 127 void fIrqRtcHandler(void)
Zaitsev 10:41552d038a69 128 {
Zaitsev 10:41552d038a69 129 fRtcHandler();
Zaitsev 10:41552d038a69 130 }
Zaitsev 10:41552d038a69 131
Zaitsev 10:41552d038a69 132 /** Call the I2C IRQ handler */
Zaitsev 10:41552d038a69 133 void fIrqI2CHandler(void)
Zaitsev 10:41552d038a69 134 {
Zaitsev 10:41552d038a69 135 NotImplemented_Handler();
Zaitsev 10:41552d038a69 136 }
Zaitsev 10:41552d038a69 137
Zaitsev 10:41552d038a69 138 /** Call the I2c2 IRQ handler */
Zaitsev 10:41552d038a69 139 void fIrqI2C2Handler(void)
Zaitsev 10:41552d038a69 140 {
Zaitsev 10:41552d038a69 141 NotImplemented_Handler();
Zaitsev 10:41552d038a69 142 }
Zaitsev 10:41552d038a69 143
Zaitsev 10:41552d038a69 144 /** Call the Spi2 IRQ handler */
Zaitsev 10:41552d038a69 145 void fIrqSpi2Handler(void)
Zaitsev 10:41552d038a69 146 {
Zaitsev 10:41552d038a69 147 NotImplemented_Handler();
Zaitsev 10:41552d038a69 148 }
Zaitsev 10:41552d038a69 149
Zaitsev 10:41552d038a69 150 /** Call the UVI IRQ handler */
Zaitsev 10:41552d038a69 151 void fIrqUviHandler(void)
Zaitsev 10:41552d038a69 152 {
Zaitsev 10:41552d038a69 153 NotImplemented_Handler();
Zaitsev 10:41552d038a69 154 }
Zaitsev 10:41552d038a69 155
Zaitsev 10:41552d038a69 156 /** Call the ADC handler */
Zaitsev 10:41552d038a69 157 void fIrqAdcHandler(void)
Zaitsev 10:41552d038a69 158 {
Zaitsev 10:41552d038a69 159 NotImplemented_Handler();
Zaitsev 10:41552d038a69 160 }