FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/bsp/abb+spi/abb_core_inth.c @ 543:2dccd2b4e5a2
gsm-fw/L1/cust0/Makefile: forgot -mthumb for l1_cust_xip.o
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 03 Aug 2014 05:36:56 +0000 |
parents | eba29cb0526c |
children | 1c0033c2fe33 |
rev | line source |
---|---|
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /**********************************************************************************/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 /* TEXAS INSTRUMENTS INCORPORATED PROPRIETARY INFORMATION */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 /* Property of Texas Instruments -- For Unrestricted Internal Use Only */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 /* Unauthorized reproduction and/or distribution is strictly prohibited. This */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 /* product is protected under copyright law and trade secret law as an */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 /* unpublished work. Created 1987, (C) Copyright 1997 Texas Instruments. All */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 /* rights reserved. */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 /* Filename : abb_core_inth.c */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 /* Description : Functions to manage the ABB device interrupt. */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 /* The Serial Port Interface is used to connect the TI */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 /* Analog BaseBand (ABB). */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 /* It is assumed that the ABB is connected as the SPI */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 /* device 0, and ABB interrupt is mapped as external IT. */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 /* Author : Pascal PUEL */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 /* Version number : 1.2 */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 /* Date and time : 07/02/03 */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 /* Previous delta : Creation */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 /**********************************************************************************/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 /* 17/12/03 */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 /* The original abb_inth.c has been splitted between the actual abb_inth.c */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 /* located in drv_apps directory and abb_inth_core.c located in drv_core */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 /* directory. */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 /**********************************************************************************/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 |
156
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
36 #include "../../include/config.h" |
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
37 #include "../../L1/include/l1_confg.h" |
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
38 #include "../../L1/include/l1_macro.h" |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 #include <string.h> |
156
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
41 #include "abb_core_inth.h" |
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
42 |
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
43 #include "../../include/sys_types.h" |
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
44 #include "../../riviera/rv/general.h" |
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
45 #include "../../nucleus/nucleus.h" // for NUCLEUS functions and types |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 #if (OP_L1_STANDALONE == 0) |
156
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
48 #include "../../riviera/rv/rv_defined_swe.h" // for RVM_PWR_SWE |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 #endif |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 #if (OP_L1_STANDALONE == 1) |
156
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
52 #include "../../L1/include/l1_types.h" |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 #endif |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 |
156
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
55 #include "../iq.h" |
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
56 |
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
57 #include "../../osx/cust_os.h" |
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
58 #include "../../L1/include/l1_signa.h" |
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
59 #include "abb.h" |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 #if(OP_L1_STANDALONE == 0) |
156
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
62 #include "../../riviera/rvm/rvm_use_id_list.h" // for SPI_USE_ID |
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
63 #include "spi_env.h" |
eba29cb0526c
gsm-fw: started on the header dependencies for bsp/abb+spi/abb_core_inth.c
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
64 #include "spi_process.h" // for ABB_EXT_IRQ_EVT |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 #include "power/power.h" |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 #endif /* (OP_L1_STANDALONE == 0) */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
70 // Size of the HISR stack associated to the ABB interrupt |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
71 #define ABB_HISR_STACK_SIZE (512) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
72 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
73 static NU_HISR ABB_Hisr; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 static char ABB_HisrStack[ABB_HISR_STACK_SIZE]; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 /*-----------------------------------------------------------------------*/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 /* Create_ABB_HISR() */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 /* This function is called from Layer1 during initialization process */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 /* to create the HISR associated to the ABB External Interrupt. */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 /*-----------------------------------------------------------------------*/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
85 void Create_ABB_HISR(void) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
86 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
87 // Fill the entire stack with the pattern 0xFE |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
88 memset (ABB_HisrStack, 0xFE, sizeof(ABB_HisrStack)); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
89 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
90 // Create the HISR which is called when an ABB interrupt is received. |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
91 NU_Create_HISR(&ABB_Hisr, "EXT_HISR", EXT_HisrEntry, 2, ABB_HisrStack, sizeof(ABB_HisrStack)); // lowest prty |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
92 } |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
93 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
94 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
95 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
96 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
97 /*-----------------------------------------------------------------------*/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
98 /* Activate_ABB_HISR() */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
99 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
100 /* This function is called from the interrupt handler to activate */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
101 /* the HISR associated to the ABB External Interrupt. */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
102 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
103 /*-----------------------------------------------------------------------*/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
104 SYS_BOOL Activate_ABB_HISR(void) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
105 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 if(NU_SUCCESS != NU_Activate_HISR(&ABB_Hisr)) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
108 return 1; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
109 } |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
110 return 0; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
111 } |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
112 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
113 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
114 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
115 /*-----------------------------------------------------------------------*/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
116 /* EXT_HisrEntry() */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
117 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
118 /* This function is called when an ABB interrupt (external interrupt) */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
119 /* is received. */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
120 /* In a "L1_STANDALONE" environment, this IT is related to ADC. */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
121 /* In a complete system, this IT can have several causes. In that case, */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
122 /* it sends a message to the SPI task, to handle the IT in calling a */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
123 /* callback function. */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
124 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
125 /*-----------------------------------------------------------------------*/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
126 void EXT_HisrEntry(void) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
127 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
128 #if (OP_L1_STANDALONE == 1) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
129 // New code in order to test the ADC with the L1 standalone |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 UWORD16 data ; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 xSignalHeaderRec *adc_msg; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
132 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
133 // Call to the low-level driver function to read the interrupt status register. |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
134 data = ABB_Read_Register_on_page(PAGE1, ITSTATREG); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
135 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
136 if(data & ADCEND_IT_STS) // end of ADC |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
137 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
138 adc_msg = os_alloc_sig(sizeof(T_CST_ADC_RESULT)); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
139 if(adc_msg != NU_NULL) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
140 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
141 adc_msg->SignalCode = CST_ADC_RESULT; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
142 ABB_Read_ADC(&((T_CST_ADC_RESULT *)(adc_msg->SigP))->adc_result[0]); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
143 os_send_sig(adc_msg, RRM1_QUEUE); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
144 } |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
145 } |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
146 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
147 #if (CHIPSET == 12) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
148 // Unmask ABB ext interrupt |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
149 F_INTH_ENABLE_ONE_IT(C_INTH_ABB_IRQ_IT); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
150 #else |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
151 // Unmask external (ABB) interrupt |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
152 IQ_Unmask(IQ_EXT); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 #endif |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
154 #endif |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
155 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
156 #if (OP_L1_STANDALONE == 0) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
157 T_RV_HDR *msgPtr; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
158 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
159 if(SPI_GBL_INFO_PTR != NULL) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
160 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
161 if(SPI_GBL_INFO_PTR->SpiTaskReady != FALSE) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
162 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
163 if(rvf_get_buf (SPI_GBL_INFO_PTR->prim_id, sizeof (T_RV_HDR),(void **) &msgPtr) == RVF_RED) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
164 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
165 rvf_send_trace ("SPI ERROR: ABB IQ External not possible. Reason: Not enough memory", |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
166 66, |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
167 NULL_PARAM, |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
168 RV_TRACE_LEVEL_ERROR, |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
169 SPI_USE_ID); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
170 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
171 /* Unmask External interrupt */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
172 #if (CHIPSET == 12) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
173 // Unmask ABB ext interrupt |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
174 F_INTH_ENABLE_ONE_IT(C_INTH_ABB_IRQ_IT); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
175 #else |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 // Unmask external (ABB) interrupt |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
177 IQ_Unmask(IQ_EXT); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
178 #endif |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
179 } |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
180 else // enough memory => normal processing : a message is sent to the SPI task. |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
181 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
182 msgPtr->msg_id = ABB_EXT_IRQ_EVT; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
183 msgPtr->dest_addr_id = SPI_GBL_INFO_PTR->addr_id; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
184 msgPtr->callback_func = (CALLBACK_FUNC) spi_abb_read_int_reg_callback; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
185 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
186 rvf_send_msg (SPI_GBL_INFO_PTR->addr_id, msgPtr); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
187 } |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
188 } |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
189 else // SpiTaskReady is false |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
190 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
191 rvf_send_trace("ABB IQ External not possible. Reason: SPI Task not ready",56, NULL_PARAM, |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
192 RV_TRACE_LEVEL_ERROR, SPI_USE_ID); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
193 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
194 /* Unmask External interrupt */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
195 #if (CHIPSET == 12) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
196 // Unmask ABB ext interrupt |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
197 F_INTH_ENABLE_ONE_IT(C_INTH_ABB_IRQ_IT); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
198 #else |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
199 // Unmask external (ABB) interrupt |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
200 IQ_Unmask(IQ_EXT); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
201 #endif |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
202 } |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
203 } |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
204 else // SPI_GBL_INFO_PTR = NULL |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
205 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
206 rvf_send_trace("ABB IQ External ERROR. Reason: SPI task not started",51, NULL_PARAM, |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
207 RV_TRACE_LEVEL_ERROR, SPI_USE_ID); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
208 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
209 /* Unmask External interrupt */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
210 #if (CHIPSET == 12) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
211 // Unmask ABB ext interrupt |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
212 F_INTH_ENABLE_ONE_IT(C_INTH_ABB_IRQ_IT); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
213 #else |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
214 // Unmask external (ABB) interrupt |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
215 IQ_Unmask(IQ_EXT); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
216 #endif |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
217 } |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
218 #endif |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
219 } |