Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[c1aed7]: stm8_interrupt_vector.c Maximize Restore History

Download this file

stm8_interrupt_vector.c    65 lines (58 with data), 2.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* BASIC INTERRUPT VECTOR TABLE FOR STM8S devices
* Copyright (c) 2007 STMicroelectronics
*/
typedef void (*interrupt_handler_t)(void);
struct interrupt_vector
{
unsigned char interrupt_instruction;
interrupt_handler_t interrupt_handler;
};
void NonHandledInterrupt (void) interrupt
{
/* in order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction
*/
return;
}
extern void _stext(); /* startup routine */
extern void main(void);
extern void increase_freetimer(void);
struct interrupt_vector const _vectab[] =
{
{
0x82, (interrupt_handler_t)_stext
}
, /* reset */
//{0x82, (interrupt_handler_t)main}, /* reset */
{0x82, NonHandledInterrupt}, /* trap */
{0x82, NonHandledInterrupt}, /* irq0 - tli */
{0x82, NonHandledInterrupt}, /* irq1 - awu */
{0x82, NonHandledInterrupt}, /* irq2 - clk */
{0x82, NonHandledInterrupt}, /* irq3 - exti0 */
{0x82, NonHandledInterrupt}, /* irq4 - exti1 */
{0x82, NonHandledInterrupt}, /* irq5 - exti2 */
{0x82, NonHandledInterrupt}, /* irq6 - exti3 */
{0x82, NonHandledInterrupt}, /* irq7 - exti4 */
{0x82, NonHandledInterrupt}, /* irq8 - can rx */
{0x82, NonHandledInterrupt}, /* irq9 - can tx */
{0x82, NonHandledInterrupt}, /* irq10 - spi*/
{0x82, NonHandledInterrupt}, /* irq11 - tim1 */
{0x82, NonHandledInterrupt}, /* irq12 - tim1 */
{0x82, (interrupt_handler_t)increase_freetimer}, /* irq13 - tim2 */
{0x82, NonHandledInterrupt}, /* irq14 - tim2 */
{0x82, NonHandledInterrupt}, /* irq15 - tim3 */
{0x82, NonHandledInterrupt}, /* irq16 - tim3 */
{0x82, NonHandledInterrupt}, /* irq17 - uart1 */
{0x82, NonHandledInterrupt}, /* irq18 - uart1 */
{0x82, NonHandledInterrupt}, /* irq19 - i2c */
{0x82, NonHandledInterrupt}, /* irq20 - uart2/3 */
{0x82, NonHandledInterrupt}, /* irq21 - uart2/3 */
{0x82, NonHandledInterrupt}, /* irq22 - adc */
{0x82, NonHandledInterrupt}, /* irq23 - tim4 */
{0x82, NonHandledInterrupt}, /* irq24 - flash */
{0x82, NonHandledInterrupt}, /* irq25 - reserved */
{0x82, NonHandledInterrupt}, /* irq26 - reserved */
{0x82, NonHandledInterrupt}, /* irq27 - reserved */
{0x82, NonHandledInterrupt}, /* irq28 - reserved */
{0x82, NonHandledInterrupt} /* irq29 - reserved */
};