Commit fde014118c4541d78c200e39ceec0f6c3b1803f4
1 parent
f0c0dcaa
--no commit message
Showing
71 changed files
with
821 additions
and
6053 deletions
BlinkerLaunchPad/.externalToolBuilders/Blinker LaunchPad Builder.launch deleted
1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
2 | -<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType"> | |
3 | -<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/> | |
4 | -<mapAttribute key="org.eclipse.debug.core.environmentVariables"> | |
5 | -<mapEntry key="PATH" value="${eclipse_home}/msptools/bin${system_property:path.separator}${env_var:PATH}"/> | |
6 | -</mapAttribute> | |
7 | -<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> | |
8 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?><resources><item path="/BlinkerLaunchPad/main.c" type="1"/><item path="/BlinkerLaunchPad/main.out" type="1"/><item path="/BlinkerLaunchPad/makefile" type="1"/><item path="/BlinkerSchema/out/Blinker.h" type="1"/><item path="/BlinkerSchema/schema.ems" type="1"/><item path="/CommonLaunchPad" type="4"/></resources>}"/> | |
9 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}/msptools/bin/gmake${exe_ext}"/> | |
10 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/> | |
11 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="all COMMON=${project_loc:/CommonLaunchPad} SCHEMA=${project_loc:/BlinkerSchema}"/> | |
12 | -<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> | |
13 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${project_loc}"/> | |
14 | -</launchConfiguration> |
BlinkerLaunchPad/.externalToolBuilders/Blinker LaunchPad Cleaner.launch deleted
1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
2 | -<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType"> | |
3 | -<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/> | |
4 | -<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> | |
5 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}/msptools/bin/gmake${exe_ext}"/> | |
6 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="clean"/> | |
7 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="local-clean COMMON=${project_loc:/CommonLaunchPad}"/> | |
8 | -<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> | |
9 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${project_loc}"/> | |
10 | -</launchConfiguration> |
BlinkerLaunchPad/.project deleted
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<projectDescription> | |
3 | - <name>BlinkerLaunchPad</name> | |
4 | - <comment></comment> | |
5 | - <projects> | |
6 | - <project>BlinkerSchema</project> | |
7 | - </projects> | |
8 | - <buildSpec> | |
9 | - <buildCommand> | |
10 | - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> | |
11 | - <triggers>full,incremental,</triggers> | |
12 | - <arguments> | |
13 | - <dictionary> | |
14 | - <key>LaunchConfigHandle</key> | |
15 | - <value><project>/.externalToolBuilders/Blinker LaunchPad Builder.launch</value> | |
16 | - </dictionary> | |
17 | - </arguments> | |
18 | - </buildCommand> | |
19 | - <buildCommand> | |
20 | - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> | |
21 | - <triggers>clean,</triggers> | |
22 | - <arguments> | |
23 | - <dictionary> | |
24 | - <key>LaunchConfigHandle</key> | |
25 | - <value><project>/.externalToolBuilders/Blinker LaunchPad Cleaner.launch</value> | |
26 | - </dictionary> | |
27 | - </arguments> | |
28 | - </buildCommand> | |
29 | - </buildSpec> | |
30 | - <natures> | |
31 | - <nature>com.emmoco.mcmtooling.example.mcmToolingExampleNature</nature> | |
32 | - </natures> | |
33 | -</projectDescription> |
BlinkerLaunchPad/Blinker.obj deleted
No preview for this file type
BlinkerLaunchPad/Log/log.txt deleted
BlinkerLaunchPad/main.c deleted
1 | -/* | |
2 | - * ============ Platform Configuration ============ | |
3 | - */ | |
4 | - | |
5 | -#include <msp430.h> | |
6 | - | |
7 | -#define LED_ON() (P1OUT |= BIT6) | |
8 | -#define LED_OFF() (P1OUT &= ~BIT6) | |
9 | -#define LED_READ() (P1OUT & BIT6) | |
10 | -#define LED_TOGGLE() (P1OUT ^= BIT6) | |
11 | - | |
12 | -#define CONNECTED_LED_ON() (P1OUT |= BIT0) | |
13 | -#define CONNECTED_LED_OFF() (P1OUT &= ~BIT0) | |
14 | - | |
15 | -#define EAP_RX_BUF UCA0RXBUF | |
16 | -#define EAP_TX_BUF UCA0TXBUF | |
17 | - | |
18 | -#define EAP_RX_VECTOR USCIAB0RX_VECTOR | |
19 | -#define EAP_TX_VECTOR PORT2_VECTOR | |
20 | - | |
21 | -#define EAP_RX_ACK_CONFIG() (P2DIR |= BIT0) | |
22 | -#define EAP_RX_ACK_SET() (P2OUT |= BIT0) | |
23 | -#define EAP_RX_ACK_CLR() (P2OUT &= ~BIT0) | |
24 | - | |
25 | -#define EAP_TX_INT_CONFIG() (P2DIR &= ~BIT1, P2IES |= BIT1, P2IFG &= BIT1, P2IE |= BIT1) | |
26 | -#define EAP_TX_INT_TST() (P2IFG & BIT1) | |
27 | -#define EAP_TX_INT_CLR() (P2IFG &= ~BIT1) | |
28 | - | |
29 | -void init(void) { | |
30 | - | |
31 | - WDTCTL = WDTPW + WDTHOLD; | |
32 | - BCSCTL2 = SELM_0 + DIVM_0 + DIVS_0; | |
33 | - if (CALBC1_1MHZ != 0xFF) { | |
34 | - DCOCTL = 0x00; | |
35 | - BCSCTL1 = CALBC1_1MHZ; /* Set DCO to 1MHz */ | |
36 | - DCOCTL = CALDCO_1MHZ; | |
37 | - } | |
38 | - BCSCTL1 |= XT2OFF + DIVA_0; | |
39 | - BCSCTL3 = XT2S_0 + LFXT1S_2 + XCAP_1; | |
40 | - | |
41 | - P1DIR |= BIT0; /* LED */ | |
42 | - LED_OFF(); | |
43 | - P1DIR |= BIT6; /* CONNECTED_LED */ | |
44 | - CONNECTED_LED_OFF(); | |
45 | - | |
46 | - UCA0CTL1 |= UCSWRST; | |
47 | - | |
48 | - P1SEL |= BIT1 + BIT2; | |
49 | - P1SEL2 |= BIT1 + BIT2; | |
50 | - | |
51 | - EAP_RX_ACK_CONFIG(); | |
52 | - EAP_RX_ACK_SET(); | |
53 | - | |
54 | - EAP_TX_INT_CONFIG(); | |
55 | - | |
56 | - UCA0CTL1 = UCSSEL_2 + UCSWRST; | |
57 | - UCA0MCTL = UCBRF_0 + UCBRS_6; | |
58 | - UCA0BR0 = 8; | |
59 | - UCA0CTL1 &= ~UCSWRST; | |
60 | - | |
61 | - IFG2 &= ~(UCA0RXIFG); | |
62 | - IE2 |= UCA0RXIE; | |
63 | - | |
64 | - TA1CCTL0 = CM_0 + CCIS_0 + OUTMOD_0 + CCIE; | |
65 | - TA1CCR0 = 1200; | |
66 | - TA1CTL = TASSEL_1 + ID_0 + MC_1; | |
67 | - | |
68 | - __enable_interrupt(); | |
69 | -} | |
70 | - | |
71 | -/* | |
72 | - * ============ Serial Driver ============ | |
73 | - */ | |
74 | - | |
75 | -#include <Em_Message.h> | |
76 | - | |
77 | -__attribute__((interrupt(EAP_RX_VECTOR))) | |
78 | -static void rxHandler(void) { | |
79 | - uint8_t b = EAP_RX_BUF; | |
80 | - if (Em_Message_addByte(b)) { | |
81 | - Em_Message_dispatch(); | |
82 | - } | |
83 | - EAP_RX_ACK_CLR(); | |
84 | - EAP_RX_ACK_SET(); | |
85 | -} | |
86 | - | |
87 | -__attribute__((interrupt(EAP_TX_VECTOR))) | |
88 | -static void txHandler(void) { | |
89 | - if (EAP_TX_INT_TST()) { | |
90 | - uint8_t b; | |
91 | - if (Em_Message_getByte(&b)) { | |
92 | - EAP_TX_BUF = b; | |
93 | - } | |
94 | - EAP_TX_INT_CLR(); | |
95 | - } | |
96 | -} | |
97 | - | |
98 | -void Em_Message_startSend() { | |
99 | - uint8_t b; | |
100 | - if (Em_Message_getByte(&b)) { | |
101 | - UCA0TXBUF = b; | |
102 | - } | |
103 | -} | |
104 | - | |
105 | -uint8_t Em_Message_lock() { | |
106 | - uint8_t key; | |
107 | - asm ("MOV r2, %0": "=r" (key)); | |
108 | - key &= 0x8; | |
109 | - asm ("DINT"); | |
110 | - return key; | |
111 | -} | |
112 | - | |
113 | -void Em_Message_unlock(uint8_t key) { | |
114 | - if (key) { | |
115 | - asm ("EINT"); | |
116 | - } | |
117 | - else { | |
118 | - asm ("DINT"); | |
119 | - } | |
120 | -} | |
121 | - | |
122 | -/* | |
123 | - * ============ Application Program ============ | |
124 | - */ | |
125 | - | |
126 | -#include <Blinker.h> | |
127 | - | |
128 | -#define COUNT_DEFAULT 5 | |
129 | - | |
130 | -volatile Blinker_cmd_t cmdRes = Blinker_STOP_CMD; | |
131 | -volatile Blinker_count_t countRes = COUNT_DEFAULT; | |
132 | -volatile Blinker_delay_t delayRes = Blinker_delay_min; | |
133 | - | |
134 | -volatile Blinker_count_t curCount; | |
135 | -volatile Blinker_delay_t curTime; | |
136 | - | |
137 | -__attribute__((interrupt(TIMER1_A0_VECTOR))) | |
138 | -void tickHandler(void) { | |
139 | - if (cmdRes == Blinker_STOP_CMD) { | |
140 | - return; | |
141 | - } | |
142 | - if (curTime < delayRes) { | |
143 | - curTime += Blinker_delay_step; | |
144 | - return; | |
145 | - } | |
146 | - else { | |
147 | - curTime = 0; | |
148 | - } | |
149 | - if (curCount-- > 0) { | |
150 | - LED_TOGGLE(); | |
151 | - } | |
152 | - else { | |
153 | - cmdRes = Blinker_STOP_CMD; | |
154 | - LED_OFF(); | |
155 | - } | |
156 | - Blinker_ledState_indicate(); | |
157 | -} | |
158 | - | |
159 | -int main(int argc, char *argv[]) { | |
160 | - volatile int dummy = 0; | |
161 | - init(); | |
162 | - Blinker_run(); | |
163 | - while (dummy == 0) { | |
164 | - /* idle */ | |
165 | - } | |
166 | - return 0; | |
167 | -} | |
168 | - | |
169 | -void Blinker_connectHandler(void) { | |
170 | - CONNECTED_LED_ON(); | |
171 | -} | |
172 | - | |
173 | -void Blinker_disconnectHandler(void) { | |
174 | - CONNECTED_LED_OFF(); | |
175 | -} | |
176 | - | |
177 | -void Blinker_cmd_store(Blinker_cmd_t* input) { | |
178 | - cmdRes = *input; | |
179 | - switch (cmdRes) { | |
180 | - case Blinker_START_CMD: | |
181 | - curCount = countRes * 2; | |
182 | - curTime = 0; | |
183 | - break; | |
184 | - case Blinker_STOP_CMD: | |
185 | - LED_OFF(); | |
186 | - break; | |
187 | - } | |
188 | -} | |
189 | - | |
190 | -void Blinker_count_fetch(Blinker_count_t* output) { | |
191 | - *output = countRes; | |
192 | -} | |
193 | - | |
194 | -void Blinker_count_store(Blinker_count_t* input) { | |
195 | - countRes = *input; | |
196 | -} | |
197 | - | |
198 | -void Blinker_delay_fetch(Blinker_delay_t* output) { | |
199 | - *output = delayRes; | |
200 | -} | |
201 | - | |
202 | -void Blinker_delay_store(Blinker_delay_t* input) { | |
203 | - delayRes = *input; | |
204 | -} | |
205 | - | |
206 | -void Blinker_ledState_fetch(Blinker_ledState_t* output) { | |
207 | - *output = LED_READ() ? Blinker_LED_ON : Blinker_LED_OFF; | |
208 | -} |
BlinkerLaunchPad/main.map deleted
1 | -Archive member included because of file (symbol) | |
2 | - | |
3 | -/Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) | |
4 | - /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o (_reset_vector__) | |
5 | -/Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
6 | - /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (__watchdog_support) | |
7 | -/Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
8 | - /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (__init_stack) | |
9 | -/Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__low_level_init.o) | |
10 | - /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (__low_level_init) | |
11 | -/Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
12 | - /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (__do_copy_data) | |
13 | -/Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
14 | - /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (__do_clear_bss) | |
15 | -/Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__stop_progExec__.o) | |
16 | - /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (__stop_progExec__) | |
17 | -/Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
18 | - /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (_endless_loop__) | |
19 | -/Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
20 | - /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o (_unexpected_) | |
21 | - | |
22 | -Allocating common symbols | |
23 | -Common symbol size file | |
24 | - | |
25 | -Em_App_recvIdx 0x1 Blinker.obj | |
26 | -Em_App_xmitSize 0x1 Blinker.obj | |
27 | -Em_App_outBuf 0x2 Blinker.obj | |
28 | -curTime 0x2 main.obj | |
29 | -Em_App_ind 0xa Blinker.obj | |
30 | -Em_App_xmitMask 0x4 Blinker.obj | |
31 | -Em_App_msg 0x1a Blinker.obj | |
32 | -Em_App_recvSize 0x1 Blinker.obj | |
33 | -Em_App_fileIndex 0x4 Blinker.obj | |
34 | -Em_App_pdHdlr 0x2 Blinker.obj | |
35 | -Em_App_xmitIdx 0x1 Blinker.obj | |
36 | -curCount 0x2 main.obj | |
37 | - | |
38 | -Memory Configuration | |
39 | - | |
40 | -Name Origin Length Attributes | |
41 | -sfr 0x0000000000000000 0x0000000000000010 | |
42 | -peripheral_8bit 0x0000000000000010 0x00000000000000f0 | |
43 | -peripheral_16bit 0x0000000000000100 0x0000000000000100 | |
44 | -ram 0x0000000000000200 0x0000000000000200 xw | |
45 | -infomem 0x0000000000001000 0x0000000000000100 | |
46 | -infod 0x0000000000001000 0x0000000000000040 | |
47 | -infoc 0x0000000000001040 0x0000000000000040 | |
48 | -infob 0x0000000000001080 0x0000000000000040 | |
49 | -infoa 0x00000000000010c0 0x0000000000000040 | |
50 | -rom 0x000000000000c000 0x0000000000003fe0 xr | |
51 | -vectors 0x000000000000ffe0 0x0000000000000020 | |
52 | -bsl 0x0000000000000000 0x0000000000000000 | |
53 | -far_rom 0x0000000000000000 0x0000000000000000 | |
54 | -*default* 0x0000000000000000 0xffffffffffffffff | |
55 | - | |
56 | -Linker script and memory map | |
57 | - | |
58 | -LOAD /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o | |
59 | -LOAD main.obj | |
60 | -LOAD Blinker.obj | |
61 | -LOAD /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libgcc.a | |
62 | -LOAD /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a | |
63 | -LOAD /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libgcc.a | |
64 | -LOAD /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a | |
65 | - 0x0000000000000040 PROVIDE (__info_segment_size, 0x40) | |
66 | - 0x0000000000001000 PROVIDE (__infod, 0x1000) | |
67 | - 0x0000000000001040 PROVIDE (__infoc, 0x1040) | |
68 | - 0x0000000000001080 PROVIDE (__infob, 0x1080) | |
69 | - 0x00000000000010c0 PROVIDE (__infoa, 0x10c0) | |
70 | - 0x0000000000000000 __IE1 = 0x0 | |
71 | - 0x0000000000000002 __IFG1 = 0x2 | |
72 | - 0x0000000000000001 __IE2 = 0x1 | |
73 | - 0x0000000000000003 __IFG2 = 0x3 | |
74 | - 0x0000000000000048 __ADC10DTC0 = 0x48 | |
75 | - 0x0000000000000049 __ADC10DTC1 = 0x49 | |
76 | - 0x000000000000004a __ADC10AE0 = 0x4a | |
77 | - 0x00000000000001b0 __ADC10CTL0 = 0x1b0 | |
78 | - 0x00000000000001b2 __ADC10CTL1 = 0x1b2 | |
79 | - 0x00000000000001b4 __ADC10MEM = 0x1b4 | |
80 | - 0x00000000000001bc __ADC10SA = 0x1bc | |
81 | - 0x0000000000000056 __DCOCTL = 0x56 | |
82 | - 0x0000000000000057 __BCSCTL1 = 0x57 | |
83 | - 0x0000000000000058 __BCSCTL2 = 0x58 | |
84 | - 0x0000000000000053 __BCSCTL3 = 0x53 | |
85 | - 0x0000000000000059 __CACTL1 = 0x59 | |
86 | - 0x000000000000005a __CACTL2 = 0x5a | |
87 | - 0x000000000000005b __CAPD = 0x5b | |
88 | - 0x0000000000000128 __FCTL1 = 0x128 | |
89 | - 0x000000000000012a __FCTL2 = 0x12a | |
90 | - 0x000000000000012c __FCTL3 = 0x12c | |
91 | - 0x0000000000000020 __P1IN = 0x20 | |
92 | - 0x0000000000000021 __P1OUT = 0x21 | |
93 | - 0x0000000000000022 __P1DIR = 0x22 | |
94 | - 0x0000000000000023 __P1IFG = 0x23 | |
95 | - 0x0000000000000024 __P1IES = 0x24 | |
96 | - 0x0000000000000025 __P1IE = 0x25 | |
97 | - 0x0000000000000026 __P1SEL = 0x26 | |
98 | - 0x0000000000000041 __P1SEL2 = 0x41 | |
99 | - 0x0000000000000027 __P1REN = 0x27 | |
100 | - 0x0000000000000028 __P2IN = 0x28 | |
101 | - 0x0000000000000029 __P2OUT = 0x29 | |
102 | - 0x000000000000002a __P2DIR = 0x2a | |
103 | - 0x000000000000002b __P2IFG = 0x2b | |
104 | - 0x000000000000002c __P2IES = 0x2c | |
105 | - 0x000000000000002d __P2IE = 0x2d | |
106 | - 0x000000000000002e __P2SEL = 0x2e | |
107 | - 0x0000000000000042 __P2SEL2 = 0x42 | |
108 | - 0x000000000000002f __P2REN = 0x2f | |
109 | - 0x0000000000000018 __P3IN = 0x18 | |
110 | - 0x0000000000000019 __P3OUT = 0x19 | |
111 | - 0x000000000000001a __P3DIR = 0x1a | |
112 | - 0x000000000000001b __P3SEL = 0x1b | |
113 | - 0x0000000000000043 __P3SEL2 = 0x43 | |
114 | - 0x0000000000000010 __P3REN = 0x10 | |
115 | - 0x000000000000012e __TA0IV = 0x12e | |
116 | - 0x0000000000000160 __TA0CTL = 0x160 | |
117 | - 0x0000000000000162 __TA0CCTL0 = 0x162 | |
118 | - 0x0000000000000164 __TA0CCTL1 = 0x164 | |
119 | - 0x0000000000000166 __TA0CCTL2 = 0x166 | |
120 | - 0x0000000000000170 __TA0R = 0x170 | |
121 | - 0x0000000000000172 __TA0CCR0 = 0x172 | |
122 | - 0x0000000000000174 __TA0CCR1 = 0x174 | |
123 | - 0x0000000000000176 __TA0CCR2 = 0x176 | |
124 | - 0x000000000000011e __TA1IV = 0x11e | |
125 | - 0x0000000000000180 __TA1CTL = 0x180 | |
126 | - 0x0000000000000182 __TA1CCTL0 = 0x182 | |
127 | - 0x0000000000000184 __TA1CCTL1 = 0x184 | |
128 | - 0x0000000000000186 __TA1CCTL2 = 0x186 | |
129 | - 0x0000000000000190 __TA1R = 0x190 | |
130 | - 0x0000000000000192 __TA1CCR0 = 0x192 | |
131 | - 0x0000000000000194 __TA1CCR1 = 0x194 | |
132 | - 0x0000000000000196 __TA1CCR2 = 0x196 | |
133 | - 0x0000000000000060 __UCA0CTL0 = 0x60 | |
134 | - 0x0000000000000061 __UCA0CTL1 = 0x61 | |
135 | - 0x0000000000000062 __UCA0BR0 = 0x62 | |
136 | - 0x0000000000000063 __UCA0BR1 = 0x63 | |
137 | - 0x0000000000000064 __UCA0MCTL = 0x64 | |
138 | - 0x0000000000000065 __UCA0STAT = 0x65 | |
139 | - 0x0000000000000066 __UCA0RXBUF = 0x66 | |
140 | - 0x0000000000000067 __UCA0TXBUF = 0x67 | |
141 | - 0x000000000000005d __UCA0ABCTL = 0x5d | |
142 | - 0x000000000000005e __UCA0IRTCTL = 0x5e | |
143 | - 0x000000000000005f __UCA0IRRCTL = 0x5f | |
144 | - 0x0000000000000068 __UCB0CTL0 = 0x68 | |
145 | - 0x0000000000000069 __UCB0CTL1 = 0x69 | |
146 | - 0x000000000000006a __UCB0BR0 = 0x6a | |
147 | - 0x000000000000006b __UCB0BR1 = 0x6b | |
148 | - 0x000000000000006c __UCB0I2CIE = 0x6c | |
149 | - 0x000000000000006d __UCB0STAT = 0x6d | |
150 | - 0x000000000000006e __UCB0RXBUF = 0x6e | |
151 | - 0x000000000000006f __UCB0TXBUF = 0x6f | |
152 | - 0x0000000000000118 __UCB0I2COA = 0x118 | |
153 | - 0x000000000000011a __UCB0I2CSA = 0x11a | |
154 | - 0x0000000000000120 __WDTCTL = 0x120 | |
155 | - 0x00000000000010f8 __CALDCO_16MHZ = 0x10f8 | |
156 | - 0x00000000000010f9 __CALBC1_16MHZ = 0x10f9 | |
157 | - 0x00000000000010fa __CALDCO_12MHZ = 0x10fa | |
158 | - 0x00000000000010fb __CALBC1_12MHZ = 0x10fb | |
159 | - 0x00000000000010fc __CALDCO_8MHZ = 0x10fc | |
160 | - 0x00000000000010fd __CALBC1_8MHZ = 0x10fd | |
161 | - 0x00000000000010fe __CALDCO_1MHZ = 0x10fe | |
162 | - 0x00000000000010ff __CALBC1_1MHZ = 0x10ff | |
163 | - | |
164 | -.hash | |
165 | - *(.hash) | |
166 | - | |
167 | -.dynsym | |
168 | - *(.dynsym) | |
169 | - | |
170 | -.dynstr | |
171 | - *(.dynstr) | |
172 | - | |
173 | -.gnu.version | |
174 | - *(.gnu.version) | |
175 | - | |
176 | -.gnu.version_d | |
177 | - *(.gnu.version_d) | |
178 | - | |
179 | -.gnu.version_r | |
180 | - *(.gnu.version_r) | |
181 | - | |
182 | -.rel.init | |
183 | - *(.rel.init) | |
184 | - | |
185 | -.rela.init | |
186 | - *(.rela.init) | |
187 | - | |
188 | -.rel.fini | |
189 | - *(.rel.fini) | |
190 | - | |
191 | -.rela.fini | |
192 | - *(.rela.fini) | |
193 | - | |
194 | -.rel.text | |
195 | - *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) | |
196 | - | |
197 | -.rela.text | |
198 | - *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) | |
199 | - | |
200 | -.rel.rodata | |
201 | - *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) | |
202 | - | |
203 | -.rela.rodata | |
204 | - *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) | |
205 | - | |
206 | -.rel.data | |
207 | - *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) | |
208 | - | |
209 | -.rela.data | |
210 | - *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) | |
211 | - | |
212 | -.rel.bss | |
213 | - *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) | |
214 | - | |
215 | -.rela.bss | |
216 | - *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) | |
217 | - | |
218 | -.rel.ctors | |
219 | - *(.rel.ctors) | |
220 | - | |
221 | -.rela.ctors | |
222 | - *(.rela.ctors) | |
223 | - | |
224 | -.rel.dtors | |
225 | - *(.rel.dtors) | |
226 | - | |
227 | -.rela.dtors | |
228 | - *(.rela.dtors) | |
229 | - | |
230 | -.rel.got | |
231 | - *(.rel.got) | |
232 | - | |
233 | -.rela.got | |
234 | - *(.rela.got) | |
235 | - | |
236 | -.rel.plt | |
237 | - *(.rel.plt) | |
238 | - | |
239 | -.rela.plt | |
240 | - *(.rela.plt) | |
241 | - | |
242 | -.text 0x000000000000c000 0x656 | |
243 | - 0x000000000000c000 . = ALIGN (0x2) | |
244 | - *(.init .init.*) | |
245 | - *(.init0) | |
246 | - .init0 0x000000000000c000 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) | |
247 | - 0x000000000000c000 _reset_vector__ | |
248 | - *(.init1) | |
249 | - .init1 0x000000000000c000 0xc /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
250 | - 0x000000000000c000 __watchdog_support | |
251 | - *(.init2) | |
252 | - .init2 0x000000000000c00c 0x4 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
253 | - 0x000000000000c00c __init_stack | |
254 | - *(.init3) | |
255 | - .init3 0x000000000000c010 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__low_level_init.o) | |
256 | - 0x000000000000c010 __low_level_init | |
257 | - *(.init4) | |
258 | - .init4 0x000000000000c010 0x18 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
259 | - 0x000000000000c010 __do_copy_data | |
260 | - .init4 0x000000000000c028 0x16 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
261 | - 0x000000000000c028 __do_clear_bss | |
262 | - *(.init5) | |
263 | - *(.init6) | |
264 | - *(.init7) | |
265 | - *(.init8) | |
266 | - *(.init9) | |
267 | - .init9 0x000000000000c03e 0x18 main.obj | |
268 | - 0x000000000000c03e main | |
269 | - *(.fini9) | |
270 | - .fini9 0x000000000000c056 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__stop_progExec__.o) | |
271 | - 0x000000000000c056 __stop_progExec__ | |
272 | - *(.fini8) | |
273 | - *(.fini7) | |
274 | - *(.fini6) | |
275 | - *(.fini5) | |
276 | - *(.fini4) | |
277 | - *(.fini3) | |
278 | - *(.fini2) | |
279 | - *(.fini1) | |
280 | - *(.fini0) | |
281 | - .fini0 0x000000000000c056 0x6 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
282 | - 0x000000000000c056 _endless_loop__ | |
283 | - *(.fini .fini.*) | |
284 | - 0x000000000000c05c . = ALIGN (0x2) | |
285 | - 0x000000000000c05c __ctors_start = . | |
286 | - *(.ctors) | |
287 | - 0x000000000000c05c __ctors_end = . | |
288 | - 0x000000000000c05c __dtors_start = . | |
289 | - *(.dtors) | |
290 | - 0x000000000000c05c __dtors_end = . | |
291 | - 0x000000000000c05c . = ALIGN (0x2) | |
292 | - *(.text .text.* .gnu.linkonce.t.*) | |
293 | - .text 0x000000000000c05c 0x4 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o | |
294 | - 0x000000000000c05c __isr_1 | |
295 | - 0x000000000000c05c __isr_4 | |
296 | - 0x000000000000c05c __isr_11 | |
297 | - 0x000000000000c05c __isr_5 | |
298 | - 0x000000000000c05c __isr_2 | |
299 | - 0x000000000000c05c __isr_10 | |
300 | - 0x000000000000c05c __isr_0 | |
301 | - 0x000000000000c05c __isr_8 | |
302 | - 0x000000000000c05c __isr_12 | |
303 | - 0x000000000000c05c __isr_9 | |
304 | - 0x000000000000c05c __isr_6 | |
305 | - 0x000000000000c05c __isr_14 | |
306 | - .text.crt0 0x000000000000c060 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o | |
307 | - .text 0x000000000000c060 0x1f4 main.obj | |
308 | - 0x000000000000c060 init | |
309 | - 0x000000000000c104 __isr_7 | |
310 | - 0x000000000000c130 __isr_3 | |
311 | - 0x000000000000c162 Em_Message_startSend | |
312 | - 0x000000000000c176 Em_Message_lock | |
313 | - 0x000000000000c17e Em_Message_unlock | |
314 | - 0x000000000000c18a tickHandler | |
315 | - 0x000000000000c18a __isr_13 | |
316 | - 0x000000000000c1ea Blinker_connectHandler | |
317 | - 0x000000000000c1f0 Blinker_disconnectHandler | |
318 | - 0x000000000000c1f8 Blinker_cmd_store | |
319 | - 0x000000000000c222 Blinker_count_fetch | |
320 | - 0x000000000000c22a Blinker_count_store | |
321 | - 0x000000000000c230 Blinker_delay_fetch | |
322 | - 0x000000000000c238 Blinker_delay_store | |
323 | - 0x000000000000c23e Blinker_ledState_fetch | |
324 | - .text 0x000000000000c254 0x400 Blinker.obj | |
325 | - 0x000000000000c254 Em_Message_addByte | |
326 | - 0x000000000000c29c Blinker_reset | |
327 | - 0x000000000000c2ca Blinker_run | |
328 | - 0x000000000000c2d0 Em_App_startIndSend | |
329 | - 0x000000000000c2ea Blinker_pairingOn | |
330 | - 0x000000000000c30c Blinker_pairingOff | |
331 | - 0x000000000000c316 Blinker_disconnect | |
332 | - 0x000000000000c338 Blinker_accept | |
333 | - 0x000000000000c356 Em_App_startResSend | |
334 | - 0x000000000000c370 Em_App_xmitReady | |
335 | - 0x000000000000c3c4 Em_App_sendResponse | |
336 | - 0x000000000000c3e8 Em_App_sysStoreDispatch | |
337 | - 0x000000000000c402 Em_App_sysFetchDispatch | |
338 | - 0x000000000000c482 Em_App_fetchDispatch | |
339 | - 0x000000000000c4c0 Em_App_storeDispatch | |
340 | - 0x000000000000c4f8 Em_Message_dispatch | |
341 | - 0x000000000000c556 Em_App_sendIndicator | |
342 | - 0x000000000000c586 Em_Message_getByte | |
343 | - 0x000000000000c63c Blinker_ledState_indicate | |
344 | - .text 0x000000000000c654 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) | |
345 | - .text 0x000000000000c654 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
346 | - .text 0x000000000000c654 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
347 | - .text 0x000000000000c654 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__low_level_init.o) | |
348 | - .text 0x000000000000c654 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
349 | - .text 0x000000000000c654 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
350 | - .text 0x000000000000c654 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__stop_progExec__.o) | |
351 | - .text 0x000000000000c654 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
352 | - .text 0x000000000000c654 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
353 | - .text.crt0 0x000000000000c654 0x2 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
354 | - 0x000000000000c654 _unexpected_ | |
355 | - 0x000000000000c656 . = ALIGN (0x2) | |
356 | - | |
357 | -.rodata 0x000000000000c656 0x32 | |
358 | - 0x000000000000c656 . = ALIGN (0x2) | |
359 | - *(.rodata .rodata.* .gnu.linkonce.r.*) | |
360 | - .rodata 0x000000000000c656 0x32 Blinker.obj | |
361 | - 0x000000000000c66a Em_App_endian | |
362 | - 0x000000000000c66c Em_App_build | |
363 | - 0x000000000000c674 Em_App_hash | |
364 | - 0x000000000000c688 . = ALIGN (0x2) | |
365 | - 0x000000000000c688 _etext = . | |
366 | - | |
367 | -.data 0x0000000000000200 0xa load address 0x000000000000c688 | |
368 | - 0x0000000000000200 . = ALIGN (0x2) | |
369 | - 0x0000000000000200 PROVIDE (__data_start, .) | |
370 | - *(.data .data.* .gnu.linkonce.d.*) | |
371 | - .data 0x0000000000000200 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o | |
372 | - .data 0x0000000000000200 0x6 main.obj | |
373 | - 0x0000000000000200 delayRes | |
374 | - 0x0000000000000202 countRes | |
375 | - 0x0000000000000204 cmdRes | |
376 | - .data 0x0000000000000206 0x4 Blinker.obj | |
377 | - 0x0000000000000206 Em_App_inBuf | |
378 | - 0x0000000000000208 Em_App_readIdle | |
379 | - .data 0x000000000000020a 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) | |
380 | - .data 0x000000000000020a 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
381 | - .data 0x000000000000020a 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
382 | - .data 0x000000000000020a 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__low_level_init.o) | |
383 | - .data 0x000000000000020a 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
384 | - .data 0x000000000000020a 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
385 | - .data 0x000000000000020a 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__stop_progExec__.o) | |
386 | - .data 0x000000000000020a 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
387 | - .data 0x000000000000020a 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
388 | - 0x000000000000020a . = ALIGN (0x2) | |
389 | - 0x000000000000020a _edata = . | |
390 | - 0x000000000000c688 PROVIDE (__data_load_start, LOADADDR (.data)) | |
391 | - 0x000000000000000a PROVIDE (__data_size, SIZEOF (.data)) | |
392 | - | |
393 | -.bss 0x000000000000020a 0x3e load address 0x000000000000c692 | |
394 | - 0x000000000000020a PROVIDE (__bss_start, .) | |
395 | - *(.bss .bss.*) | |
396 | - .bss 0x000000000000020a 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o | |
397 | - .bss 0x000000000000020a 0x0 main.obj | |
398 | - .bss 0x000000000000020a 0x4 Blinker.obj | |
399 | - 0x000000000000020a Em_App_moreData | |
400 | - 0x000000000000020c Em_App_state | |
401 | - .bss 0x000000000000020e 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) | |
402 | - .bss 0x000000000000020e 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
403 | - .bss 0x000000000000020e 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
404 | - .bss 0x000000000000020e 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__low_level_init.o) | |
405 | - .bss 0x000000000000020e 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
406 | - .bss 0x000000000000020e 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
407 | - .bss 0x000000000000020e 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__stop_progExec__.o) | |
408 | - .bss 0x000000000000020e 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
409 | - .bss 0x000000000000020e 0x0 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
410 | - *(COMMON) | |
411 | - COMMON 0x000000000000020e 0x4 main.obj | |
412 | - 0x000000000000020e curTime | |
413 | - 0x0000000000000210 curCount | |
414 | - COMMON 0x0000000000000212 0x35 Blinker.obj | |
415 | - 0x0000000000000212 Em_App_recvIdx | |
416 | - 0x0000000000000213 Em_App_xmitSize | |
417 | - 0x0000000000000214 Em_App_outBuf | |
418 | - 0x0000000000000216 Em_App_ind | |
419 | - 0x0000000000000220 Em_App_xmitMask | |
420 | - 0x0000000000000224 Em_App_msg | |
421 | - 0x000000000000023e Em_App_recvSize | |
422 | - 0x0000000000000240 Em_App_fileIndex | |
423 | - 0x0000000000000244 Em_App_pdHdlr | |
424 | - 0x0000000000000246 Em_App_xmitIdx | |
425 | - 0x0000000000000248 . = ALIGN (0x2) | |
426 | - *fill* 0x0000000000000247 0x1 00 | |
427 | - 0x0000000000000248 PROVIDE (__bss_end, .) | |
428 | - 0x000000000000003e PROVIDE (__bss_size, SIZEOF (.bss)) | |
429 | - | |
430 | -.noinit 0x0000000000000248 0x2 load address 0x000000000000c692 | |
431 | - 0x0000000000000248 PROVIDE (__noinit_start, .) | |
432 | - *(.noinit .noinit.*) | |
433 | - .noinit.crt0 0x0000000000000248 0x2 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
434 | - 0x0000000000000248 __wdt_clear_value | |
435 | - 0x000000000000024a . = ALIGN (0x2) | |
436 | - 0x000000000000024a PROVIDE (__noinit_end, .) | |
437 | - 0x000000000000024a . = ALIGN (0x2) | |
438 | - 0x000000000000024a _end = . | |
439 | - | |
440 | -.infomem 0x0000000000001000 0x0 | |
441 | - *(.infomem) | |
442 | - 0x0000000000001000 . = ALIGN (0x2) | |
443 | - *(.infomem.*) | |
444 | - | |
445 | -.infomemnobits 0x0000000000001000 0x0 | |
446 | - *(.infomemnobits) | |
447 | - 0x0000000000001000 . = ALIGN (0x2) | |
448 | - *(.infomemnobits.*) | |
449 | - | |
450 | -.infoa | |
451 | - *(.infoa .infoa.*) | |
452 | - | |
453 | -.infob | |
454 | - *(.infob .infob.*) | |
455 | - | |
456 | -.infoc | |
457 | - *(.infoc .infoc.*) | |
458 | - | |
459 | -.infod | |
460 | - *(.infod .infod.*) | |
461 | - | |
462 | -.vectors 0x000000000000ffe0 0x20 | |
463 | - 0x000000000000ffe0 PROVIDE (__vectors_start, .) | |
464 | - *(.vectors*) | |
465 | - .vectors 0x000000000000ffe0 0x20 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o | |
466 | - 0x000000000000ffe0 __ivtbl_16 | |
467 | - 0x0000000000010000 _vectors_end = . | |
468 | - | |
469 | -.fartext 0x0000000000000000 0x0 | |
470 | - 0x0000000000000000 . = ALIGN (0x2) | |
471 | - *(.fartext) | |
472 | - 0x0000000000000000 . = ALIGN (0x2) | |
473 | - *(.fartext.*) | |
474 | - 0x0000000000000000 _efartext = . | |
475 | - | |
476 | -.profiler | |
477 | - *(.profiler) | |
478 | - | |
479 | -.stab | |
480 | - *(.stab) | |
481 | - | |
482 | -.stabstr | |
483 | - *(.stabstr) | |
484 | - | |
485 | -.stab.excl | |
486 | - *(.stab.excl) | |
487 | - | |
488 | -.stab.exclstr | |
489 | - *(.stab.exclstr) | |
490 | - | |
491 | -.stab.index | |
492 | - *(.stab.index) | |
493 | - | |
494 | -.stab.indexstr | |
495 | - *(.stab.indexstr) | |
496 | - | |
497 | -.comment | |
498 | - *(.comment) | |
499 | - | |
500 | -.debug | |
501 | - *(.debug) | |
502 | - | |
503 | -.line | |
504 | - *(.line) | |
505 | - | |
506 | -.debug_srcinfo | |
507 | - *(.debug_srcinfo) | |
508 | - | |
509 | -.debug_sfnames | |
510 | - *(.debug_sfnames) | |
511 | - | |
512 | -.debug_aranges 0x0000000000000000 0xa4 | |
513 | - *(.debug_aranges) | |
514 | - .debug_aranges | |
515 | - 0x0000000000000000 0x18 main.obj | |
516 | - .debug_aranges | |
517 | - 0x0000000000000018 0x14 Blinker.obj | |
518 | - .debug_aranges | |
519 | - 0x000000000000002c 0x14 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
520 | - .debug_aranges | |
521 | - 0x0000000000000040 0x14 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
522 | - .debug_aranges | |
523 | - 0x0000000000000054 0x14 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
524 | - .debug_aranges | |
525 | - 0x0000000000000068 0x14 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
526 | - .debug_aranges | |
527 | - 0x000000000000007c 0x14 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
528 | - .debug_aranges | |
529 | - 0x0000000000000090 0x14 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
530 | - | |
531 | -.debug_pubnames | |
532 | - *(.debug_pubnames) | |
533 | - | |
534 | -.debug_info 0x0000000000000000 0x11f6 | |
535 | - *(.debug_info) | |
536 | - .debug_info 0x0000000000000000 0x74e main.obj | |
537 | - .debug_info 0x000000000000074e 0x74e Blinker.obj | |
538 | - .debug_info 0x0000000000000e9c 0x8f /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
539 | - .debug_info 0x0000000000000f2b 0x8f /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
540 | - .debug_info 0x0000000000000fba 0x8f /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
541 | - .debug_info 0x0000000000001049 0x8f /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
542 | - .debug_info 0x00000000000010d8 0x8f /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
543 | - .debug_info 0x0000000000001167 0x8f /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
544 | - *(.gnu.linkonce.wi.*) | |
545 | - | |
546 | -.debug_abbrev 0x0000000000000000 0x456 | |
547 | - *(.debug_abbrev) | |
548 | - .debug_abbrev 0x0000000000000000 0x1b0 main.obj | |
549 | - .debug_abbrev 0x00000000000001b0 0x22e Blinker.obj | |
550 | - .debug_abbrev 0x00000000000003de 0x14 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
551 | - .debug_abbrev 0x00000000000003f2 0x14 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
552 | - .debug_abbrev 0x0000000000000406 0x14 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
553 | - .debug_abbrev 0x000000000000041a 0x14 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
554 | - .debug_abbrev 0x000000000000042e 0x14 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
555 | - .debug_abbrev 0x0000000000000442 0x14 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
556 | - | |
557 | -.debug_line 0x0000000000000000 0x61e | |
558 | - *(.debug_line) | |
559 | - .debug_line 0x0000000000000000 0x16a main.obj | |
560 | - .debug_line 0x000000000000016a 0x205 Blinker.obj | |
561 | - .debug_line 0x000000000000036f 0x72 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
562 | - .debug_line 0x00000000000003e1 0x70 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
563 | - .debug_line 0x0000000000000451 0x76 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
564 | - .debug_line 0x00000000000004c7 0x76 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
565 | - .debug_line 0x000000000000053d 0x71 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
566 | - .debug_line 0x00000000000005ae 0x70 /Applications/Development/eclipse/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
567 | - | |
568 | -.debug_frame 0x0000000000000000 0x22e | |
569 | - *(.debug_frame) | |
570 | - .debug_frame 0x0000000000000000 0x11a main.obj | |
571 | - .debug_frame 0x000000000000011a 0x114 Blinker.obj | |
572 | - | |
573 | -.debug_str 0x0000000000000000 0x6c6 | |
574 | - *(.debug_str) | |
575 | - .debug_str 0x0000000000000000 0x32a main.obj | |
576 | - 0x42a (size before relaxing) | |
577 | - .debug_str 0x000000000000032a 0x39c Blinker.obj | |
578 | - 0x49b (size before relaxing) | |
579 | - | |
580 | -.debug_loc 0x0000000000000000 0x381 | |
581 | - *(.debug_loc) | |
582 | - .debug_loc 0x0000000000000000 0xf6 main.obj | |
583 | - .debug_loc 0x00000000000000f6 0x28b Blinker.obj | |
584 | - | |
585 | -.debug_macinfo | |
586 | - *(.debug_macinfo) | |
587 | - | |
588 | -.debug_pubtypes | |
589 | - *(.debug_pubtypes) | |
590 | - | |
591 | -.debug_ranges 0x0000000000000000 0xc | |
592 | - *(.debug_ranges) | |
593 | - .debug_ranges 0x0000000000000000 0xc main.obj | |
594 | - 0x0000000000000400 PROVIDE (__stack, (ORIGIN (ram) + 0x200)) | |
595 | - 0x000000000000c688 PROVIDE (__data_start_rom, _etext) | |
596 | - 0x000000000000c692 PROVIDE (__data_end_rom, (_etext + SIZEOF (.data))) | |
597 | -OUTPUT(main.out elf32-msp430) |
BlinkerLaunchPad/main.obj deleted
No preview for this file type
BlinkerLaunchPad/main.out deleted
No preview for this file type
BlinkerLaunchPad/makefile deleted
BlinkerSchema/.gitignore deleted
1 | -/imports |
BlinkerSchema/.project deleted
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<projectDescription> | |
3 | - <name>BlinkerSchema</name> | |
4 | - <comment></comment> | |
5 | - <projects> | |
6 | - </projects> | |
7 | - <buildSpec> | |
8 | - <buildCommand> | |
9 | - <name>com.emmoco.mcmtooling.core.mcmToolingBuilder</name> | |
10 | - <arguments> | |
11 | - </arguments> | |
12 | - </buildCommand> | |
13 | - </buildSpec> | |
14 | - <natures> | |
15 | - <nature>com.emmoco.mcmtooling.core.mcmToolingNature</nature> | |
16 | - </natures> | |
17 | -</projectDescription> |
BlinkerSchema/Em/Blinker-STUBS.c deleted
1 | -/**** DO NOT EDIT -- this file has been automatically generated from @emmoco.com.Blinker on 2014-05-14T16:24:37T ****/ | |
2 | -/**** protocolLevel = 13, toolsVersion = 13.4.1.201311121909 ****/ | |
3 | - | |
4 | -#include "Blinker.h" | |
5 | - | |
6 | -#ifdef Blinker_STUBS_ /* enables optional inclusion of application stubs */ | |
7 | - | |
8 | -/* Copy the function skeletons below into your own application source file */ | |
9 | - | |
10 | -void Blinker_connectHandler(void) { | |
11 | - /* TODO: application is now connected */ | |
12 | -} | |
13 | - | |
14 | -void Blinker_disconnectHandler(void) { | |
15 | - /* TODO: application is now disconnected */ | |
16 | -} | |
17 | - | |
18 | -void Blinker_cmd_store(Blinker_cmd_t* input) { | |
19 | - /* TODO: write resource 'cmd' from 'input' */ | |
20 | -} | |
21 | - | |
22 | -void Blinker_count_fetch(Blinker_count_t* output) { | |
23 | - /* TODO: read resource 'count' into 'output' */ | |
24 | -} | |
25 | - | |
26 | -void Blinker_count_store(Blinker_count_t* input) { | |
27 | - /* TODO: write resource 'count' from 'input' */ | |
28 | -} | |
29 | - | |
30 | -void Blinker_delay_fetch(Blinker_delay_t* output) { | |
31 | - /* TODO: read resource 'delay' into 'output' */ | |
32 | -} | |
33 | - | |
34 | -void Blinker_delay_store(Blinker_delay_t* input) { | |
35 | - /* TODO: write resource 'delay' from 'input' */ | |
36 | -} | |
37 | - | |
38 | -void Blinker_ledState_fetch(Blinker_ledState_t* output) { | |
39 | - /* TODO: read resource 'ledState' into 'output' */ | |
40 | -} | |
41 | - | |
42 | -#endif /* application stubs */ |
BlinkerSchema/Em/Blinker.c deleted
1 | -/**** DO NOT EDIT -- this file has been automatically generated from @emmoco.com.Blinker on 2014-05-14T16:24:37T ****/ | |
2 | -/**** protocolLevel = 13, toolsVersion = 13.4.1.201311121909 ****/ | |
3 | - | |
4 | -#include "Em_Message.h" | |
5 | -#include "Blinker.h" | |
6 | - | |
7 | -#ifdef __cplusplus | |
8 | -extern "C" { | |
9 | -#endif | |
10 | - | |
11 | -#define Em_Message_protocolLevel 13 | |
12 | - | |
13 | -typedef struct Em_App_Message { | |
14 | - uint8_t dummy[3]; | |
15 | - uint8_t sot; | |
16 | - Em_Message_Header hdr; | |
17 | - uint8_t data[20]; | |
18 | -} Em_App_Message; | |
19 | - | |
20 | -const uint8_t Em_App_hash[] = {252, 123, 209, 86, 230, 104, 211, 8, 40, 191, 19, 28, 180, 183, 223, 192, 13, 0, ((sizeof(struct{uint8_t f1; uint16_t f2;}) - sizeof(uint16_t)) << 4) | (sizeof(struct{uint8_t f1; uint32_t f2;}) - sizeof(uint32_t))}; | |
21 | - | |
22 | -const uint8_t Em_App_build[] = {24, 231, 30, 251, 69, 1, 0, 0}; | |
23 | - | |
24 | -#define Em_App_APP_RESOURCE_COUNT 4 | |
25 | -#define Em_App_SYS_RESOURCE_COUNT 9 | |
26 | - | |
27 | -#define Em_App_ACCEPT Blinker_accept | |
28 | -#define Em_App_ACTIVATEPARAMETERS Blinker_activateParameters | |
29 | -#define Em_App_BROADCASTOFF Blinker_broadcastOff | |
30 | -#define Em_App_DISCONNECT Blinker_disconnect | |
31 | -#define Em_App_PAIRINGON Blinker_pairingOn | |
32 | -#define Em_App_PAIRINGOFF Blinker_pairingOff | |
33 | -#define Em_App_RESET Blinker_reset | |
34 | -#define Em_App_SETDEVICENAME Blinker_setDeviceName | |
35 | -#define Em_App_START Blinker_start | |
36 | - | |
37 | -#define Em_App_CONNECTHANDLER Blinker_connectHandler | |
38 | -#define Em_App_DISCONNECTHANDLER Blinker_disconnectHandler | |
39 | - | |
40 | -#define Em_App_MAX_INDICATOR 2 | |
41 | - | |
42 | -/* BEGIN common code */ | |
43 | - | |
44 | -enum {Em_App_IDLE, Em_App_STARTING, Em_App_DISCONNECTED, Em_App_CONNECTED}; | |
45 | - | |
46 | -typedef struct Em_App_Indicator { | |
47 | - uint8_t dummy[3]; | |
48 | - uint8_t sot; | |
49 | - Em_Message_Header hdr; | |
50 | - uint8_t data[Em_Message_INDSIZE]; | |
51 | -} Em_App_Indicator; | |
52 | - | |
53 | -union { uint32_t align; Em_App_Message msg; } Em_App_msg_u; | |
54 | -union { uint32_t align; Em_App_Indicator ind; } Em_App_ind_u; | |
55 | -#define Em_App_msg Em_App_msg_u.msg | |
56 | -#define Em_App_ind Em_App_ind_u.ind | |
57 | - | |
58 | -void (*Em_App_pdHdlr)(void); | |
59 | - | |
60 | -const uint16_t Em_App_endian = 0x0100; | |
61 | - | |
62 | -Em_Message_Size Em_App_recvIdx; | |
63 | -Em_Message_Size Em_App_recvSize; | |
64 | -Em_Message_Size Em_App_xmitIdx; | |
65 | -Em_Message_Size Em_App_xmitSize; | |
66 | - | |
67 | -uint8_t Em_App_state = Em_App_IDLE; | |
68 | -int32_t Em_App_fileIndex = 0; | |
69 | -uint32_t Em_App_xmitMask = 0; | |
70 | - | |
71 | -uint8_t* Em_App_valp; | |
72 | -uint8_t* Em_App_bufp; | |
73 | -const char* Em_App_desc; | |
74 | - | |
75 | -uint8_t* Em_App_inBuf = (uint8_t*)&Em_App_msg.hdr; | |
76 | -uint8_t* Em_App_outBuf = 0; | |
77 | - | |
78 | -uint8_t* _Em_Message_rxBuf = 0; | |
79 | -uint8_t _Em_Message_rxCnt = 0; | |
80 | - | |
81 | -uint8_t* _Em_Message_txBuf = 0; | |
82 | -uint8_t _Em_Message_txCnt = 0; | |
83 | - | |
84 | -#define Em_App_DEVNAME_LEN 9 | |
85 | -const char* Em_App_devName = 0; | |
86 | - | |
87 | -void Em_App_fetchDispatch(void); | |
88 | -void Em_Message_marshallToBuf(uint8_t* valp, uint8_t* bufp, const char* desc); | |
89 | -void Em_Message_marshallToVal(uint8_t* valp, uint8_t* bufp, const char* desc); | |
90 | -void Em_App_storeDispatch(void); | |
91 | -void Em_App_sendIndicator(Em_Message_ResId indId); | |
92 | -void Em_App_sendResponse(Em_Message_Kind kind, Em_Message_Size size); | |
93 | -void Em_App_startIndSend(void); | |
94 | -void Em_App_startResSend(void); | |
95 | -void Em_App_sysFetchDispatch(void); | |
96 | -void Em_App_sysStoreDispatch(void); | |
97 | -bool Em_App_xmitReady(Em_Message_ResId indId); | |
98 | - | |
99 | -void Em_Message_nextXmit(void) { | |
100 | - uint8_t key = Em_Hal_lock(); | |
101 | - if (Em_App_xmitMask != 0) { | |
102 | - uint8_t i; | |
103 | - uint32_t m; | |
104 | - for (i = 0, m = 0x1; i < Em_App_MAX_INDICATOR; i++, m <<= 1) { | |
105 | - if (Em_App_xmitMask & m) { | |
106 | - Em_App_xmitMask &= ~m; | |
107 | - if (i == 0) { | |
108 | - Em_App_startResSend(); | |
109 | - } | |
110 | - else { | |
111 | - Em_App_sendIndicator(i - 1); | |
112 | - } | |
113 | - break; | |
114 | - } | |
115 | - } | |
116 | - } | |
117 | - Em_Hal_unlock(key); | |
118 | -} | |
119 | - | |
120 | -void Em_Message_restart(void) { | |
121 | - Em_App_START(); | |
122 | -} | |
123 | - | |
124 | -void Em_App_ACCEPT(bool enable) { | |
125 | - if (Em_App_state == Em_App_CONNECTED) { | |
126 | - return; | |
127 | - } | |
128 | - Em_App_ind.sot = 0; | |
129 | - Em_App_ind.hdr.kind = Em_Message_ACCEPT; | |
130 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
131 | - Em_App_ind.hdr.resId = enable; | |
132 | - Em_App_startIndSend(); | |
133 | -} | |
134 | - | |
135 | -void Em_App_ACTIVATEPARAMETERS(uint8_t group) { | |
136 | - if (Em_App_state == Em_App_IDLE || Em_App_state == Em_App_STARTING) { | |
137 | - return; | |
138 | - } | |
139 | - Em_App_ind.sot = 0; | |
140 | - Em_App_ind.hdr.kind = Em_Message_ACTIVE_PARAMS; | |
141 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
142 | - Em_App_ind.hdr.resId = group; | |
143 | - Em_App_startIndSend(); | |
144 | -} | |
145 | - | |
146 | -void Em_App_BROADCASTOFF(void) { | |
147 | - Em_App_ind.sot = 0; | |
148 | - Em_App_ind.hdr.kind = Em_Message_INDICATOR; | |
149 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
150 | - Em_App_ind.hdr.resId = 0; | |
151 | - Em_App_startIndSend(); | |
152 | -} | |
153 | - | |
154 | -void Em_App_DISCONNECT(void) { | |
155 | - if (Em_App_state != Em_App_CONNECTED) { | |
156 | - return; | |
157 | - } | |
158 | - Em_App_state = Em_App_DISCONNECTED; | |
159 | - Em_App_ind.sot = 0; | |
160 | - Em_App_ind.hdr.kind = Em_Message_DISCONNECT; | |
161 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
162 | - Em_App_ind.hdr.resId = 0; | |
163 | - Em_App_startIndSend(); | |
164 | -} | |
165 | - | |
166 | -void Em_Message_dispatch(void) { | |
167 | - if (Em_App_state == Em_App_IDLE) { | |
168 | - return; | |
169 | - } | |
170 | - switch (Em_App_msg.hdr.kind) { | |
171 | - case Em_Message_CONNECT: | |
172 | - Em_App_state = Em_App_CONNECTED; | |
173 | - Em_App_CONNECTHANDLER(); | |
174 | - break; | |
175 | - case Em_Message_DISCONNECT: | |
176 | - Em_App_state = Em_App_DISCONNECTED; | |
177 | - Em_App_DISCONNECTHANDLER(); | |
178 | - break; | |
179 | - case Em_Message_PAIRING_DONE: | |
180 | - if (Em_App_pdHdlr) { | |
181 | - (*Em_App_pdHdlr)(); | |
182 | - } | |
183 | - break; | |
184 | - case Em_Message_FETCH: | |
185 | - if (Em_App_msg.hdr.resId < 0x80) { | |
186 | - Em_App_fetchDispatch(); | |
187 | - } | |
188 | - else { | |
189 | - Em_App_sysFetchDispatch(); | |
190 | - } | |
191 | - break; | |
192 | - case Em_Message_STORE: | |
193 | - if (Em_App_msg.hdr.resId < 0x80) { | |
194 | - Em_App_storeDispatch(); | |
195 | - } | |
196 | - else { | |
197 | - Em_App_sysStoreDispatch(); | |
198 | - } | |
199 | - break; | |
200 | - } | |
201 | -} | |
202 | - | |
203 | -void Em_App_marshallToBuf() { | |
204 | - char ch; | |
205 | - while ((ch = *Em_App_desc++)) { | |
206 | - switch (ch) { | |
207 | - case '0' : { | |
208 | - *Em_App_bufp++ = 0; | |
209 | - break; | |
210 | - } | |
211 | - case '1' : { | |
212 | - *Em_App_bufp++ = *Em_App_valp & 0xFF; | |
213 | - break; | |
214 | - } | |
215 | - case '2' : { | |
216 | - uint16_t v16 = *(uint16_t*)Em_App_valp; | |
217 | - *Em_App_bufp++ = v16 & 0xFF; | |
218 | - *Em_App_bufp++ = (v16 >> 8) & 0xFF; | |
219 | - break; | |
220 | - } | |
221 | - case '4' : { | |
222 | - if (((uint32_t)Em_App_valp & 0x1)) Em_App_valp++; | |
223 | - uint32_t v32 = *(uint32_t*)Em_App_valp++; | |
224 | - *Em_App_bufp++ = v32 & 0xFF; | |
225 | - *Em_App_bufp++ = (v32 >> 8) & 0xFF; | |
226 | - *Em_App_bufp++ = (v32 >> 16) & 0xFF; | |
227 | - *Em_App_bufp++ = (v32 >> 24) & 0xFF; | |
228 | - break; | |
229 | - } | |
230 | - } | |
231 | - Em_App_valp += 1; | |
232 | - } | |
233 | -} | |
234 | - | |
235 | -void Em_App_marshallToVal() { | |
236 | - char ch; | |
237 | - while ((ch = *Em_App_desc++)) { | |
238 | - switch (ch) { | |
239 | - case '0' : { | |
240 | - *Em_App_valp = 0; | |
241 | - Em_App_bufp += 1; | |
242 | - break; | |
243 | - } | |
244 | - case '1' : { | |
245 | - *Em_App_valp = *Em_App_bufp++ & 0xFF; | |
246 | - break; | |
247 | - } | |
248 | - case '2' : { | |
249 | - uint16_t v16 = *Em_App_bufp++ & 0xFF; | |
250 | - v16 |= (*Em_App_bufp++ << 8); | |
251 | - *(uint16_t*)Em_App_valp = v16; | |
252 | - break; | |
253 | - } | |
254 | - case '4' : { | |
255 | - if (((uint32_t)Em_App_valp & 0x1)) Em_App_valp++; | |
256 | - uint32_t v32 = (uint32_t)*Em_App_bufp++ & 0xFF; | |
257 | - v32 |= ((uint32_t)*Em_App_bufp++ << 8); | |
258 | - v32 |= ((uint32_t)*Em_App_bufp++ << 16); | |
259 | - v32 |= ((uint32_t)*Em_App_bufp++ << 24); | |
260 | - *(uint32_t*)Em_App_valp++ = v32; | |
261 | - break; | |
262 | - } | |
263 | - } | |
264 | - Em_App_valp += 1; | |
265 | - } | |
266 | -} | |
267 | - | |
268 | -void Em_App_PAIRINGOFF(void(*handler)(void)) { | |
269 | - Em_App_PAIRINGON(0, handler); | |
270 | -} | |
271 | - | |
272 | -void Em_App_PAIRINGON(uint8_t secs, void(*handler)(void)) { | |
273 | - if (Em_App_state != Em_App_DISCONNECTED) { | |
274 | - return; | |
275 | - } | |
276 | - Em_App_pdHdlr = handler; | |
277 | - Em_App_ind.sot = 0; | |
278 | - Em_App_ind.hdr.kind = Em_Message_PAIRING; | |
279 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
280 | - Em_App_ind.hdr.resId = secs; | |
281 | - Em_App_startIndSend(); | |
282 | -} | |
283 | - | |
284 | -void Em_App_RESET(void) { | |
285 | - Em_Hal_reset(); | |
286 | - _Em_Message_rxBuf = _Em_Message_txBuf = 0; | |
287 | - _Em_Message_rxCnt = _Em_Message_txCnt = 0; | |
288 | - Em_App_recvIdx = Em_App_recvSize = Em_App_xmitIdx = Em_App_xmitSize = 0; | |
289 | - Em_App_state = Em_App_IDLE; | |
290 | - Em_App_fileIndex = 0; | |
291 | - Em_App_xmitMask = 0; | |
292 | -} | |
293 | - | |
294 | -void Em_App_SETDEVICENAME(const char* name) { | |
295 | - Em_App_devName = name; | |
296 | -} | |
297 | - | |
298 | -void Em_App_START(void) { | |
299 | - Em_App_RESET(); | |
300 | - Em_App_state = Em_App_STARTING; | |
301 | -} | |
302 | - | |
303 | -void Em_App_sendResponse(Em_Message_Kind kind, Em_Message_Size size) { | |
304 | - if (Em_App_state != Em_App_IDLE) { | |
305 | - Em_App_msg.sot = 0; | |
306 | - Em_App_msg.hdr.kind = kind; | |
307 | - Em_App_msg.hdr.size = size + sizeof (Em_Message_Header); | |
308 | - if (Em_App_xmitReady(0)) { | |
309 | - Em_App_startResSend(); | |
310 | - } | |
311 | - } | |
312 | -} | |
313 | - | |
314 | -void Em_App_startIndSend(void) { | |
315 | - Em_App_outBuf = (uint8_t*)&Em_App_ind.sot; | |
316 | - Em_App_xmitSize = Em_App_ind.hdr.size + 1; | |
317 | - Em_App_xmitIdx = 0; | |
318 | - Em_Hal_startSend(); | |
319 | -} | |
320 | - | |
321 | -void Em_App_startResSend(void) { | |
322 | - Em_App_outBuf = (uint8_t*)&Em_App_msg.sot; | |
323 | - Em_App_xmitSize = Em_App_msg.hdr.size + 1; | |
324 | - Em_App_xmitIdx = 0; | |
325 | - Em_Hal_startSend(); | |
326 | -} | |
327 | - | |
328 | -void Em_App_sysFetchDispatch(void) { | |
329 | - uint8_t size = 0; | |
330 | - int i, j; | |
331 | - switch (Em_App_msg.hdr.resId) { | |
332 | - case Em_Message_SYS_SCHEMA_HASH: | |
333 | - for (i = 0; i < sizeof (Em_App_hash); i++) { | |
334 | - Em_App_msg.data[i] = Em_App_hash[i]; | |
335 | - } | |
336 | - Em_App_msg.data[sizeof (Em_App_hash)] = *((uint8_t*)&Em_App_endian); | |
337 | - size = sizeof (Em_App_hash) + 1; | |
338 | - break; | |
339 | - case Em_Message_SYS_MCM_NAME: | |
340 | - if (Em_App_devName) { | |
341 | - for (i = 0; i < Em_App_DEVNAME_LEN; i++) { | |
342 | - if ((Em_App_msg.data[i] = Em_App_devName[i]) == 0) { | |
343 | - break; | |
344 | - } | |
345 | - } | |
346 | - for (j = i; j < Em_App_DEVNAME_LEN; j++) { | |
347 | - Em_App_msg.data[j] = 0; | |
348 | - } | |
349 | - size = Em_App_DEVNAME_LEN; | |
350 | - } | |
351 | - break; | |
352 | - case Em_Message_SYS_EAP_PROTOCOL_LEVEL: | |
353 | - *((Em_Message_protocolLevel_t*)Em_App_msg.data) = Em_Message_protocolLevel; | |
354 | - size = sizeof (Em_Message_protocolLevel_t); | |
355 | - break; | |
356 | - case Em_Message_SYS_EAP_BUILD_DATE: | |
357 | - for (i = 0; i < sizeof (Em_App_build); i++) { | |
358 | - Em_App_msg.data[i] = Em_App_build[i]; | |
359 | - } | |
360 | - size = sizeof (Em_App_build); | |
361 | - break; | |
362 | - case Em_Message_SYS_RESOURCE_COUNT: | |
363 | - Em_App_msg.data[0] = Em_App_APP_RESOURCE_COUNT; | |
364 | - Em_App_msg.data[1] = Em_App_SYS_RESOURCE_COUNT; | |
365 | - size = 2; | |
366 | - break; | |
367 | - } | |
368 | - Em_App_sendResponse(Em_Message_FETCH_DONE, size); | |
369 | -} | |
370 | - | |
371 | -void Em_App_sysStoreDispatch(void) { | |
372 | - switch (Em_App_msg.hdr.resId) { | |
373 | - case Em_Message_SYS_FILE_INDEX_RESET: | |
374 | - Em_App_fileIndex = 0; | |
375 | - break; | |
376 | - } | |
377 | - Em_App_sendResponse(Em_Message_STORE_DONE, 0); | |
378 | -} | |
379 | - | |
380 | -bool Em_App_xmitReady(Em_Message_ResId indId) { | |
381 | - uint8_t key = Em_Hal_lock(); | |
382 | - bool res = _Em_Message_txBuf == 0 && Em_App_xmitMask == 0; | |
383 | - if (!res) { | |
384 | - Em_App_xmitMask |= (1 << indId); | |
385 | - } | |
386 | - Em_Hal_unlock(key); | |
387 | - return res; | |
388 | -} | |
389 | - | |
390 | -/* END common code */ | |
391 | - | |
392 | -void Em_App_fetchDispatch(void) { | |
393 | - uint8_t size = 0; | |
394 | - switch (Em_App_msg.hdr.resId) { | |
395 | - case 0: { | |
396 | - break; | |
397 | - } | |
398 | - case 2: { | |
399 | -#ifdef Em_16BIT | |
400 | - Blinker_count_t val; | |
401 | - Em_App_valp = (uint8_t*)&val; | |
402 | - Em_App_bufp = Em_App_msg.data; | |
403 | - Em_App_desc = "2"; | |
404 | - Blinker_count_fetch(&val); | |
405 | - Em_App_marshallToBuf(); | |
406 | -#else | |
407 | - Blinker_count_fetch((void*)Em_App_msg.data); | |
408 | -#endif | |
409 | - size = 2; | |
410 | - break; | |
411 | - } | |
412 | - case 3: { | |
413 | -#ifdef Em_16BIT | |
414 | - Blinker_delay_t val; | |
415 | - Em_App_valp = (uint8_t*)&val; | |
416 | - Em_App_bufp = Em_App_msg.data; | |
417 | - Em_App_desc = "2"; | |
418 | - Blinker_delay_fetch(&val); | |
419 | - Em_App_marshallToBuf(); | |
420 | -#else | |
421 | - Blinker_delay_fetch((void*)Em_App_msg.data); | |
422 | -#endif | |
423 | - size = 2; | |
424 | - break; | |
425 | - } | |
426 | - case 4: { | |
427 | -#ifdef Em_16BIT | |
428 | - Blinker_ledState_t val; | |
429 | - Em_App_valp = (uint8_t*)&val; | |
430 | - Em_App_bufp = Em_App_msg.data; | |
431 | - Em_App_desc = "1"; | |
432 | - Blinker_ledState_fetch(&val); | |
433 | - Em_App_marshallToBuf(); | |
434 | -#else | |
435 | - Blinker_ledState_fetch((void*)Em_App_msg.data); | |
436 | -#endif | |
437 | - size = 1; | |
438 | - break; | |
439 | - } | |
440 | - } | |
441 | - Em_App_sendResponse(Em_Message_FETCH_DONE, size); | |
442 | -} | |
443 | - | |
444 | -void Em_App_storeDispatch(void) { | |
445 | - switch (Em_App_msg.hdr.resId) { | |
446 | - case 0: { | |
447 | - break; | |
448 | - } | |
449 | - case 1: { | |
450 | -#ifdef Em_16BIT | |
451 | - Blinker_cmd_t val; | |
452 | - Em_App_valp = (uint8_t*)&val; | |
453 | - Em_App_bufp = Em_App_msg.data; | |
454 | - Em_App_desc = "1"; | |
455 | - Em_App_marshallToVal(); | |
456 | - Blinker_cmd_store(&val); | |
457 | -#else | |
458 | - Blinker_cmd_store((void*)Em_App_msg.data); | |
459 | -#endif | |
460 | - break; | |
461 | - } | |
462 | - case 2: { | |
463 | -#ifdef Em_16BIT | |
464 | - Blinker_count_t val; | |
465 | - Em_App_valp = (uint8_t*)&val; | |
466 | - Em_App_bufp = Em_App_msg.data; | |
467 | - Em_App_desc = "2"; | |
468 | - Em_App_marshallToVal(); | |
469 | - Blinker_count_store(&val); | |
470 | -#else | |
471 | - Blinker_count_store((void*)Em_App_msg.data); | |
472 | -#endif | |
473 | - break; | |
474 | - } | |
475 | - case 3: { | |
476 | -#ifdef Em_16BIT | |
477 | - Blinker_delay_t val; | |
478 | - Em_App_valp = (uint8_t*)&val; | |
479 | - Em_App_bufp = Em_App_msg.data; | |
480 | - Em_App_desc = "2"; | |
481 | - Em_App_marshallToVal(); | |
482 | - Blinker_delay_store(&val); | |
483 | -#else | |
484 | - Blinker_delay_store((void*)Em_App_msg.data); | |
485 | -#endif | |
486 | - break; | |
487 | - } | |
488 | - } | |
489 | - Em_App_sendResponse(Em_Message_STORE_DONE, 0); | |
490 | -} | |
491 | - | |
492 | -void Em_App_sendIndicator(Em_Message_ResId indId) { | |
493 | - Em_Message_Size resId = 0; | |
494 | - Em_Message_Size size = 0; | |
495 | - switch (indId) { | |
496 | - case 1: { | |
497 | -#ifdef Em_16BIT | |
498 | - Blinker_ledState_t val; | |
499 | - Em_App_valp = (uint8_t*)&val; | |
500 | - Em_App_bufp = Em_App_ind.data; | |
501 | - Em_App_desc = "1"; | |
502 | - Blinker_ledState_fetch(&val); | |
503 | - Em_App_marshallToBuf(); | |
504 | -#else | |
505 | - Blinker_ledState_fetch((Blinker_ledState_t*)&Em_App_ind.data); | |
506 | -#endif | |
507 | - resId = 4; | |
508 | - size = 1; | |
509 | - break; | |
510 | - } | |
511 | - } | |
512 | - Em_App_ind.sot = 0; | |
513 | - Em_App_ind.hdr.kind = Em_Message_INDICATOR; | |
514 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header) + size; | |
515 | - Em_App_ind.hdr.resId = resId; | |
516 | - Em_App_startIndSend(); | |
517 | -} | |
518 | - | |
519 | -void Blinker_ledState_indicate(void) { | |
520 | - if (Em_App_state == Em_App_CONNECTED && Em_App_xmitReady(1 + 1)) Em_App_sendIndicator(1); | |
521 | -} | |
522 | - | |
523 | -#ifdef __cplusplus | |
524 | -} | |
525 | -#endif | |
526 | - |
BlinkerSchema/Em/Blinker.h deleted
1 | -/**** DO NOT EDIT -- this file has been automatically generated from @emmoco.com.Blinker on 2014-05-14T16:24:37T ****/ | |
2 | -/**** protocolLevel = 13, toolsVersion = 13.4.1.201311121909 ****/ | |
3 | - | |
4 | -#ifndef Blinker__H | |
5 | -#define Blinker__H | |
6 | - | |
7 | -#include "Em_Types.h" | |
8 | -#include "Em_Message.h" | |
9 | - | |
10 | -#ifdef __cplusplus | |
11 | -extern "C" { | |
12 | -#endif | |
13 | - | |
14 | -/* -------- connection callback functions implemented by the application -------- */ | |
15 | - | |
16 | -void Blinker_connectHandler(void); | |
17 | -void Blinker_disconnectHandler(void); | |
18 | - | |
19 | -/* -------- resource types defined in the schema -------- */ | |
20 | - | |
21 | -/* enum Cmd */ | |
22 | -typedef uint8_t Blinker_Cmd; | |
23 | -#define Blinker_START_CMD 0 | |
24 | -#define Blinker_STOP_CMD 1 | |
25 | - | |
26 | -/* enum LedState */ | |
27 | -typedef uint8_t Blinker_LedState; | |
28 | -#define Blinker_LED_OFF 0 | |
29 | -#define Blinker_LED_ON 1 | |
30 | - | |
31 | -/* -------- resource callback functions implemented by the application -------- */ | |
32 | - | |
33 | -/* resource cmd */ | |
34 | -typedef Blinker_Cmd Blinker_cmd_t; | |
35 | -extern void Blinker_cmd_store(Blinker_cmd_t* input); | |
36 | - | |
37 | -/* resource count */ | |
38 | -typedef int16_t Blinker_count_t; | |
39 | -extern void Blinker_count_fetch(Blinker_count_t* output); | |
40 | -extern void Blinker_count_store(Blinker_count_t* input); | |
41 | - | |
42 | -/* resource delay */ | |
43 | -typedef uint16_t Blinker_delay_t; | |
44 | -#define Blinker_delay_min 500 | |
45 | -#define Blinker_delay_max 2000 | |
46 | -#define Blinker_delay_step 100 | |
47 | -#define Blinker_delay_scale 1000 | |
48 | -extern void Blinker_delay_fetch(Blinker_delay_t* output); | |
49 | -extern void Blinker_delay_store(Blinker_delay_t* input); | |
50 | - | |
51 | -/* resource ledState */ | |
52 | -typedef Blinker_LedState Blinker_ledState_t; | |
53 | -extern void Blinker_ledState_fetch(Blinker_ledState_t* output); | |
54 | -extern void Blinker_ledState_indicate(void); /* called by the application */ | |
55 | - | |
56 | -/* -------- application functions implemented in Blinker.c -------- */ | |
57 | - | |
58 | -void Blinker_accept(bool enable); | |
59 | -void Blinker_activateParameters(uint8_t group); | |
60 | -void Blinker_broadcastOff(void); | |
61 | -void Blinker_disconnect(void); | |
62 | -void Blinker_pairingOn(uint8_t secs, void(*handler)(void)); | |
63 | -void Blinker_pairingOff(void(*handler)(void)); | |
64 | -void Blinker_reset(void); | |
65 | -void Blinker_setDeviceName(const char* name); | |
66 | -void Blinker_start(void); | |
67 | - | |
68 | -#ifdef __cplusplus | |
69 | -} | |
70 | -#endif | |
71 | - | |
72 | -#endif /* Blinker__H */ |
BlinkerSchema/Em/Em_Message.h deleted
1 | -#ifndef Em_Message_H_ | |
2 | -#define Em_Message_H_ | |
3 | - | |
4 | -#include "Em_Types.h" | |
5 | - | |
6 | -#ifdef __cplusplus | |
7 | -extern "C" { | |
8 | -#endif | |
9 | - | |
10 | -/* -------- SRT FUNCTIONS CALLED BY HAL -------- */ | |
11 | - | |
12 | -static inline bool Em_Message_addByte(uint8_t b); | |
13 | -extern void Em_Message_dispatch(void); | |
14 | -static inline bool Em_Message_getByte(uint8_t* bp); | |
15 | -extern void Em_Message_restart(void); | |
16 | -static inline bool Em_Message_startRx(void); | |
17 | -static inline uint8_t Em_Message_startTx(void); | |
18 | - | |
19 | - | |
20 | -/* -------- HAL FUNCTIONS CALLED BY SRT -------- */ | |
21 | - | |
22 | -extern uint8_t Em_Hal_lock(void); | |
23 | -extern void Em_Hal_reset(void); | |
24 | -extern void Em_Hal_startSend(void); | |
25 | -extern void Em_Hal_unlock(uint8_t key); | |
26 | -extern void Em_Hal_watchOff(void); | |
27 | -extern void Em_Hal_watchOn(void); | |
28 | - | |
29 | - | |
30 | -/* -------- MESSAGE FORMAT -------- */ | |
31 | - | |
32 | -/* protocolLevel #4 */ | |
33 | -#define Em_Message_INDSIZE 4 | |
34 | - | |
35 | -typedef uint8_t Em_Message_Size; | |
36 | -typedef uint8_t Em_Message_Kind; | |
37 | -/* protocolLevel #12 -- split 16-bit resId into <resId, chan> */ | |
38 | -typedef uint8_t Em_Message_ResId; | |
39 | -typedef uint8_t Em_Message_Chan; | |
40 | - | |
41 | -#define Em_Message_NOP 0 | |
42 | -#define Em_Message_FETCH 1 | |
43 | -#define Em_Message_FETCH_DONE 2 | |
44 | -#define Em_Message_STORE 3 | |
45 | -#define Em_Message_STORE_DONE 4 | |
46 | -#define Em_Message_INDICATOR 5 | |
47 | -#define Em_Message_CONNECT 6 | |
48 | -#define Em_Message_DISCONNECT 7 | |
49 | -#define Em_Message_ECHO 8 | |
50 | -/* protocolLevel #3 */ | |
51 | -/* protocolLevel #6 -- rename from BROADCAST to PAIRING */ | |
52 | -#define Em_Message_PAIRING 9 | |
53 | -#define Em_Message_PAIRING_DONE 10 | |
54 | -/* protocolLevel #7 */ | |
55 | -#define Em_Message_OFFLINE 11 | |
56 | -/* protocolLevel #8 */ | |
57 | -#define Em_Message_ACCEPT 12 | |
58 | -/* protocolLevel #13 */ | |
59 | -#define Em_Message_START 13 | |
60 | -#define Em_Message_ACTIVE_PARAMS 14 | |
61 | - | |
62 | -typedef struct Em_Message_Header { | |
63 | - Em_Message_Size size; | |
64 | - Em_Message_Kind kind; | |
65 | - Em_Message_ResId resId; | |
66 | - Em_Message_Chan chan; | |
67 | -} Em_Message_Header; | |
68 | - | |
69 | -typedef uint16_t Em_Message_protocolLevel_t; | |
70 | - | |
71 | -/* protocolLevel #1 */ | |
72 | - | |
73 | -/* protocolLevel #10 */ | |
74 | -/* #define Em_Message_SYS_SCHEMA_UUID 0xFF */ | |
75 | - | |
76 | -#define Em_Message_SYS_MCM_PROTOCOL_LEVEL 0xFE | |
77 | -#define Em_Message_SYS_EAP_PROTOCOL_LEVEL 0xFD | |
78 | -#define Em_Message_SYS_EAP_BUILD_DATE 0xFC | |
79 | - | |
80 | -/* protocolLevel #2 */ | |
81 | -#define Em_Message_SYS_FILE_INDEX_RESET 0xFB | |
82 | - | |
83 | -/* protocolLevel #5 */ | |
84 | -#define Em_Message_SYS_SCHEMA_HASH 0xFA | |
85 | - | |
86 | -/* protocolLevel #7 */ | |
87 | -#define Em_Message_SYS_RESOURCE_COUNT 0xF9 | |
88 | - | |
89 | -/* protocolLevel #9 */ | |
90 | -#define Em_Message_SYS_MOBILE_RSSI 0xF8 | |
91 | - | |
92 | -/* protocolLevel #11 */ | |
93 | -#define Em_Message_SYS_MCM_DISCONNECT 0xF7 | |
94 | - | |
95 | -/* protocolLevel #13a */ | |
96 | -#define Em_Message_SYS_MCM_NAME 0xF5 | |
97 | - | |
98 | - | |
99 | -/* -------- PRIVATE -------- */ | |
100 | - | |
101 | -extern void Em_Message_nextXmit(void); | |
102 | - | |
103 | -extern uint8_t* Em_App_inBuf; | |
104 | -extern uint8_t* Em_App_outBuf; | |
105 | -extern Em_Message_Size Em_App_xmitSize; | |
106 | - | |
107 | -extern uint8_t* _Em_Message_rxBuf; | |
108 | -extern uint8_t _Em_Message_rxCnt; | |
109 | - | |
110 | -extern uint8_t* _Em_Message_txBuf; | |
111 | -extern uint8_t _Em_Message_txCnt; | |
112 | - | |
113 | -static inline bool Em_Message_addByte(uint8_t b) { | |
114 | - if (_Em_Message_rxCnt == 0) { | |
115 | - if (b == 0) { | |
116 | - return false; | |
117 | - } | |
118 | - _Em_Message_rxCnt = b; | |
119 | - } | |
120 | - *_Em_Message_rxBuf++ = b; | |
121 | - if (--_Em_Message_rxCnt == 0) { | |
122 | - _Em_Message_rxBuf = 0; | |
123 | - if (_Em_Message_txBuf == 0) { | |
124 | - Em_Hal_watchOff(); | |
125 | - } | |
126 | - return true; | |
127 | - } | |
128 | - else { | |
129 | - return false; | |
130 | - } | |
131 | -} | |
132 | - | |
133 | -static inline bool Em_Message_getByte(uint8_t* bp) { | |
134 | - if (_Em_Message_txBuf == 0) { | |
135 | - return false; | |
136 | - } | |
137 | - if (_Em_Message_txCnt == 0) { | |
138 | - _Em_Message_txCnt = *_Em_Message_txBuf + 1; | |
139 | - } | |
140 | - if (--_Em_Message_txCnt > 0) { | |
141 | - *bp = *_Em_Message_txBuf++; | |
142 | - return true; | |
143 | - } | |
144 | - else { | |
145 | - _Em_Message_txBuf = 0; | |
146 | - Em_App_xmitSize = 0; | |
147 | - Em_Message_nextXmit(); | |
148 | - if (_Em_Message_rxBuf == 0) { | |
149 | - Em_Hal_watchOff(); | |
150 | - } | |
151 | - return false; | |
152 | - } | |
153 | -} | |
154 | - | |
155 | -static inline bool Em_Message_startRx(void) { | |
156 | - if (_Em_Message_rxBuf == 0) { | |
157 | - _Em_Message_rxBuf = Em_App_inBuf; | |
158 | - if (_Em_Message_txBuf == 0) { | |
159 | - Em_Hal_watchOn(); | |
160 | - } | |
161 | - return true; | |
162 | - } | |
163 | - else { | |
164 | - return false; | |
165 | - } | |
166 | -} | |
167 | - | |
168 | -static inline uint8_t Em_Message_startTx(void) { | |
169 | - _Em_Message_txBuf = Em_App_outBuf + 1; | |
170 | - _Em_Message_txCnt = 0; | |
171 | - if (_Em_Message_rxBuf == 0) { | |
172 | - Em_Hal_watchOn(); | |
173 | - } | |
174 | - return 0; | |
175 | -} | |
176 | - | |
177 | - | |
178 | -#ifdef __cplusplus | |
179 | -} | |
180 | -#endif | |
181 | - | |
182 | -#endif /*Em_Message_H_*/ |
BlinkerSchema/Em/Em_Types.h deleted
1 | -#ifndef Em_Types_H_ | |
2 | -#define Em_Types_H_ | |
3 | - | |
4 | -#ifndef Em_NOSTDBOOL | |
5 | -#include <stdbool.h> | |
6 | -#endif | |
7 | - | |
8 | -#ifndef Em_NOSTDINT | |
9 | -#include <stdint.h> | |
10 | -#endif | |
11 | - | |
12 | -#ifdef Em_16BIT | |
13 | -typedef signed char int8_t; | |
14 | -typedef unsigned char uint8_t; | |
15 | -#endif | |
16 | - | |
17 | -#endif /*Em_Types_H_*/ |
BlinkerSchema/Em/blinker.json deleted
1 | -{ | |
2 | - "resources": { | |
3 | - "$eapProtocolLevel": { | |
4 | - "id": -3, | |
5 | - "align": 2, | |
6 | - "attributes": {"readonly": true}, | |
7 | - "type": "u2", | |
8 | - "access": "r", | |
9 | - "size": 2 | |
10 | - }, | |
11 | - "count": { | |
12 | - "id": 2, | |
13 | - "align": 2, | |
14 | - "attributes": {"readwrite": true}, | |
15 | - "type": "i2", | |
16 | - "access": "rw", | |
17 | - "size": 2 | |
18 | - }, | |
19 | - "$activeGroup": { | |
20 | - "id": -10, | |
21 | - "align": 1, | |
22 | - "pack": 1, | |
23 | - "attributes": {"readwrite": true}, | |
24 | - "type": "E:system@emmoco.com.System/ParameterGroup", | |
25 | - "access": "rw", | |
26 | - "size": 1 | |
27 | - }, | |
28 | - "$mcmDisconnect": { | |
29 | - "id": -9, | |
30 | - "align": 1, | |
31 | - "attributes": {"writeonly": true}, | |
32 | - "type": "u1", | |
33 | - "access": "w", | |
34 | - "size": 1 | |
35 | - }, | |
36 | - "$eapBuildDate": { | |
37 | - "dim": 8, | |
38 | - "id": -4, | |
39 | - "align": 1, | |
40 | - "attributes": {"readonly": true}, | |
41 | - "type": "A8:u1", | |
42 | - "access": "r", | |
43 | - "size": 8 | |
44 | - }, | |
45 | - "ledState": { | |
46 | - "id": 4, | |
47 | - "align": 1, | |
48 | - "pack": 1, | |
49 | - "attributes": { | |
50 | - "indicator": true, | |
51 | - "readonly": true | |
52 | - }, | |
53 | - "type": "E:@emmoco.com.Blinker/LedState", | |
54 | - "access": "ir", | |
55 | - "size": 1 | |
56 | - }, | |
57 | - "$resourceCount": { | |
58 | - "id": -7, | |
59 | - "align": 1, | |
60 | - "attributes": {"readonly": true}, | |
61 | - "type": "S:system@emmoco.com.System/ResourceCount", | |
62 | - "access": "r", | |
63 | - "size": 2 | |
64 | - }, | |
65 | - "$schemaHash": { | |
66 | - "dim": 20, | |
67 | - "id": -6, | |
68 | - "align": 1, | |
69 | - "attributes": {"readonly": true}, | |
70 | - "type": "A20:u1", | |
71 | - "access": "r", | |
72 | - "size": 20 | |
73 | - }, | |
74 | - "cmd": { | |
75 | - "id": 1, | |
76 | - "align": 1, | |
77 | - "pack": 1, | |
78 | - "attributes": {"writeonly": true}, | |
79 | - "type": "E:@emmoco.com.Blinker/Cmd", | |
80 | - "access": "w", | |
81 | - "size": 1 | |
82 | - }, | |
83 | - "$mcmProtocolLevel": { | |
84 | - "id": -2, | |
85 | - "align": 2, | |
86 | - "attributes": {"readonly": true}, | |
87 | - "type": "u2", | |
88 | - "access": "r", | |
89 | - "size": 2 | |
90 | - }, | |
91 | - "$mobileRssi": { | |
92 | - "id": -8, | |
93 | - "align": 1, | |
94 | - "attributes": {"readonly": true}, | |
95 | - "type": "i1", | |
96 | - "access": "r", | |
97 | - "size": 1 | |
98 | - }, | |
99 | - "delay": { | |
100 | - "id": 3, | |
101 | - "align": 2, | |
102 | - "pack": 4, | |
103 | - "attributes": {"readwrite": true}, | |
104 | - "type": "N:0.500000,2.000000,0.100000,3/u2/15", | |
105 | - "access": "rw", | |
106 | - "size": 2 | |
107 | - }, | |
108 | - "$fileIndexReset": { | |
109 | - "id": -5, | |
110 | - "align": 2, | |
111 | - "attributes": {"writeonly": true}, | |
112 | - "type": "i2", | |
113 | - "access": "w", | |
114 | - "size": 2 | |
115 | - } | |
116 | - }, | |
117 | - "resourceNamesSys": [ | |
118 | - "$activeGroup", | |
119 | - "$eapBuildDate", | |
120 | - "$eapProtocolLevel", | |
121 | - "$fileIndexReset", | |
122 | - "$mcmDisconnect", | |
123 | - "$mcmProtocolLevel", | |
124 | - "$mobileRssi", | |
125 | - "$resourceCount", | |
126 | - "$schemaHash" | |
127 | - ], | |
128 | - "manifest": { | |
129 | - "protocolLevel": 13, | |
130 | - "hash": [ | |
131 | - 252, | |
132 | - 123, | |
133 | - 209, | |
134 | - 86, | |
135 | - 230, | |
136 | - 104, | |
137 | - 211, | |
138 | - 8, | |
139 | - 40, | |
140 | - 191, | |
141 | - 19, | |
142 | - 28, | |
143 | - 180, | |
144 | - 183, | |
145 | - 223, | |
146 | - 192 | |
147 | - ], | |
148 | - "toolVersion": "13.4.1.201311121909", | |
149 | - "name": "Blinker", | |
150 | - "$$md5": "fc7bd156e668d30828bf131cb4b7dfc0", | |
151 | - "build": [ | |
152 | - 24, | |
153 | - 231, | |
154 | - 30, | |
155 | - 251, | |
156 | - 69, | |
157 | - 1, | |
158 | - 0, | |
159 | - 0 | |
160 | - ], | |
161 | - "date": "2014-05-14T16:24:37T", | |
162 | - "maxAlign": 2, | |
163 | - "maxSize": 20, | |
164 | - "version": "1.0.0" | |
165 | - }, | |
166 | - "resourceNames": [ | |
167 | - "cmd", | |
168 | - "count", | |
169 | - "delay", | |
170 | - "ledState", | |
171 | - "$mcmProtocolLevel", | |
172 | - "$eapProtocolLevel", | |
173 | - "$eapBuildDate", | |
174 | - "$fileIndexReset", | |
175 | - "$schemaHash", | |
176 | - "$resourceCount", | |
177 | - "$mobileRssi", | |
178 | - "$mcmDisconnect", | |
179 | - "$activeGroup" | |
180 | - ], | |
181 | - "attributes": { | |
182 | - "description": "Blinker, the hello world program for mobile control", | |
183 | - "version": "1.0.0" | |
184 | - }, | |
185 | - "resourceNamesApp": [ | |
186 | - "cmd", | |
187 | - "count", | |
188 | - "delay", | |
189 | - "ledState" | |
190 | - ], | |
191 | - "types": { | |
192 | - "@emmoco.com.Blinker/LedState": { | |
193 | - "values": [ | |
194 | - "LED_OFF", | |
195 | - "LED_ON" | |
196 | - ], | |
197 | - "align": 1, | |
198 | - "pack": 1, | |
199 | - "type": "E:@emmoco.com.Blinker/LedState", | |
200 | - "size": 1 | |
201 | - }, | |
202 | - "system@emmoco.com.System/ResourceCount": { | |
203 | - "packed": false, | |
204 | - "align": 1, | |
205 | - "type": "S:system@emmoco.com.System/ResourceCount", | |
206 | - "size": 2, | |
207 | - "fields": [ | |
208 | - { | |
209 | - "pad": 0, | |
210 | - "align": 1, | |
211 | - "name": "app", | |
212 | - "type": "u1", | |
213 | - "size": 1 | |
214 | - }, | |
215 | - { | |
216 | - "pad": 0, | |
217 | - "align": 1, | |
218 | - "name": "sys", | |
219 | - "type": "u1", | |
220 | - "size": 1 | |
221 | - } | |
222 | - ] | |
223 | - }, | |
224 | - "std:i2": { | |
225 | - "align": 2, | |
226 | - "size": 2 | |
227 | - }, | |
228 | - "std:i1": { | |
229 | - "align": 1, | |
230 | - "size": 1 | |
231 | - }, | |
232 | - "std:u1": { | |
233 | - "align": 1, | |
234 | - "size": 1 | |
235 | - }, | |
236 | - "system@emmoco.com.System/ParameterGroup": { | |
237 | - "values": [ | |
238 | - "GROUP_A", | |
239 | - "GROUP_B" | |
240 | - ], | |
241 | - "align": 1, | |
242 | - "pack": 1, | |
243 | - "type": "E:system@emmoco.com.System/ParameterGroup", | |
244 | - "size": 1 | |
245 | - }, | |
246 | - "@emmoco.com.Blinker/Cmd": { | |
247 | - "values": [ | |
248 | - "START_CMD", | |
249 | - "STOP_CMD" | |
250 | - ], | |
251 | - "align": 1, | |
252 | - "pack": 1, | |
253 | - "type": "E:@emmoco.com.Blinker/Cmd", | |
254 | - "size": 1 | |
255 | - }, | |
256 | - "std:u2": { | |
257 | - "align": 2, | |
258 | - "size": 2 | |
259 | - } | |
260 | - }, | |
261 | - "imports": {"@emmoco.com.Blinker": true} | |
262 | -} | |
263 | 0 | \ No newline at end of file |
BlinkerSchema/Schema-Imports/system@emmoco.com/System.ems deleted
1 | -owner = "system@emmoco.com" | |
2 | - | |
3 | -schema System { | |
4 | - | |
5 | - // protocolLevel #13 | |
6 | - | |
7 | - enum ParameterGroup { | |
8 | - GROUP_A, GROUP_B | |
9 | - } | |
10 | - | |
11 | - // protocolLevel #1 | |
12 | - | |
13 | - uint8 $schemaUuid[16] { // protocolLevel #10 -- invisible to applications | |
14 | - readonly | |
15 | - } | |
16 | - | |
17 | - uint16 $mcmProtocolLevel { | |
18 | - readonly | |
19 | - } | |
20 | - | |
21 | - uint16 $eapProtocolLevel { | |
22 | - readonly | |
23 | - } | |
24 | - | |
25 | - uint8 $eapBuildDate[8] { // protocolLevel #5 -- rename from $eapBuildNumber | |
26 | - readonly | |
27 | - } | |
28 | - | |
29 | - // protocolLevel #2 | |
30 | - | |
31 | - int16 $fileIndexReset { | |
32 | - writeonly | |
33 | - } | |
34 | - | |
35 | - // protocolLevel #5 | |
36 | - | |
37 | - // protocolLevel #12 -- increase size to 20 | |
38 | - | |
39 | - uint8 $schemaHash[20] { | |
40 | - readonly | |
41 | - } | |
42 | - | |
43 | - // protocolLevel #7 | |
44 | - | |
45 | - struct ResourceCount { | |
46 | - uint8 app | |
47 | - uint8 sys | |
48 | - } | |
49 | - | |
50 | - ResourceCount $resourceCount { | |
51 | - readonly | |
52 | - } | |
53 | - | |
54 | - // protocolLevel #9 | |
55 | - | |
56 | - int8 $mobileRssi { | |
57 | - readonly | |
58 | - } | |
59 | - | |
60 | - // protocolLevel #11 | |
61 | - | |
62 | - uint8 $mcmDisconnect { | |
63 | - writeonly | |
64 | - } | |
65 | - | |
66 | - // protocolLevel #13 | |
67 | - | |
68 | - ParameterGroup $activeGroup { | |
69 | - readwrite | |
70 | - } | |
71 | - | |
72 | -} |
BlinkerSchema/bundle.properties deleted
1 | -# generated file - do not edit | |
2 | - | |
3 | -bundle.requires = com.emmoco.schema.translator | |
4 | -com.emmoco.framework.Properties.applicationDirectory = Em | |
5 | -com.emmoco.framework.Properties.schemaDestinationDirectory = Em | |
6 | -com.emmoco.framework.Properties.serverAPIToken = | |
7 | -com.emmoco.framework.Properties.align16 = 2 | |
8 | -com.emmoco.framework.Properties.align32 = 4 | |
9 | -com.emmoco.framework.Properties.schemaFile = /Users/imanol/devel/durex/BlinkerSchema/schema.ems | |
10 | -com.emmoco.framework.Properties.toolVersion = 13.4.1.201311121909 |
BlinkerSchema/imports/system@emmoco.com/System.ems deleted
1 | -owner = "system@emmoco.com" | |
2 | - | |
3 | -schema System { | |
4 | - | |
5 | - // protocolLevel #1 | |
6 | - | |
7 | - uint8 $schemaUuid[16] { // protocolLevel #10 -- invisible to applications | |
8 | - readonly | |
9 | - } | |
10 | - | |
11 | - uint16 $mcmProtocolLevel { | |
12 | - readonly | |
13 | - } | |
14 | - | |
15 | - uint16 $eapProtocolLevel { | |
16 | - readonly | |
17 | - } | |
18 | - | |
19 | - uint8 $eapBuildDate[8] { // protocolLevel #5 -- rename from $eapBuildNumber | |
20 | - readonly | |
21 | - } | |
22 | - | |
23 | - // protocolLevel #2 | |
24 | - | |
25 | - int16 $fileIndexReset { | |
26 | - writeonly | |
27 | - } | |
28 | - | |
29 | - // protocolLevel #5 | |
30 | - | |
31 | - // protocolLevel #12 -- increase size to 20 | |
32 | - | |
33 | - uint8 $schemaHash[20] { | |
34 | - readonly | |
35 | - } | |
36 | - | |
37 | - // protocolLevel #7 | |
38 | - | |
39 | - struct ResourceCount { | |
40 | - uint8 app | |
41 | - uint8 sys | |
42 | - } | |
43 | - | |
44 | - ResourceCount $resourceCount { | |
45 | - readonly | |
46 | - } | |
47 | - | |
48 | - // protocolLevel #9 | |
49 | - | |
50 | - int8 $mobileRssi { | |
51 | - readonly | |
52 | - } | |
53 | - | |
54 | - // protocolLevel #11 | |
55 | - | |
56 | - uint8 $mcmDisconnect { | |
57 | - writeonly | |
58 | - } | |
59 | - | |
60 | -} |
BlinkerSchema/out/Blinker-TODO.c deleted
1 | -/**** DO NOT EDIT -- this file has been automatically generated from @emmoco.com.Blinker on 2014-05-10T00:12:31T ****/ | |
2 | -/**** protocolLevel = 12, toolsVersion = 12.0.0.201211010336 ****/ | |
3 | - | |
4 | -#include "Blinker.h" | |
5 | - | |
6 | -#ifdef Em_Blinker_TODO /* enables optional inclusion of empty functions */ | |
7 | - | |
8 | -/* Copy the function skeletons below into your own Blinker.c source file */ | |
9 | - | |
10 | -void Blinker_connectHandler(void) { | |
11 | - /* TODO: application is now connected */ | |
12 | -} | |
13 | - | |
14 | -void Blinker_disconnectHandler(void) { | |
15 | - /* TODO: application is now disconnected */ | |
16 | -} | |
17 | - | |
18 | -void Blinker_cmd_store(Blinker_cmd_t* const input) { | |
19 | - /* TODO: read resource 'cmd' from 'input' */ | |
20 | -} | |
21 | - | |
22 | -void Blinker_count_fetch(Blinker_count_t* const output) { | |
23 | - /* TODO: write resource 'count' into 'output' */ | |
24 | -} | |
25 | - | |
26 | -void Blinker_count_store(Blinker_count_t* const input) { | |
27 | - /* TODO: read resource 'count' from 'input' */ | |
28 | -} | |
29 | - | |
30 | -void Blinker_delay_fetch(Blinker_delay_t* const output) { | |
31 | - /* TODO: write resource 'delay' into 'output' */ | |
32 | -} | |
33 | - | |
34 | -void Blinker_delay_store(Blinker_delay_t* const input) { | |
35 | - /* TODO: read resource 'delay' from 'input' */ | |
36 | -} | |
37 | - | |
38 | -void Blinker_ledState_fetch(Blinker_ledState_t* const output) { | |
39 | - /* TODO: write resource 'ledState' into 'output' */ | |
40 | -} | |
41 | - | |
42 | -#endif /* dummy file */ |
BlinkerSchema/out/Blinker.c deleted
1 | -/**** DO NOT EDIT -- this file has been automatically generated from @emmoco.com.Blinker on 2014-05-10T00:12:31T ****/ | |
2 | -/**** protocolLevel = 12, toolsVersion = 12.0.0.201211010336 ****/ | |
3 | - | |
4 | -#include "Em_Message.h" | |
5 | -#include "Blinker.h" | |
6 | - | |
7 | -#ifdef __cplusplus | |
8 | -extern "C" { | |
9 | -#endif | |
10 | - | |
11 | -#define Em_Message_protocolLevel 12 | |
12 | - | |
13 | -typedef struct Em_App_Message { | |
14 | - uint8_t dummy; | |
15 | - uint8_t sot; | |
16 | - Em_Message_Header hdr; | |
17 | - uint8_t data[20]; | |
18 | -} Em_App_Message; | |
19 | - | |
20 | -const uint8_t Em_App_hash[] = {194, 8, 191, 173, 237, 198, 193, 165, 88, 202, 74, 246, 70, 59, 102, 128, 12, 0, ((sizeof(struct{uint8_t f1; uint16_t f2;}) - sizeof(uint16_t)) << 4) | (sizeof(struct{uint8_t f1; uint32_t f2;}) - sizeof(uint32_t))}; | |
21 | - | |
22 | -const uint8_t Em_App_build[] = {70, 123, 11, 227, 69, 1, 0, 0}; | |
23 | - | |
24 | -#define Em_App_APP_RESOURCE_COUNT 4 | |
25 | -#define Em_App_SYS_RESOURCE_COUNT 8 | |
26 | - | |
27 | -#define Em_App_ACCEPT Blinker_accept | |
28 | -#define Em_App_DISCONNECT Blinker_disconnect | |
29 | -#define Em_App_PAIRINGON Blinker_pairingOn | |
30 | -#define Em_App_PAIRINGOFF Blinker_pairingOff | |
31 | -#define Em_App_RESET Blinker_reset | |
32 | -#define Em_App_RUN Blinker_run | |
33 | - | |
34 | -#define Em_App_CONNECTHANDLER Blinker_connectHandler | |
35 | -#define Em_App_DISCONNECTHANDLER Blinker_disconnectHandler | |
36 | - | |
37 | -#define Em_App_MAX_INDICATOR 2 | |
38 | - | |
39 | -enum {Em_App_IDLE, Em_App_DISCONNECTED, Em_App_CONNECTED}; | |
40 | - | |
41 | -typedef struct Em_App_Indicator { | |
42 | - uint8_t dummy; | |
43 | - uint8_t sot; | |
44 | - Em_Message_Header hdr; | |
45 | - uint8_t data[Em_Message_INDSIZE]; | |
46 | -} Em_App_Indicator; | |
47 | - | |
48 | -void (*Em_App_pdHdlr)(void); | |
49 | - | |
50 | -const uint16_t Em_App_endian = 0x0100; | |
51 | - | |
52 | -Em_Message_Size Em_App_recvIdx; | |
53 | -Em_Message_Size Em_App_recvSize; | |
54 | -Em_Message_Size Em_App_xmitIdx; | |
55 | -Em_Message_Size Em_App_xmitSize; | |
56 | - | |
57 | -uint8_t Em_App_state = Em_App_IDLE; | |
58 | -Em_App_Message Em_App_msg; | |
59 | -Em_App_Indicator Em_App_ind; | |
60 | -bool Em_App_moreData = false; | |
61 | -bool Em_App_readIdle = true; | |
62 | -int32_t Em_App_fileIndex; | |
63 | -uint32_t Em_App_xmitMask; | |
64 | - | |
65 | -uint8_t* Em_App_inBuf = (uint8_t*)&Em_App_msg.hdr; | |
66 | -uint8_t* Em_App_outBuf; | |
67 | - | |
68 | -void Em_App_fetchDispatch(void); | |
69 | -void Em_App_storeDispatch(void); | |
70 | -void Em_App_sendIndicator(Em_Message_ResId indId); | |
71 | -void Em_App_sendResponse(Em_Message_Kind kind, Em_Message_Size size); | |
72 | -void Em_App_startIndSend(void); | |
73 | -void Em_App_startResSend(void); | |
74 | -void Em_App_sysFetchDispatch(void); | |
75 | -void Em_App_sysStoreDispatch(void); | |
76 | -bool Em_App_xmitReady(Em_Message_ResId indId); | |
77 | - | |
78 | -bool Em_Message_addByte(uint8_t b) { | |
79 | - if (Em_App_readIdle && b) { | |
80 | - Em_App_recvSize = Em_App_inBuf[0] = b; | |
81 | - Em_App_recvIdx = 1; | |
82 | - Em_App_readIdle = false; | |
83 | - return false; | |
84 | - } | |
85 | - Em_App_inBuf[Em_App_recvIdx++] = b; | |
86 | - if (Em_App_recvIdx < Em_App_recvSize) { | |
87 | - return false; | |
88 | - } | |
89 | - Em_App_readIdle = true; | |
90 | - return true; | |
91 | -} | |
92 | - | |
93 | -bool Em_Message_getByte(uint8_t* bp) { | |
94 | - uint8_t key = Em_Message_lock(); | |
95 | - Em_App_moreData = (Em_App_xmitSize != 0); | |
96 | - if (!Em_App_moreData && (Em_App_xmitMask != 0)) { | |
97 | - uint8_t i; | |
98 | - uint32_t m; | |
99 | - for (i = 0, m = 0x1; i < Em_App_MAX_INDICATOR; i++, m <<= 1) { | |
100 | - if (Em_App_xmitMask & m) { | |
101 | - Em_App_xmitMask &= ~m; | |
102 | - if (i == 0) { | |
103 | - Em_App_startResSend(); | |
104 | - } | |
105 | - else { | |
106 | - Em_App_sendIndicator(i); | |
107 | - } | |
108 | - break; | |
109 | - } | |
110 | - } | |
111 | - Em_Message_unlock(key); | |
112 | - return false; | |
113 | - } | |
114 | - else if (Em_App_moreData) { | |
115 | - *bp = Em_App_outBuf[Em_App_xmitIdx++]; | |
116 | - Em_App_xmitSize -= 1; | |
117 | - } | |
118 | - Em_Message_unlock(key); | |
119 | - return Em_App_moreData; | |
120 | -} | |
121 | - | |
122 | -void Em_App_ACCEPT(bool enable) { | |
123 | - if (Em_App_state == Em_App_CONNECTED) { | |
124 | - return; | |
125 | - } | |
126 | - Em_App_ind.sot = 0; | |
127 | - Em_App_ind.hdr.kind = Em_Message_ACCEPT; | |
128 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
129 | - Em_App_ind.hdr.resId = enable; | |
130 | - Em_App_startIndSend(); | |
131 | -} | |
132 | - | |
133 | -void Em_App_DISCONNECT(void) { | |
134 | - if (Em_App_state != Em_App_CONNECTED) { | |
135 | - return; | |
136 | - } | |
137 | - Em_App_state = Em_App_DISCONNECTED; | |
138 | - Em_App_ind.sot = 0; | |
139 | - Em_App_ind.hdr.kind = Em_Message_DISCONNECT; | |
140 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
141 | - Em_App_ind.hdr.resId = 0; | |
142 | - Em_App_startIndSend(); | |
143 | -} | |
144 | - | |
145 | -void Em_Message_dispatch(void) { | |
146 | - if (Em_App_state == Em_App_IDLE) { | |
147 | - return; | |
148 | - } | |
149 | - switch (Em_App_msg.hdr.kind) { | |
150 | - case Em_Message_CONNECT: | |
151 | - Em_App_state = Em_App_CONNECTED; | |
152 | - Em_App_CONNECTHANDLER(); | |
153 | - break; | |
154 | - case Em_Message_DISCONNECT: | |
155 | - Em_App_state = Em_App_DISCONNECTED; | |
156 | - Em_App_DISCONNECTHANDLER(); | |
157 | - break; | |
158 | - case Em_Message_PAIRING_DONE: | |
159 | - if (Em_App_pdHdlr) { | |
160 | - (*Em_App_pdHdlr)(); | |
161 | - } | |
162 | - break; | |
163 | - case Em_Message_FETCH: | |
164 | - if (Em_App_msg.hdr.resId > 0) { | |
165 | - Em_App_fetchDispatch(); | |
166 | - } | |
167 | - else { | |
168 | - Em_App_sysFetchDispatch(); | |
169 | - } | |
170 | - break; | |
171 | - case Em_Message_STORE: | |
172 | - if (Em_App_msg.hdr.resId > 0) { | |
173 | - Em_App_storeDispatch(); | |
174 | - } | |
175 | - else { | |
176 | - Em_App_sysStoreDispatch(); | |
177 | - } | |
178 | - break; | |
179 | - } | |
180 | -} | |
181 | - | |
182 | -void Em_App_PAIRINGOFF(void(*handler)(void)) { | |
183 | - Em_App_PAIRINGON(0, handler); | |
184 | -} | |
185 | - | |
186 | -void Em_App_PAIRINGON(uint8_t secs, void(*handler)(void)) { | |
187 | - if (Em_App_state != Em_App_DISCONNECTED) { | |
188 | - return; | |
189 | - } | |
190 | - Em_App_pdHdlr = handler; | |
191 | - Em_App_ind.sot = 0; | |
192 | - Em_App_ind.hdr.kind = Em_Message_PAIRING; | |
193 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
194 | - Em_App_ind.hdr.resId = secs; | |
195 | - Em_App_startIndSend(); | |
196 | -} | |
197 | - | |
198 | -void Em_App_RESET(void) { | |
199 | - Em_App_recvIdx = Em_App_recvSize = Em_App_xmitIdx = Em_App_xmitSize = 0; | |
200 | - Em_App_state = Em_App_IDLE; | |
201 | - Em_App_moreData = false; | |
202 | - Em_App_readIdle = true; | |
203 | - Em_App_fileIndex = 0; | |
204 | - Em_App_xmitMask = 0; | |
205 | -} | |
206 | - | |
207 | -void Em_App_RUN(void) { | |
208 | - Em_App_state = Em_App_DISCONNECTED; | |
209 | -} | |
210 | - | |
211 | -void Em_App_sendResponse(Em_Message_Kind kind, Em_Message_Size size) { | |
212 | - if (Em_App_state != Em_App_CONNECTED) { | |
213 | - return; | |
214 | - } | |
215 | - Em_App_msg.sot = 0; | |
216 | - Em_App_msg.hdr.kind = kind; | |
217 | - Em_App_msg.hdr.size = size + sizeof (Em_Message_Header); | |
218 | - if (Em_App_xmitReady(0)) { | |
219 | - Em_App_startResSend(); | |
220 | - } | |
221 | -} | |
222 | - | |
223 | -void Em_App_startIndSend(void) { | |
224 | - Em_App_outBuf = (uint8_t*)&Em_App_ind.sot; | |
225 | - Em_App_xmitSize = Em_App_ind.hdr.size + 1; | |
226 | - Em_App_xmitIdx = 0; | |
227 | - Em_Message_startSend(); | |
228 | -} | |
229 | - | |
230 | -void Em_App_startResSend(void) { | |
231 | - Em_App_outBuf = (uint8_t*)&Em_App_msg.sot; | |
232 | - Em_App_xmitSize = Em_App_msg.hdr.size + 1; | |
233 | - Em_App_xmitIdx = 0; | |
234 | - Em_Message_startSend(); | |
235 | -} | |
236 | - | |
237 | -void Em_App_sysFetchDispatch(void) { | |
238 | - uint8_t size = 0; | |
239 | - int i; | |
240 | - switch (Em_App_msg.hdr.resId) { | |
241 | - case Em_Message_SYS_SCHEMA_HASH: | |
242 | - for (i = 0; i < sizeof (Em_App_hash); i++) { | |
243 | - Em_App_msg.data[i] = Em_App_hash[i]; | |
244 | - } | |
245 | - Em_App_msg.data[sizeof (Em_App_hash)] = *((uint8_t*)&Em_App_endian); | |
246 | - size = sizeof (Em_App_hash) + 1; | |
247 | - break; | |
248 | - case Em_Message_SYS_EAP_PROTOCOL_LEVEL: | |
249 | - *((Em_Message_protocolLevel_t*)Em_App_msg.data) = Em_Message_protocolLevel; | |
250 | - size = sizeof (Em_Message_protocolLevel_t); | |
251 | - break; | |
252 | - case Em_Message_SYS_EAP_BUILD_DATE: | |
253 | - for (i = 0; i < sizeof (Em_App_build); i++) { | |
254 | - Em_App_msg.data[i] = Em_App_build[i]; | |
255 | - } | |
256 | - size = sizeof (Em_App_build); | |
257 | - break; | |
258 | - case Em_Message_SYS_RESOURCE_COUNT: | |
259 | - Em_App_msg.data[0] = Em_App_APP_RESOURCE_COUNT; | |
260 | - Em_App_msg.data[1] = Em_App_SYS_RESOURCE_COUNT; | |
261 | - size = 2; | |
262 | - break; | |
263 | - } | |
264 | - Em_App_sendResponse(Em_Message_FETCH_DONE, size); | |
265 | -} | |
266 | - | |
267 | -void Em_App_sysStoreDispatch(void) { | |
268 | - switch (Em_App_msg.hdr.resId) { | |
269 | - case Em_Message_SYS_FILE_INDEX_RESET: | |
270 | - Em_App_fileIndex = 0; | |
271 | - break; | |
272 | - } | |
273 | - Em_App_sendResponse(Em_Message_STORE_DONE, 0); | |
274 | -} | |
275 | - | |
276 | -bool Em_App_xmitReady(Em_Message_ResId indId) { | |
277 | - uint8_t key = Em_Message_lock(); | |
278 | - bool res = !Em_App_moreData && Em_App_xmitMask == 0; | |
279 | - if (!res) { | |
280 | - Em_App_xmitMask |= (1 << indId); | |
281 | - } | |
282 | - Em_Message_unlock(key); | |
283 | - return res; | |
284 | -} | |
285 | - | |
286 | -void Em_App_fetchDispatch(void) { | |
287 | - uint8_t size = 0; | |
288 | - switch (Em_App_msg.hdr.resId) { | |
289 | - case 0: | |
290 | - break; | |
291 | - case 2: | |
292 | - Blinker_count_fetch((Blinker_count_t*)Em_App_msg.data); | |
293 | - size = 2; | |
294 | - break; | |
295 | - case 3: | |
296 | - Blinker_delay_fetch((Blinker_delay_t*)Em_App_msg.data); | |
297 | - size = 2; | |
298 | - break; | |
299 | - case 4: | |
300 | - Blinker_ledState_fetch((Blinker_ledState_t*)Em_App_msg.data); | |
301 | - size = 1; | |
302 | - break; | |
303 | - } | |
304 | - Em_App_sendResponse(Em_Message_FETCH_DONE, size); | |
305 | -} | |
306 | - | |
307 | -void Em_App_storeDispatch(void) { | |
308 | - switch (Em_App_msg.hdr.resId) { | |
309 | - case 0: | |
310 | - break; | |
311 | - case 1: | |
312 | - Blinker_cmd_store((Blinker_cmd_t*)Em_App_msg.data); | |
313 | - break; | |
314 | - case 2: | |
315 | - Blinker_count_store((Blinker_count_t*)Em_App_msg.data); | |
316 | - break; | |
317 | - case 3: | |
318 | - Blinker_delay_store((Blinker_delay_t*)Em_App_msg.data); | |
319 | - break; | |
320 | - } | |
321 | - Em_App_sendResponse(Em_Message_STORE_DONE, 0); | |
322 | -} | |
323 | - | |
324 | -void Em_App_sendIndicator(Em_Message_ResId indId) { | |
325 | - Em_Message_Size resId = 0; | |
326 | - Em_Message_Size size = 0; | |
327 | - switch (indId) { | |
328 | - case 1: | |
329 | - Blinker_ledState_fetch((Blinker_ledState_t*)&Em_App_ind.data); | |
330 | - resId = 4; | |
331 | - size = 1; | |
332 | - break; | |
333 | -} | |
334 | - Em_App_ind.sot = 0; | |
335 | - Em_App_ind.hdr.kind = Em_Message_INDICATOR; | |
336 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header) + size; | |
337 | - Em_App_ind.hdr.resId = resId; | |
338 | - Em_App_startIndSend(); | |
339 | -} | |
340 | - | |
341 | -void Blinker_ledState_indicate(void) { | |
342 | - if (Em_App_state != Em_App_IDLE && Em_App_xmitReady(1)) Em_App_sendIndicator(1); | |
343 | -} | |
344 | - | |
345 | -#ifdef __cplusplus | |
346 | -} | |
347 | -#endif | |
348 | - |
BlinkerSchema/out/Blinker.h deleted
1 | -/**** DO NOT EDIT -- this file has been automatically generated from @emmoco.com.Blinker on 2014-05-10T00:12:31T ****/ | |
2 | -/**** protocolLevel = 12, toolsVersion = 12.0.0.201211010336 ****/ | |
3 | - | |
4 | -#ifndef Blinker__H | |
5 | -#define Blinker__H | |
6 | - | |
7 | -#include "Em_Types.h" | |
8 | -#include "Em_Message.h" | |
9 | - | |
10 | -#ifdef __cplusplus | |
11 | -extern "C" { | |
12 | -#endif | |
13 | - | |
14 | -/* enum Cmd */ | |
15 | -typedef uint8_t Blinker_Cmd; | |
16 | -#define Blinker_START_CMD 0 | |
17 | -#define Blinker_STOP_CMD 1 | |
18 | - | |
19 | -/* enum LedState */ | |
20 | -typedef uint8_t Blinker_LedState; | |
21 | -#define Blinker_LED_OFF 0 | |
22 | -#define Blinker_LED_ON 1 | |
23 | - | |
24 | -/* resource cmd */ | |
25 | -typedef Blinker_Cmd Blinker_cmd_t; | |
26 | -extern void Blinker_cmd_store(Blinker_cmd_t* const input); | |
27 | - | |
28 | -/* resource count */ | |
29 | -typedef int16_t Blinker_count_t; | |
30 | -extern void Blinker_count_fetch(Blinker_count_t* const output); | |
31 | -extern void Blinker_count_store(Blinker_count_t* const input); | |
32 | - | |
33 | -/* resource delay */ | |
34 | -typedef uint16_t Blinker_delay_t; | |
35 | -#define Blinker_delay_min 500 | |
36 | -#define Blinker_delay_max 2000 | |
37 | -#define Blinker_delay_step 100 | |
38 | -extern void Blinker_delay_fetch(Blinker_delay_t* const output); | |
39 | -extern void Blinker_delay_store(Blinker_delay_t* const input); | |
40 | - | |
41 | -/* resource ledState */ | |
42 | -typedef Blinker_LedState Blinker_ledState_t; | |
43 | -extern void Blinker_ledState_fetch(Blinker_ledState_t* const output); | |
44 | -extern void Blinker_ledState_indicate(void); | |
45 | - | |
46 | -void Blinker_reset(void); | |
47 | -void Blinker_run(void); | |
48 | - | |
49 | -void Blinker_accept(bool enable); | |
50 | -void Blinker_disconnect(void); | |
51 | -void Blinker_pairingOn(uint8_t secs, void(*handler)(void)); | |
52 | -void Blinker_pairingOff(void(*handler)(void)); | |
53 | - | |
54 | -void Blinker_connectHandler(void); | |
55 | -void Blinker_disconnectHandler(void); | |
56 | - | |
57 | -#ifdef __cplusplus | |
58 | -} | |
59 | -#endif | |
60 | - | |
61 | -#endif /* Blinker__H */ |
BlinkerSchema/out/Blinker.zip deleted
No preview for this file type
BlinkerSchema/out/Em_Message.h deleted
1 | -#ifndef Em_Message_H_ | |
2 | -#define Em_Message_H_ | |
3 | - | |
4 | -#include "Em_Types.h" | |
5 | - | |
6 | -#ifdef __cplusplus | |
7 | -extern "C" { | |
8 | -#endif | |
9 | - | |
10 | -/* protocolLevel #4 */ | |
11 | -#define Em_Message_INDSIZE 4 | |
12 | - | |
13 | -typedef uint8_t Em_Message_Size; | |
14 | -typedef uint8_t Em_Message_Kind; | |
15 | -/* protocolLevel #12 -- split 16-bit resId into <resId, chan> */ | |
16 | -typedef int8_t Em_Message_ResId; | |
17 | -typedef uint8_t Em_Message_Chan; | |
18 | - | |
19 | -#define Em_Message_NOP 0 | |
20 | -#define Em_Message_FETCH 1 | |
21 | -#define Em_Message_FETCH_DONE 2 | |
22 | -#define Em_Message_STORE 3 | |
23 | -#define Em_Message_STORE_DONE 4 | |
24 | -#define Em_Message_INDICATOR 5 | |
25 | -#define Em_Message_CONNECT 6 | |
26 | -#define Em_Message_DISCONNECT 7 | |
27 | -#define Em_Message_ECHO 8 | |
28 | -/* protocolLevel #3 */ | |
29 | -/* protocolLevel #6 -- rename from BROADCAST to PAIRING */ | |
30 | -#define Em_Message_PAIRING 9 | |
31 | -#define Em_Message_PAIRING_DONE 10 | |
32 | -/* protocolLevel #7 */ | |
33 | -#define Em_Message_OFFLINE 11 | |
34 | -/* protocolLevel #8 */ | |
35 | -#define Em_Message_ACCEPT 12 | |
36 | - | |
37 | -typedef struct Em_Message_Header { | |
38 | - Em_Message_Size size; | |
39 | - Em_Message_Kind kind; | |
40 | - Em_Message_ResId resId; | |
41 | - Em_Message_Chan chan; | |
42 | -} Em_Message_Header; | |
43 | - | |
44 | -typedef uint16_t Em_Message_protocolLevel_t; | |
45 | - | |
46 | -/* protocolLevel #1 */ | |
47 | - | |
48 | -/* protocolLevel #10 */ | |
49 | -/* #define Em_Message_SYS_SCHEMA_UUID -1 */ | |
50 | - | |
51 | -#define Em_Message_SYS_MCM_PROTOCOL_LEVEL -2 | |
52 | -#define Em_Message_SYS_EAP_PROTOCOL_LEVEL -3 | |
53 | -#define Em_Message_SYS_EAP_BUILD_DATE -4 | |
54 | - | |
55 | -/* protocolLevel #2 */ | |
56 | -#define Em_Message_SYS_FILE_INDEX_RESET -5 | |
57 | - | |
58 | -/* protocolLevel #5 */ | |
59 | -#define Em_Message_SYS_SCHEMA_HASH -6 | |
60 | - | |
61 | -/* protocolLevel #7 */ | |
62 | -#define Em_Message_SYS_RESOURCE_COUNT -7 | |
63 | - | |
64 | -/* protocolLevel #9 */ | |
65 | -#define Em_Message_SYS_MOBILE_RSSI -8 | |
66 | - | |
67 | -/* protocolLevel #11 */ | |
68 | -#define Em_Message_SYS_MCM_DISCONNECT -9 | |
69 | - | |
70 | -extern void Em_Message_init(void); | |
71 | - | |
72 | -extern bool Em_Message_addByte(uint8_t b); | |
73 | -extern void Em_Message_dispatch(void); | |
74 | -extern bool Em_Message_getByte(uint8_t *bp); | |
75 | -extern uint8_t Em_Message_lock(void); | |
76 | -extern void Em_Message_startSend(void); | |
77 | -extern void Em_Message_unlock(uint8_t key); | |
78 | - | |
79 | -#ifdef __cplusplus | |
80 | -} | |
81 | -#endif | |
82 | - | |
83 | -#endif /*Em_Message_H_*/ |
BlinkerSchema/out/Em_Types.h deleted
BlinkerSchema/out/blinker.json deleted
1 | -{ | |
2 | - "resources": { | |
3 | - "$schemaHash": { | |
4 | - "id": -6, | |
5 | - "align": 1, | |
6 | - "attributes": {"readonly": true}, | |
7 | - "type": "A20:u1", | |
8 | - "access": "r", | |
9 | - "size": 20 | |
10 | - }, | |
11 | - "$eapProtocolLevel": { | |
12 | - "id": -3, | |
13 | - "align": 2, | |
14 | - "attributes": {"readonly": true}, | |
15 | - "type": "u2", | |
16 | - "access": "r", | |
17 | - "size": 2 | |
18 | - }, | |
19 | - "cmd": { | |
20 | - "id": 1, | |
21 | - "align": 1, | |
22 | - "attributes": {"writeonly": true}, | |
23 | - "type": "E:@emmoco.com.Blinker/Cmd", | |
24 | - "access": "w", | |
25 | - "size": 1 | |
26 | - }, | |
27 | - "$mcmProtocolLevel": { | |
28 | - "id": -2, | |
29 | - "align": 2, | |
30 | - "attributes": {"readonly": true}, | |
31 | - "type": "u2", | |
32 | - "access": "r", | |
33 | - "size": 2 | |
34 | - }, | |
35 | - "count": { | |
36 | - "id": 2, | |
37 | - "align": 2, | |
38 | - "attributes": {"readwrite": true}, | |
39 | - "type": "i2", | |
40 | - "access": "rw", | |
41 | - "size": 2 | |
42 | - }, | |
43 | - "$mobileRssi": { | |
44 | - "id": -8, | |
45 | - "align": 1, | |
46 | - "attributes": {"readonly": true}, | |
47 | - "type": "i1", | |
48 | - "access": "r", | |
49 | - "size": 1 | |
50 | - }, | |
51 | - "$mcmDisconnect": { | |
52 | - "id": -9, | |
53 | - "align": 1, | |
54 | - "attributes": {"writeonly": true}, | |
55 | - "type": "u1", | |
56 | - "access": "w", | |
57 | - "size": 1 | |
58 | - }, | |
59 | - "delay": { | |
60 | - "id": 3, | |
61 | - "align": 2, | |
62 | - "attributes": {"readwrite": true}, | |
63 | - "type": "N:0.500000,2.000000,0.100000,3/u2", | |
64 | - "access": "rw", | |
65 | - "size": 2 | |
66 | - }, | |
67 | - "$eapBuildDate": { | |
68 | - "id": -4, | |
69 | - "align": 1, | |
70 | - "attributes": {"readonly": true}, | |
71 | - "type": "A8:u1", | |
72 | - "access": "r", | |
73 | - "size": 8 | |
74 | - }, | |
75 | - "$resourceCount": { | |
76 | - "id": -7, | |
77 | - "align": 1, | |
78 | - "attributes": {"readonly": true}, | |
79 | - "type": "S:system@emmoco.com.System/ResourceCount", | |
80 | - "access": "r", | |
81 | - "size": 2 | |
82 | - }, | |
83 | - "ledState": { | |
84 | - "id": 4, | |
85 | - "align": 1, | |
86 | - "attributes": { | |
87 | - "indicator": true, | |
88 | - "readonly": true | |
89 | - }, | |
90 | - "type": "E:@emmoco.com.Blinker/LedState", | |
91 | - "access": "ir", | |
92 | - "size": 1 | |
93 | - }, | |
94 | - "$fileIndexReset": { | |
95 | - "id": -5, | |
96 | - "align": 2, | |
97 | - "attributes": {"writeonly": true}, | |
98 | - "type": "i2", | |
99 | - "access": "w", | |
100 | - "size": 2 | |
101 | - } | |
102 | - }, | |
103 | - "resourceNamesSys": [ | |
104 | - "$eapBuildDate", | |
105 | - "$eapProtocolLevel", | |
106 | - "$fileIndexReset", | |
107 | - "$mcmDisconnect", | |
108 | - "$mcmProtocolLevel", | |
109 | - "$mobileRssi", | |
110 | - "$resourceCount", | |
111 | - "$schemaHash" | |
112 | - ], | |
113 | - "manifest": { | |
114 | - "protocolLevel": 12, | |
115 | - "hash": [ | |
116 | - 194, | |
117 | - 8, | |
118 | - 191, | |
119 | - 173, | |
120 | - 237, | |
121 | - 198, | |
122 | - 193, | |
123 | - 165, | |
124 | - 88, | |
125 | - 202, | |
126 | - 74, | |
127 | - 246, | |
128 | - 70, | |
129 | - 59, | |
130 | - 102, | |
131 | - 128 | |
132 | - ], | |
133 | - "toolVersion": "12.0.0.201211010336", | |
134 | - "name": "Blinker", | |
135 | - "$$md5": "73d98dc6eb4c17eea377d5969c0e49d2", | |
136 | - "build": [ | |
137 | - 70, | |
138 | - 123, | |
139 | - 11, | |
140 | - 227, | |
141 | - 69, | |
142 | - 1, | |
143 | - 0, | |
144 | - 0 | |
145 | - ], | |
146 | - "date": "2014-05-10T00:12:31T", | |
147 | - "maxAlign": 2, | |
148 | - "maxSize": 20, | |
149 | - "version": "1.0.0" | |
150 | - }, | |
151 | - "resourceNames": [ | |
152 | - "cmd", | |
153 | - "count", | |
154 | - "delay", | |
155 | - "ledState", | |
156 | - "$mcmProtocolLevel", | |
157 | - "$eapProtocolLevel", | |
158 | - "$eapBuildDate", | |
159 | - "$fileIndexReset", | |
160 | - "$schemaHash", | |
161 | - "$resourceCount", | |
162 | - "$mobileRssi", | |
163 | - "$mcmDisconnect" | |
164 | - ], | |
165 | - "attributes": { | |
166 | - "description": "Blinker, the hello world program for mobile control", | |
167 | - "version": "1.0.0" | |
168 | - }, | |
169 | - "types": { | |
170 | - "@emmoco.com.Blinker/LedState": { | |
171 | - "values": [ | |
172 | - "LED_OFF", | |
173 | - "LED_ON" | |
174 | - ], | |
175 | - "align": 1, | |
176 | - "type": "E:@emmoco.com.Blinker/LedState", | |
177 | - "size": 1 | |
178 | - }, | |
179 | - "system@emmoco.com.System/ResourceCount": { | |
180 | - "align": 1, | |
181 | - "type": "S:system@emmoco.com.System/ResourceCount", | |
182 | - "size": 2, | |
183 | - "fields": [ | |
184 | - { | |
185 | - "pad": 0, | |
186 | - "align": 1, | |
187 | - "name": "app", | |
188 | - "type": "u1", | |
189 | - "size": 1 | |
190 | - }, | |
191 | - { | |
192 | - "pad": 0, | |
193 | - "align": 1, | |
194 | - "name": "sys", | |
195 | - "type": "u1", | |
196 | - "size": 1 | |
197 | - } | |
198 | - ] | |
199 | - }, | |
200 | - "std:i2": { | |
201 | - "align": 2, | |
202 | - "size": 2 | |
203 | - }, | |
204 | - "std:i1": { | |
205 | - "align": 1, | |
206 | - "size": 1 | |
207 | - }, | |
208 | - "std:u1": { | |
209 | - "align": 1, | |
210 | - "size": 1 | |
211 | - }, | |
212 | - "@emmoco.com.Blinker/Cmd": { | |
213 | - "values": [ | |
214 | - "START_CMD", | |
215 | - "STOP_CMD" | |
216 | - ], | |
217 | - "align": 1, | |
218 | - "type": "E:@emmoco.com.Blinker/Cmd", | |
219 | - "size": 1 | |
220 | - }, | |
221 | - "std:u2": { | |
222 | - "align": 2, | |
223 | - "size": 2 | |
224 | - } | |
225 | - }, | |
226 | - "resourceNamesApp": [ | |
227 | - "cmd", | |
228 | - "count", | |
229 | - "delay", | |
230 | - "ledState" | |
231 | - ], | |
232 | - "imports": {"@emmoco.com.Blinker": true} | |
233 | -} | |
234 | 0 | \ No newline at end of file |
BlinkerSchema/schema.ems deleted
1 | -version = "1.0.0" | |
2 | -description = "Blinker, the hello world program for mobile control" | |
3 | - | |
4 | -schema Blinker { | |
5 | - | |
6 | - /* -------- resource cmd -------- */ | |
7 | - enum Cmd { | |
8 | - START_CMD, STOP_CMD | |
9 | - } | |
10 | - Cmd cmd { | |
11 | - writeonly | |
12 | - } | |
13 | - | |
14 | - /* -------- resource count -------- */ | |
15 | - int16 count { | |
16 | - readwrite | |
17 | - } | |
18 | - | |
19 | - /* -------- resource delay -------- */ | |
20 | - num <0.5, 2.0, 0.100> delay { | |
21 | - readwrite | |
22 | - } | |
23 | - | |
24 | - /* -------- resource ledState -------- */ | |
25 | - enum LedState { | |
26 | - LED_OFF, LED_ON | |
27 | - } | |
28 | - LedState ledState { | |
29 | - readonly | |
30 | - indicator | |
31 | - } | |
32 | -} |
CommonLaunchPad/.externalToolConfigurations/LaunchPad Application.launch deleted
1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
2 | -<launchConfiguration type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType"> | |
3 | -<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/> | |
4 | -<mapAttribute key="org.eclipse.debug.core.environmentVariables"> | |
5 | -<mapEntry key="PATH" value="${eclipse_home}/msptools/bin${system_property:path.separator}${env_var:PATH}"/> | |
6 | -</mapAttribute> | |
7 | -<listAttribute key="org.eclipse.debug.ui.favoriteGroups"> | |
8 | -<listEntry value="org.eclipse.ui.externaltools.launchGroup"/> | |
9 | -</listAttribute> | |
10 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LAUNCH_CONFIGURATION_BUILD_SCOPE" value="${project}"/> | |
11 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}/emmoco/msptools/bin/gmake${exe_ext}"/> | |
12 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="load COMMON=${project_loc:/CommonLaunchPad}"/> | |
13 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${project_loc}"/> | |
14 | -</launchConfiguration> |
CommonLaunchPad/rules.mk deleted
1 | -MCU = msp430g2553 | |
2 | - | |
3 | -CC = msp430-gcc | |
4 | -OBJCOPY = msp430-objcopy | |
5 | -SIZE = msp430-size | |
6 | -MSPDEBUG = mspdebug | |
7 | -MSP430FLASHER = MSP430Flasher | |
8 | -EMBUILDER = #em-builder | |
9 | -COPTS = -Os -Wall -fno-strict-aliasing -c -g -mmcu=$(MCU) | |
10 | -LDOPTS = -mmcu=$(MCU) -Wl,-Map=main.map | |
11 | - | |
12 | -EMSOUT = $(SCHEMA)/out | |
13 | -RMFILES = *.out *.map *.hex *.obj | |
14 | -CFLAGS = -I$(COMMON) -I$(EMSOUT) $(COPTS) | |
15 | -LDFLAGS = $(LDOPTS) | |
16 | -VPATH = $(COMMON) | |
17 | -OUTFILE = main.out | |
18 | - | |
19 | -all: $(OUTFILE) | |
20 | - | |
21 | -ifeq (,$(findstring Windows,$(OS))) | |
22 | -load: out-check | |
23 | - $(MSPDEBUG) rf2500 "prog $(OUTFILE)" 2>&1 | |
24 | -else | |
25 | -load: $(OUTFILE:.out=.hex) | |
26 | - $(MSP430FLASHER) -i USB -m AUTO -e ERASE_MAIN -n $(MCU) -w $< -v -z [VCC] -g | |
27 | -endif | |
28 | - | |
29 | -$(OUTFILE): $(OBJECTS) | |
30 | - $(CC) $(LDFLAGS) -o $@ $^ | |
31 | - $(SIZE) $@ | |
32 | - | |
33 | -%.hex: out-check | |
34 | - $(OBJCOPY) -O ihex $(@:.hex=.out) $@ | |
35 | - | |
36 | -%.obj: %.c $(EMSOUT)/$(EMSNAME).h | |
37 | - $(CC) $(CFLAGS) -o $@ $< | |
38 | - | |
39 | -$(EMSNAME).obj: $(EMSOUT)/$(EMSNAME).c $(EMSOUT)/$(EMSNAME).h | |
40 | - $(CC) $(CFLAGS) -o $@ $< | |
41 | - | |
42 | -$(EMSOUT)/$(EMSNAME).h: $(SCHEMA)/schema.ems | |
43 | - $(EMBUILDER) -v --root=$(<D) $< | |
44 | - | |
45 | -local-clean: | |
46 | -ifeq (,$(findstring Windows,$(OS))) | |
47 | - rm -f $(RMFILES) | |
48 | -else | |
49 | -ifneq (,$(wildcard $(RMFILES))) | |
50 | - cmd /c del /q $(wildcard $(RMFILES)) | |
51 | -endif | |
52 | -endif | |
53 | - | |
54 | -clean: local-clean | |
55 | -ifeq (,$(findstring Windows,$(OS))) | |
56 | - rm -rf $(EMSOUT) | |
57 | -else | |
58 | -ifneq (,$(wildcard $(EMSOUT))) | |
59 | - cmd /c rmdir /q /s $(subst /,\,$(EMSOUT)) | |
60 | -endif | |
61 | -endif | |
62 | - | |
63 | -out-check: | |
64 | -ifeq (,$(wildcard $(OUTFILE))) | |
65 | - @echo error: $(OUTFILE): No such file or directory 1>&2 | |
66 | - @exit 1 | |
67 | -endif | |
68 | - | |
69 | -.PHONY: all load clean local-clean out-check |
DUREX Vendor Control/CommunicationProtocol.m
... | ... | @@ -129,7 +129,7 @@ |
129 | 129 | numBytes = remainingBytes; |
130 | 130 | remainingBytes = 0; |
131 | 131 | } |
132 | - [[EMConnectionManager sharedManager] writeValue:[NSNumber numberWithUnsignedChar:(unsigned char)numBytes] toResource:@"data" onSuccess:^ | |
132 | + [[EMConnectionManager sharedManager] writeValue:[NSNumber numberWithUnsignedChar:(unsigned char)numBytes] toResource:@"numBytes" onSuccess:^ | |
133 | 133 | { |
134 | 134 | status = TRUE; |
135 | 135 | } | ... | ... |
DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
DUREX Vendor Control/DUREX Vendor Control.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | symbolName = "+[CommunicationProtocol sharedProtocol]" |
26 | 26 | moduleName = "DUREX Vendor Control" |
27 | 27 | urlString = "file://localhost/Users/imanol/devel/durex/DUREX%20Vendor%20Control/CommunicationProtocol.m" |
28 | - timestampString = "426429770.784755" | |
28 | + timestampString = "428340358.431629" | |
29 | 29 | startingColumnNumber = "9223372036854775807" |
30 | 30 | endingColumnNumber = "9223372036854775807" |
31 | 31 | startingLineNumber = "20" |
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | symbolName = "__39+[CommunicationProtocol sharedProtocol]_block_invoke" |
40 | 40 | moduleName = "DUREX Vendor Control" |
41 | 41 | urlString = "file://localhost/Users/imanol/devel/durex/DUREX%20Vendor%20Control/CommunicationProtocol.m" |
42 | - timestampString = "426429770.78569" | |
42 | + timestampString = "428340358.432031" | |
43 | 43 | startingColumnNumber = "9223372036854775807" |
44 | 44 | endingColumnNumber = "9223372036854775807" |
45 | 45 | startingLineNumber = "20" | ... | ... |
DUREX/.project deleted
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<projectDescription> | |
3 | - <name>DUREX</name> | |
4 | - <comment></comment> | |
5 | - <projects> | |
6 | - </projects> | |
7 | - <buildSpec> | |
8 | - <buildCommand> | |
9 | - <name>com.emmoco.mcmtooling.core.mcmToolingBuilder</name> | |
10 | - <arguments> | |
11 | - </arguments> | |
12 | - </buildCommand> | |
13 | - </buildSpec> | |
14 | - <natures> | |
15 | - <nature>com.emmoco.mcmtooling.core.mcmToolingNature</nature> | |
16 | - </natures> | |
17 | -</projectDescription> |
DUREX/Em/DUREX-STUBS.c deleted
1 | -/**** DO NOT EDIT -- this file has been automatically generated from @emmoco.com.DUREX on 2014-05-14T16:44:10T ****/ | |
2 | -/**** protocolLevel = 13, toolsVersion = 13.4.1.201311121909 ****/ | |
3 | - | |
4 | -#include "DUREX.h" | |
5 | - | |
6 | -#ifdef DUREX_STUBS_ /* enables optional inclusion of application stubs */ | |
7 | - | |
8 | -/* Copy the function skeletons below into your own application source file */ | |
9 | - | |
10 | -void DUREX_connectHandler(void) { | |
11 | - /* TODO: application is now connected */ | |
12 | -} | |
13 | - | |
14 | -void DUREX_disconnectHandler(void) { | |
15 | - /* TODO: application is now disconnected */ | |
16 | -} | |
17 | - | |
18 | -void DUREX_numBytes_fetch(DUREX_numBytes_t* output) { | |
19 | - /* TODO: read resource 'numBytes' into 'output' */ | |
20 | -} | |
21 | - | |
22 | -void DUREX_numBytes_store(DUREX_numBytes_t* input) { | |
23 | - /* TODO: write resource 'numBytes' from 'input' */ | |
24 | -} | |
25 | - | |
26 | -void DUREX_data_fetch(DUREX_data_t output) { | |
27 | - /* TODO: read resource 'data' into 'output' */ | |
28 | -} | |
29 | - | |
30 | -void DUREX_data_store(DUREX_data_t input) { | |
31 | - /* TODO: write resource 'data' from 'input' */ | |
32 | -} | |
33 | - | |
34 | -void DUREX_numPackets_fetch(DUREX_numPackets_t* output) { | |
35 | - /* TODO: read resource 'numPackets' into 'output' */ | |
36 | -} | |
37 | - | |
38 | -void DUREX_numPackets_store(DUREX_numPackets_t* input) { | |
39 | - /* TODO: write resource 'numPackets' from 'input' */ | |
40 | -} | |
41 | - | |
42 | -void DUREX_messageAvailable_fetch(DUREX_messageAvailable_t* output) { | |
43 | - /* TODO: read resource 'messageAvailable' into 'output' */ | |
44 | -} | |
45 | - | |
46 | -#endif /* application stubs */ |
DUREX/Em/DUREX.c deleted
1 | -/**** DO NOT EDIT -- this file has been automatically generated from @emmoco.com.DUREX on 2014-05-14T16:44:10T ****/ | |
2 | -/**** protocolLevel = 13, toolsVersion = 13.4.1.201311121909 ****/ | |
3 | - | |
4 | -#include "Em_Message.h" | |
5 | -#include "DUREX.h" | |
6 | - | |
7 | -#ifdef __cplusplus | |
8 | -extern "C" { | |
9 | -#endif | |
10 | - | |
11 | -#define Em_Message_protocolLevel 13 | |
12 | - | |
13 | -typedef struct Em_App_Message { | |
14 | - uint8_t dummy[3]; | |
15 | - uint8_t sot; | |
16 | - Em_Message_Header hdr; | |
17 | - uint8_t data[229]; | |
18 | -} Em_App_Message; | |
19 | - | |
20 | -const uint8_t Em_App_hash[] = {28, 106, 83, 11, 248, 159, 192, 243, 66, 193, 233, 148, 55, 208, 191, 77, 13, 0, ((sizeof(struct{uint8_t f1; uint16_t f2;}) - sizeof(uint16_t)) << 4) | (sizeof(struct{uint8_t f1; uint32_t f2;}) - sizeof(uint32_t))}; | |
21 | - | |
22 | -const uint8_t Em_App_build[] = {208, 202, 48, 251, 69, 1, 0, 0}; | |
23 | - | |
24 | -#define Em_App_APP_RESOURCE_COUNT 4 | |
25 | -#define Em_App_SYS_RESOURCE_COUNT 9 | |
26 | - | |
27 | -#define Em_App_ACCEPT DUREX_accept | |
28 | -#define Em_App_ACTIVATEPARAMETERS DUREX_activateParameters | |
29 | -#define Em_App_BROADCASTOFF DUREX_broadcastOff | |
30 | -#define Em_App_DISCONNECT DUREX_disconnect | |
31 | -#define Em_App_PAIRINGON DUREX_pairingOn | |
32 | -#define Em_App_PAIRINGOFF DUREX_pairingOff | |
33 | -#define Em_App_RESET DUREX_reset | |
34 | -#define Em_App_SETDEVICENAME DUREX_setDeviceName | |
35 | -#define Em_App_START DUREX_start | |
36 | - | |
37 | -#define Em_App_CONNECTHANDLER DUREX_connectHandler | |
38 | -#define Em_App_DISCONNECTHANDLER DUREX_disconnectHandler | |
39 | - | |
40 | -#define Em_App_MAX_INDICATOR 2 | |
41 | - | |
42 | -/* BEGIN common code */ | |
43 | - | |
44 | -enum {Em_App_IDLE, Em_App_STARTING, Em_App_DISCONNECTED, Em_App_CONNECTED}; | |
45 | - | |
46 | -typedef struct Em_App_Indicator { | |
47 | - uint8_t dummy[3]; | |
48 | - uint8_t sot; | |
49 | - Em_Message_Header hdr; | |
50 | - uint8_t data[Em_Message_INDSIZE]; | |
51 | -} Em_App_Indicator; | |
52 | - | |
53 | -union { uint32_t align; Em_App_Message msg; } Em_App_msg_u; | |
54 | -union { uint32_t align; Em_App_Indicator ind; } Em_App_ind_u; | |
55 | -#define Em_App_msg Em_App_msg_u.msg | |
56 | -#define Em_App_ind Em_App_ind_u.ind | |
57 | - | |
58 | -void (*Em_App_pdHdlr)(void); | |
59 | - | |
60 | -const uint16_t Em_App_endian = 0x0100; | |
61 | - | |
62 | -Em_Message_Size Em_App_recvIdx; | |
63 | -Em_Message_Size Em_App_recvSize; | |
64 | -Em_Message_Size Em_App_xmitIdx; | |
65 | -Em_Message_Size Em_App_xmitSize; | |
66 | - | |
67 | -uint8_t Em_App_state = Em_App_IDLE; | |
68 | -int32_t Em_App_fileIndex = 0; | |
69 | -uint32_t Em_App_xmitMask = 0; | |
70 | - | |
71 | -uint8_t* Em_App_valp; | |
72 | -uint8_t* Em_App_bufp; | |
73 | -const char* Em_App_desc; | |
74 | - | |
75 | -uint8_t* Em_App_inBuf = (uint8_t*)&Em_App_msg.hdr; | |
76 | -uint8_t* Em_App_outBuf = 0; | |
77 | - | |
78 | -uint8_t* _Em_Message_rxBuf = 0; | |
79 | -uint8_t _Em_Message_rxCnt = 0; | |
80 | - | |
81 | -uint8_t* _Em_Message_txBuf = 0; | |
82 | -uint8_t _Em_Message_txCnt = 0; | |
83 | - | |
84 | -#define Em_App_DEVNAME_LEN 9 | |
85 | -const char* Em_App_devName = 0; | |
86 | - | |
87 | -void Em_App_fetchDispatch(void); | |
88 | -void Em_Message_marshallToBuf(uint8_t* valp, uint8_t* bufp, const char* desc); | |
89 | -void Em_Message_marshallToVal(uint8_t* valp, uint8_t* bufp, const char* desc); | |
90 | -void Em_App_storeDispatch(void); | |
91 | -void Em_App_sendIndicator(Em_Message_ResId indId); | |
92 | -void Em_App_sendResponse(Em_Message_Kind kind, Em_Message_Size size); | |
93 | -void Em_App_startIndSend(void); | |
94 | -void Em_App_startResSend(void); | |
95 | -void Em_App_sysFetchDispatch(void); | |
96 | -void Em_App_sysStoreDispatch(void); | |
97 | -bool Em_App_xmitReady(Em_Message_ResId indId); | |
98 | - | |
99 | -void Em_Message_nextXmit(void) { | |
100 | - uint8_t key = Em_Hal_lock(); | |
101 | - if (Em_App_xmitMask != 0) { | |
102 | - uint8_t i; | |
103 | - uint32_t m; | |
104 | - for (i = 0, m = 0x1; i < Em_App_MAX_INDICATOR; i++, m <<= 1) { | |
105 | - if (Em_App_xmitMask & m) { | |
106 | - Em_App_xmitMask &= ~m; | |
107 | - if (i == 0) { | |
108 | - Em_App_startResSend(); | |
109 | - } | |
110 | - else { | |
111 | - Em_App_sendIndicator(i - 1); | |
112 | - } | |
113 | - break; | |
114 | - } | |
115 | - } | |
116 | - } | |
117 | - Em_Hal_unlock(key); | |
118 | -} | |
119 | - | |
120 | -void Em_Message_restart(void) { | |
121 | - Em_App_START(); | |
122 | -} | |
123 | - | |
124 | -void Em_App_ACCEPT(bool enable) { | |
125 | - if (Em_App_state == Em_App_CONNECTED) { | |
126 | - return; | |
127 | - } | |
128 | - Em_App_ind.sot = 0; | |
129 | - Em_App_ind.hdr.kind = Em_Message_ACCEPT; | |
130 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
131 | - Em_App_ind.hdr.resId = enable; | |
132 | - Em_App_startIndSend(); | |
133 | -} | |
134 | - | |
135 | -void Em_App_ACTIVATEPARAMETERS(uint8_t group) { | |
136 | - if (Em_App_state == Em_App_IDLE || Em_App_state == Em_App_STARTING) { | |
137 | - return; | |
138 | - } | |
139 | - Em_App_ind.sot = 0; | |
140 | - Em_App_ind.hdr.kind = Em_Message_ACTIVE_PARAMS; | |
141 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
142 | - Em_App_ind.hdr.resId = group; | |
143 | - Em_App_startIndSend(); | |
144 | -} | |
145 | - | |
146 | -void Em_App_BROADCASTOFF(void) { | |
147 | - Em_App_ind.sot = 0; | |
148 | - Em_App_ind.hdr.kind = Em_Message_INDICATOR; | |
149 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
150 | - Em_App_ind.hdr.resId = 0; | |
151 | - Em_App_startIndSend(); | |
152 | -} | |
153 | - | |
154 | -void Em_App_DISCONNECT(void) { | |
155 | - if (Em_App_state != Em_App_CONNECTED) { | |
156 | - return; | |
157 | - } | |
158 | - Em_App_state = Em_App_DISCONNECTED; | |
159 | - Em_App_ind.sot = 0; | |
160 | - Em_App_ind.hdr.kind = Em_Message_DISCONNECT; | |
161 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
162 | - Em_App_ind.hdr.resId = 0; | |
163 | - Em_App_startIndSend(); | |
164 | -} | |
165 | - | |
166 | -void Em_Message_dispatch(void) { | |
167 | - if (Em_App_state == Em_App_IDLE) { | |
168 | - return; | |
169 | - } | |
170 | - switch (Em_App_msg.hdr.kind) { | |
171 | - case Em_Message_CONNECT: | |
172 | - Em_App_state = Em_App_CONNECTED; | |
173 | - Em_App_CONNECTHANDLER(); | |
174 | - break; | |
175 | - case Em_Message_DISCONNECT: | |
176 | - Em_App_state = Em_App_DISCONNECTED; | |
177 | - Em_App_DISCONNECTHANDLER(); | |
178 | - break; | |
179 | - case Em_Message_PAIRING_DONE: | |
180 | - if (Em_App_pdHdlr) { | |
181 | - (*Em_App_pdHdlr)(); | |
182 | - } | |
183 | - break; | |
184 | - case Em_Message_FETCH: | |
185 | - if (Em_App_msg.hdr.resId < 0x80) { | |
186 | - Em_App_fetchDispatch(); | |
187 | - } | |
188 | - else { | |
189 | - Em_App_sysFetchDispatch(); | |
190 | - } | |
191 | - break; | |
192 | - case Em_Message_STORE: | |
193 | - if (Em_App_msg.hdr.resId < 0x80) { | |
194 | - Em_App_storeDispatch(); | |
195 | - } | |
196 | - else { | |
197 | - Em_App_sysStoreDispatch(); | |
198 | - } | |
199 | - break; | |
200 | - } | |
201 | -} | |
202 | - | |
203 | -void Em_App_marshallToBuf() { | |
204 | - char ch; | |
205 | - while ((ch = *Em_App_desc++)) { | |
206 | - switch (ch) { | |
207 | - case '0' : { | |
208 | - *Em_App_bufp++ = 0; | |
209 | - break; | |
210 | - } | |
211 | - case '1' : { | |
212 | - *Em_App_bufp++ = *Em_App_valp & 0xFF; | |
213 | - break; | |
214 | - } | |
215 | - case '2' : { | |
216 | - uint16_t v16 = *(uint16_t*)Em_App_valp; | |
217 | - *Em_App_bufp++ = v16 & 0xFF; | |
218 | - *Em_App_bufp++ = (v16 >> 8) & 0xFF; | |
219 | - break; | |
220 | - } | |
221 | - case '4' : { | |
222 | - if (((uint32_t)Em_App_valp & 0x1)) Em_App_valp++; | |
223 | - uint32_t v32 = *(uint32_t*)Em_App_valp++; | |
224 | - *Em_App_bufp++ = v32 & 0xFF; | |
225 | - *Em_App_bufp++ = (v32 >> 8) & 0xFF; | |
226 | - *Em_App_bufp++ = (v32 >> 16) & 0xFF; | |
227 | - *Em_App_bufp++ = (v32 >> 24) & 0xFF; | |
228 | - break; | |
229 | - } | |
230 | - } | |
231 | - Em_App_valp += 1; | |
232 | - } | |
233 | -} | |
234 | - | |
235 | -void Em_App_marshallToVal() { | |
236 | - char ch; | |
237 | - while ((ch = *Em_App_desc++)) { | |
238 | - switch (ch) { | |
239 | - case '0' : { | |
240 | - *Em_App_valp = 0; | |
241 | - Em_App_bufp += 1; | |
242 | - break; | |
243 | - } | |
244 | - case '1' : { | |
245 | - *Em_App_valp = *Em_App_bufp++ & 0xFF; | |
246 | - break; | |
247 | - } | |
248 | - case '2' : { | |
249 | - uint16_t v16 = *Em_App_bufp++ & 0xFF; | |
250 | - v16 |= (*Em_App_bufp++ << 8); | |
251 | - *(uint16_t*)Em_App_valp = v16; | |
252 | - break; | |
253 | - } | |
254 | - case '4' : { | |
255 | - if (((uint32_t)Em_App_valp & 0x1)) Em_App_valp++; | |
256 | - uint32_t v32 = (uint32_t)*Em_App_bufp++ & 0xFF; | |
257 | - v32 |= ((uint32_t)*Em_App_bufp++ << 8); | |
258 | - v32 |= ((uint32_t)*Em_App_bufp++ << 16); | |
259 | - v32 |= ((uint32_t)*Em_App_bufp++ << 24); | |
260 | - *(uint32_t*)Em_App_valp++ = v32; | |
261 | - break; | |
262 | - } | |
263 | - } | |
264 | - Em_App_valp += 1; | |
265 | - } | |
266 | -} | |
267 | - | |
268 | -void Em_App_PAIRINGOFF(void(*handler)(void)) { | |
269 | - Em_App_PAIRINGON(0, handler); | |
270 | -} | |
271 | - | |
272 | -void Em_App_PAIRINGON(uint8_t secs, void(*handler)(void)) { | |
273 | - if (Em_App_state != Em_App_DISCONNECTED) { | |
274 | - return; | |
275 | - } | |
276 | - Em_App_pdHdlr = handler; | |
277 | - Em_App_ind.sot = 0; | |
278 | - Em_App_ind.hdr.kind = Em_Message_PAIRING; | |
279 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
280 | - Em_App_ind.hdr.resId = secs; | |
281 | - Em_App_startIndSend(); | |
282 | -} | |
283 | - | |
284 | -void Em_App_RESET(void) { | |
285 | - Em_Hal_reset(); | |
286 | - _Em_Message_rxBuf = _Em_Message_txBuf = 0; | |
287 | - _Em_Message_rxCnt = _Em_Message_txCnt = 0; | |
288 | - Em_App_recvIdx = Em_App_recvSize = Em_App_xmitIdx = Em_App_xmitSize = 0; | |
289 | - Em_App_state = Em_App_IDLE; | |
290 | - Em_App_fileIndex = 0; | |
291 | - Em_App_xmitMask = 0; | |
292 | -} | |
293 | - | |
294 | -void Em_App_SETDEVICENAME(const char* name) { | |
295 | - Em_App_devName = name; | |
296 | -} | |
297 | - | |
298 | -void Em_App_START(void) { | |
299 | - Em_App_RESET(); | |
300 | - Em_App_state = Em_App_STARTING; | |
301 | -} | |
302 | - | |
303 | -void Em_App_sendResponse(Em_Message_Kind kind, Em_Message_Size size) { | |
304 | - if (Em_App_state != Em_App_IDLE) { | |
305 | - Em_App_msg.sot = 0; | |
306 | - Em_App_msg.hdr.kind = kind; | |
307 | - Em_App_msg.hdr.size = size + sizeof (Em_Message_Header); | |
308 | - if (Em_App_xmitReady(0)) { | |
309 | - Em_App_startResSend(); | |
310 | - } | |
311 | - } | |
312 | -} | |
313 | - | |
314 | -void Em_App_startIndSend(void) { | |
315 | - Em_App_outBuf = (uint8_t*)&Em_App_ind.sot; | |
316 | - Em_App_xmitSize = Em_App_ind.hdr.size + 1; | |
317 | - Em_App_xmitIdx = 0; | |
318 | - Em_Hal_startSend(); | |
319 | -} | |
320 | - | |
321 | -void Em_App_startResSend(void) { | |
322 | - Em_App_outBuf = (uint8_t*)&Em_App_msg.sot; | |
323 | - Em_App_xmitSize = Em_App_msg.hdr.size + 1; | |
324 | - Em_App_xmitIdx = 0; | |
325 | - Em_Hal_startSend(); | |
326 | -} | |
327 | - | |
328 | -void Em_App_sysFetchDispatch(void) { | |
329 | - uint8_t size = 0; | |
330 | - int i, j; | |
331 | - switch (Em_App_msg.hdr.resId) { | |
332 | - case Em_Message_SYS_SCHEMA_HASH: | |
333 | - for (i = 0; i < sizeof (Em_App_hash); i++) { | |
334 | - Em_App_msg.data[i] = Em_App_hash[i]; | |
335 | - } | |
336 | - Em_App_msg.data[sizeof (Em_App_hash)] = *((uint8_t*)&Em_App_endian); | |
337 | - size = sizeof (Em_App_hash) + 1; | |
338 | - break; | |
339 | - case Em_Message_SYS_MCM_NAME: | |
340 | - if (Em_App_devName) { | |
341 | - for (i = 0; i < Em_App_DEVNAME_LEN; i++) { | |
342 | - if ((Em_App_msg.data[i] = Em_App_devName[i]) == 0) { | |
343 | - break; | |
344 | - } | |
345 | - } | |
346 | - for (j = i; j < Em_App_DEVNAME_LEN; j++) { | |
347 | - Em_App_msg.data[j] = 0; | |
348 | - } | |
349 | - size = Em_App_DEVNAME_LEN; | |
350 | - } | |
351 | - break; | |
352 | - case Em_Message_SYS_EAP_PROTOCOL_LEVEL: | |
353 | - *((Em_Message_protocolLevel_t*)Em_App_msg.data) = Em_Message_protocolLevel; | |
354 | - size = sizeof (Em_Message_protocolLevel_t); | |
355 | - break; | |
356 | - case Em_Message_SYS_EAP_BUILD_DATE: | |
357 | - for (i = 0; i < sizeof (Em_App_build); i++) { | |
358 | - Em_App_msg.data[i] = Em_App_build[i]; | |
359 | - } | |
360 | - size = sizeof (Em_App_build); | |
361 | - break; | |
362 | - case Em_Message_SYS_RESOURCE_COUNT: | |
363 | - Em_App_msg.data[0] = Em_App_APP_RESOURCE_COUNT; | |
364 | - Em_App_msg.data[1] = Em_App_SYS_RESOURCE_COUNT; | |
365 | - size = 2; | |
366 | - break; | |
367 | - } | |
368 | - Em_App_sendResponse(Em_Message_FETCH_DONE, size); | |
369 | -} | |
370 | - | |
371 | -void Em_App_sysStoreDispatch(void) { | |
372 | - switch (Em_App_msg.hdr.resId) { | |
373 | - case Em_Message_SYS_FILE_INDEX_RESET: | |
374 | - Em_App_fileIndex = 0; | |
375 | - break; | |
376 | - } | |
377 | - Em_App_sendResponse(Em_Message_STORE_DONE, 0); | |
378 | -} | |
379 | - | |
380 | -bool Em_App_xmitReady(Em_Message_ResId indId) { | |
381 | - uint8_t key = Em_Hal_lock(); | |
382 | - bool res = _Em_Message_txBuf == 0 && Em_App_xmitMask == 0; | |
383 | - if (!res) { | |
384 | - Em_App_xmitMask |= (1 << indId); | |
385 | - } | |
386 | - Em_Hal_unlock(key); | |
387 | - return res; | |
388 | -} | |
389 | - | |
390 | -/* END common code */ | |
391 | - | |
392 | -void Em_App_fetchDispatch(void) { | |
393 | - uint8_t size = 0; | |
394 | - switch (Em_App_msg.hdr.resId) { | |
395 | - case 0: { | |
396 | - break; | |
397 | - } | |
398 | - case 1: { | |
399 | -#ifdef Em_16BIT | |
400 | - DUREX_numBytes_t val; | |
401 | - Em_App_valp = (uint8_t*)&val; | |
402 | - Em_App_bufp = Em_App_msg.data; | |
403 | - Em_App_desc = "1"; | |
404 | - DUREX_numBytes_fetch(&val); | |
405 | - Em_App_marshallToBuf(); | |
406 | -#else | |
407 | - DUREX_numBytes_fetch((void*)Em_App_msg.data); | |
408 | -#endif | |
409 | - size = 1; | |
410 | - break; | |
411 | - } | |
412 | - case 2: { | |
413 | -#ifdef Em_16BIT | |
414 | - DUREX_data_t val; | |
415 | - Em_App_valp = (uint8_t*)&val; | |
416 | - Em_App_bufp = Em_App_msg.data; | |
417 | - Em_App_desc = "*\xe5[1]"; | |
418 | - DUREX_data_fetch(&val); | |
419 | - Em_App_marshallToBuf(); | |
420 | -#else | |
421 | - DUREX_data_fetch((void*)Em_App_msg.data); | |
422 | -#endif | |
423 | - size = 229; | |
424 | - break; | |
425 | - } | |
426 | - case 3: { | |
427 | -#ifdef Em_16BIT | |
428 | - DUREX_numPackets_t val; | |
429 | - Em_App_valp = (uint8_t*)&val; | |
430 | - Em_App_bufp = Em_App_msg.data; | |
431 | - Em_App_desc = "1"; | |
432 | - DUREX_numPackets_fetch(&val); | |
433 | - Em_App_marshallToBuf(); | |
434 | -#else | |
435 | - DUREX_numPackets_fetch((void*)Em_App_msg.data); | |
436 | -#endif | |
437 | - size = 1; | |
438 | - break; | |
439 | - } | |
440 | - case 4: { | |
441 | -#ifdef Em_16BIT | |
442 | - DUREX_messageAvailable_t val; | |
443 | - Em_App_valp = (uint8_t*)&val; | |
444 | - Em_App_bufp = Em_App_msg.data; | |
445 | - Em_App_desc = "1"; | |
446 | - DUREX_messageAvailable_fetch(&val); | |
447 | - Em_App_marshallToBuf(); | |
448 | -#else | |
449 | - DUREX_messageAvailable_fetch((void*)Em_App_msg.data); | |
450 | -#endif | |
451 | - size = 1; | |
452 | - break; | |
453 | - } | |
454 | - } | |
455 | - Em_App_sendResponse(Em_Message_FETCH_DONE, size); | |
456 | -} | |
457 | - | |
458 | -void Em_App_storeDispatch(void) { | |
459 | - switch (Em_App_msg.hdr.resId) { | |
460 | - case 0: { | |
461 | - break; | |
462 | - } | |
463 | - case 1: { | |
464 | -#ifdef Em_16BIT | |
465 | - DUREX_numBytes_t val; | |
466 | - Em_App_valp = (uint8_t*)&val; | |
467 | - Em_App_bufp = Em_App_msg.data; | |
468 | - Em_App_desc = "1"; | |
469 | - Em_App_marshallToVal(); | |
470 | - DUREX_numBytes_store(&val); | |
471 | -#else | |
472 | - DUREX_numBytes_store((void*)Em_App_msg.data); | |
473 | -#endif | |
474 | - break; | |
475 | - } | |
476 | - case 2: { | |
477 | -#ifdef Em_16BIT | |
478 | - DUREX_data_t val; | |
479 | - Em_App_valp = (uint8_t*)&val; | |
480 | - Em_App_bufp = Em_App_msg.data; | |
481 | - Em_App_desc = "*\xe5[1]"; | |
482 | - Em_App_marshallToVal(); | |
483 | - DUREX_data_store(&val); | |
484 | -#else | |
485 | - DUREX_data_store((void*)Em_App_msg.data); | |
486 | -#endif | |
487 | - break; | |
488 | - } | |
489 | - case 3: { | |
490 | -#ifdef Em_16BIT | |
491 | - DUREX_numPackets_t val; | |
492 | - Em_App_valp = (uint8_t*)&val; | |
493 | - Em_App_bufp = Em_App_msg.data; | |
494 | - Em_App_desc = "1"; | |
495 | - Em_App_marshallToVal(); | |
496 | - DUREX_numPackets_store(&val); | |
497 | -#else | |
498 | - DUREX_numPackets_store((void*)Em_App_msg.data); | |
499 | -#endif | |
500 | - break; | |
501 | - } | |
502 | - } | |
503 | - Em_App_sendResponse(Em_Message_STORE_DONE, 0); | |
504 | -} | |
505 | - | |
506 | -void Em_App_sendIndicator(Em_Message_ResId indId) { | |
507 | - Em_Message_Size resId = 0; | |
508 | - Em_Message_Size size = 0; | |
509 | - switch (indId) { | |
510 | - case 1: { | |
511 | -#ifdef Em_16BIT | |
512 | - DUREX_messageAvailable_t val; | |
513 | - Em_App_valp = (uint8_t*)&val; | |
514 | - Em_App_bufp = Em_App_ind.data; | |
515 | - Em_App_desc = "1"; | |
516 | - DUREX_messageAvailable_fetch(&val); | |
517 | - Em_App_marshallToBuf(); | |
518 | -#else | |
519 | - DUREX_messageAvailable_fetch((DUREX_messageAvailable_t*)&Em_App_ind.data); | |
520 | -#endif | |
521 | - resId = 4; | |
522 | - size = 1; | |
523 | - break; | |
524 | - } | |
525 | - } | |
526 | - Em_App_ind.sot = 0; | |
527 | - Em_App_ind.hdr.kind = Em_Message_INDICATOR; | |
528 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header) + size; | |
529 | - Em_App_ind.hdr.resId = resId; | |
530 | - Em_App_startIndSend(); | |
531 | -} | |
532 | - | |
533 | -void DUREX_messageAvailable_indicate(void) { | |
534 | - if (Em_App_state == Em_App_CONNECTED && Em_App_xmitReady(1 + 1)) Em_App_sendIndicator(1); | |
535 | -} | |
536 | - | |
537 | -#ifdef __cplusplus | |
538 | -} | |
539 | -#endif | |
540 | - |
DUREX/Em/DUREX.h deleted
1 | -/**** DO NOT EDIT -- this file has been automatically generated from @emmoco.com.DUREX on 2014-05-14T16:44:10T ****/ | |
2 | -/**** protocolLevel = 13, toolsVersion = 13.4.1.201311121909 ****/ | |
3 | - | |
4 | -#ifndef DUREX__H | |
5 | -#define DUREX__H | |
6 | - | |
7 | -#include "Em_Types.h" | |
8 | -#include "Em_Message.h" | |
9 | - | |
10 | -#ifdef __cplusplus | |
11 | -extern "C" { | |
12 | -#endif | |
13 | - | |
14 | -/* -------- connection callback functions implemented by the application -------- */ | |
15 | - | |
16 | -void DUREX_connectHandler(void); | |
17 | -void DUREX_disconnectHandler(void); | |
18 | - | |
19 | -/* -------- resource types defined in the schema -------- */ | |
20 | - | |
21 | -/* typedef String */ | |
22 | -typedef char DUREX_String[229]; | |
23 | -#define DUREX_String_length 229 | |
24 | - | |
25 | -/* enum BOOLEAN */ | |
26 | -typedef uint8_t DUREX_BOOLEAN; | |
27 | -#define DUREX_TRUE 0 | |
28 | -#define DUREX_FALSE 1 | |
29 | - | |
30 | -/* -------- resource callback functions implemented by the application -------- */ | |
31 | - | |
32 | -/* resource numBytes */ | |
33 | -typedef uint8_t DUREX_numBytes_t; | |
34 | -extern void DUREX_numBytes_fetch(DUREX_numBytes_t* output); | |
35 | -extern void DUREX_numBytes_store(DUREX_numBytes_t* input); | |
36 | - | |
37 | -/* resource data */ | |
38 | -typedef DUREX_String DUREX_data_t; | |
39 | -extern void DUREX_data_fetch(DUREX_data_t output); | |
40 | -extern void DUREX_data_store(DUREX_data_t input); | |
41 | - | |
42 | -/* resource numPackets */ | |
43 | -typedef uint8_t DUREX_numPackets_t; | |
44 | -extern void DUREX_numPackets_fetch(DUREX_numPackets_t* output); | |
45 | -extern void DUREX_numPackets_store(DUREX_numPackets_t* input); | |
46 | - | |
47 | -/* resource messageAvailable */ | |
48 | -typedef DUREX_BOOLEAN DUREX_messageAvailable_t; | |
49 | -extern void DUREX_messageAvailable_fetch(DUREX_messageAvailable_t* output); | |
50 | -extern void DUREX_messageAvailable_indicate(void); /* called by the application */ | |
51 | - | |
52 | -/* -------- application functions implemented in DUREX.c -------- */ | |
53 | - | |
54 | -void DUREX_accept(bool enable); | |
55 | -void DUREX_activateParameters(uint8_t group); | |
56 | -void DUREX_broadcastOff(void); | |
57 | -void DUREX_disconnect(void); | |
58 | -void DUREX_pairingOn(uint8_t secs, void(*handler)(void)); | |
59 | -void DUREX_pairingOff(void(*handler)(void)); | |
60 | -void DUREX_reset(void); | |
61 | -void DUREX_setDeviceName(const char* name); | |
62 | -void DUREX_start(void); | |
63 | - | |
64 | -#ifdef __cplusplus | |
65 | -} | |
66 | -#endif | |
67 | - | |
68 | -#endif /* DUREX__H */ |
DUREX/Em/Em_Message.h deleted
1 | -#ifndef Em_Message_H_ | |
2 | -#define Em_Message_H_ | |
3 | - | |
4 | -#include "Em_Types.h" | |
5 | - | |
6 | -#ifdef __cplusplus | |
7 | -extern "C" { | |
8 | -#endif | |
9 | - | |
10 | -/* -------- SRT FUNCTIONS CALLED BY HAL -------- */ | |
11 | - | |
12 | -static inline bool Em_Message_addByte(uint8_t b); | |
13 | -extern void Em_Message_dispatch(void); | |
14 | -static inline bool Em_Message_getByte(uint8_t* bp); | |
15 | -extern void Em_Message_restart(void); | |
16 | -static inline bool Em_Message_startRx(void); | |
17 | -static inline uint8_t Em_Message_startTx(void); | |
18 | - | |
19 | - | |
20 | -/* -------- HAL FUNCTIONS CALLED BY SRT -------- */ | |
21 | - | |
22 | -extern uint8_t Em_Hal_lock(void); | |
23 | -extern void Em_Hal_reset(void); | |
24 | -extern void Em_Hal_startSend(void); | |
25 | -extern void Em_Hal_unlock(uint8_t key); | |
26 | -extern void Em_Hal_watchOff(void); | |
27 | -extern void Em_Hal_watchOn(void); | |
28 | - | |
29 | - | |
30 | -/* -------- MESSAGE FORMAT -------- */ | |
31 | - | |
32 | -/* protocolLevel #4 */ | |
33 | -#define Em_Message_INDSIZE 4 | |
34 | - | |
35 | -typedef uint8_t Em_Message_Size; | |
36 | -typedef uint8_t Em_Message_Kind; | |
37 | -/* protocolLevel #12 -- split 16-bit resId into <resId, chan> */ | |
38 | -typedef uint8_t Em_Message_ResId; | |
39 | -typedef uint8_t Em_Message_Chan; | |
40 | - | |
41 | -#define Em_Message_NOP 0 | |
42 | -#define Em_Message_FETCH 1 | |
43 | -#define Em_Message_FETCH_DONE 2 | |
44 | -#define Em_Message_STORE 3 | |
45 | -#define Em_Message_STORE_DONE 4 | |
46 | -#define Em_Message_INDICATOR 5 | |
47 | -#define Em_Message_CONNECT 6 | |
48 | -#define Em_Message_DISCONNECT 7 | |
49 | -#define Em_Message_ECHO 8 | |
50 | -/* protocolLevel #3 */ | |
51 | -/* protocolLevel #6 -- rename from BROADCAST to PAIRING */ | |
52 | -#define Em_Message_PAIRING 9 | |
53 | -#define Em_Message_PAIRING_DONE 10 | |
54 | -/* protocolLevel #7 */ | |
55 | -#define Em_Message_OFFLINE 11 | |
56 | -/* protocolLevel #8 */ | |
57 | -#define Em_Message_ACCEPT 12 | |
58 | -/* protocolLevel #13 */ | |
59 | -#define Em_Message_START 13 | |
60 | -#define Em_Message_ACTIVE_PARAMS 14 | |
61 | - | |
62 | -typedef struct Em_Message_Header { | |
63 | - Em_Message_Size size; | |
64 | - Em_Message_Kind kind; | |
65 | - Em_Message_ResId resId; | |
66 | - Em_Message_Chan chan; | |
67 | -} Em_Message_Header; | |
68 | - | |
69 | -typedef uint16_t Em_Message_protocolLevel_t; | |
70 | - | |
71 | -/* protocolLevel #1 */ | |
72 | - | |
73 | -/* protocolLevel #10 */ | |
74 | -/* #define Em_Message_SYS_SCHEMA_UUID 0xFF */ | |
75 | - | |
76 | -#define Em_Message_SYS_MCM_PROTOCOL_LEVEL 0xFE | |
77 | -#define Em_Message_SYS_EAP_PROTOCOL_LEVEL 0xFD | |
78 | -#define Em_Message_SYS_EAP_BUILD_DATE 0xFC | |
79 | - | |
80 | -/* protocolLevel #2 */ | |
81 | -#define Em_Message_SYS_FILE_INDEX_RESET 0xFB | |
82 | - | |
83 | -/* protocolLevel #5 */ | |
84 | -#define Em_Message_SYS_SCHEMA_HASH 0xFA | |
85 | - | |
86 | -/* protocolLevel #7 */ | |
87 | -#define Em_Message_SYS_RESOURCE_COUNT 0xF9 | |
88 | - | |
89 | -/* protocolLevel #9 */ | |
90 | -#define Em_Message_SYS_MOBILE_RSSI 0xF8 | |
91 | - | |
92 | -/* protocolLevel #11 */ | |
93 | -#define Em_Message_SYS_MCM_DISCONNECT 0xF7 | |
94 | - | |
95 | -/* protocolLevel #13a */ | |
96 | -#define Em_Message_SYS_MCM_NAME 0xF5 | |
97 | - | |
98 | - | |
99 | -/* -------- PRIVATE -------- */ | |
100 | - | |
101 | -extern void Em_Message_nextXmit(void); | |
102 | - | |
103 | -extern uint8_t* Em_App_inBuf; | |
104 | -extern uint8_t* Em_App_outBuf; | |
105 | -extern Em_Message_Size Em_App_xmitSize; | |
106 | - | |
107 | -extern uint8_t* _Em_Message_rxBuf; | |
108 | -extern uint8_t _Em_Message_rxCnt; | |
109 | - | |
110 | -extern uint8_t* _Em_Message_txBuf; | |
111 | -extern uint8_t _Em_Message_txCnt; | |
112 | - | |
113 | -static inline bool Em_Message_addByte(uint8_t b) { | |
114 | - if (_Em_Message_rxCnt == 0) { | |
115 | - if (b == 0) { | |
116 | - return false; | |
117 | - } | |
118 | - _Em_Message_rxCnt = b; | |
119 | - } | |
120 | - *_Em_Message_rxBuf++ = b; | |
121 | - if (--_Em_Message_rxCnt == 0) { | |
122 | - _Em_Message_rxBuf = 0; | |
123 | - if (_Em_Message_txBuf == 0) { | |
124 | - Em_Hal_watchOff(); | |
125 | - } | |
126 | - return true; | |
127 | - } | |
128 | - else { | |
129 | - return false; | |
130 | - } | |
131 | -} | |
132 | - | |
133 | -static inline bool Em_Message_getByte(uint8_t* bp) { | |
134 | - if (_Em_Message_txBuf == 0) { | |
135 | - return false; | |
136 | - } | |
137 | - if (_Em_Message_txCnt == 0) { | |
138 | - _Em_Message_txCnt = *_Em_Message_txBuf + 1; | |
139 | - } | |
140 | - if (--_Em_Message_txCnt > 0) { | |
141 | - *bp = *_Em_Message_txBuf++; | |
142 | - return true; | |
143 | - } | |
144 | - else { | |
145 | - _Em_Message_txBuf = 0; | |
146 | - Em_App_xmitSize = 0; | |
147 | - Em_Message_nextXmit(); | |
148 | - if (_Em_Message_rxBuf == 0) { | |
149 | - Em_Hal_watchOff(); | |
150 | - } | |
151 | - return false; | |
152 | - } | |
153 | -} | |
154 | - | |
155 | -static inline bool Em_Message_startRx(void) { | |
156 | - if (_Em_Message_rxBuf == 0) { | |
157 | - _Em_Message_rxBuf = Em_App_inBuf; | |
158 | - if (_Em_Message_txBuf == 0) { | |
159 | - Em_Hal_watchOn(); | |
160 | - } | |
161 | - return true; | |
162 | - } | |
163 | - else { | |
164 | - return false; | |
165 | - } | |
166 | -} | |
167 | - | |
168 | -static inline uint8_t Em_Message_startTx(void) { | |
169 | - _Em_Message_txBuf = Em_App_outBuf + 1; | |
170 | - _Em_Message_txCnt = 0; | |
171 | - if (_Em_Message_rxBuf == 0) { | |
172 | - Em_Hal_watchOn(); | |
173 | - } | |
174 | - return 0; | |
175 | -} | |
176 | - | |
177 | - | |
178 | -#ifdef __cplusplus | |
179 | -} | |
180 | -#endif | |
181 | - | |
182 | -#endif /*Em_Message_H_*/ |
DUREX/Em/Em_Types.h deleted
1 | -#ifndef Em_Types_H_ | |
2 | -#define Em_Types_H_ | |
3 | - | |
4 | -#ifndef Em_NOSTDBOOL | |
5 | -#include <stdbool.h> | |
6 | -#endif | |
7 | - | |
8 | -#ifndef Em_NOSTDINT | |
9 | -#include <stdint.h> | |
10 | -#endif | |
11 | - | |
12 | -#ifdef Em_16BIT | |
13 | -typedef signed char int8_t; | |
14 | -typedef unsigned char uint8_t; | |
15 | -#endif | |
16 | - | |
17 | -#endif /*Em_Types_H_*/ |
DUREX/Em/durex.json deleted
1 | -{ | |
2 | - "resources": { | |
3 | - "$eapProtocolLevel": { | |
4 | - "id": -3, | |
5 | - "align": 2, | |
6 | - "attributes": {"readonly": true}, | |
7 | - "type": "u2", | |
8 | - "access": "r", | |
9 | - "size": 2 | |
10 | - }, | |
11 | - "numBytes": { | |
12 | - "id": 1, | |
13 | - "align": 1, | |
14 | - "attributes": {}, | |
15 | - "type": "u1", | |
16 | - "access": "rw", | |
17 | - "size": 1 | |
18 | - }, | |
19 | - "data": { | |
20 | - "id": 2, | |
21 | - "align": 1, | |
22 | - "attributes": {}, | |
23 | - "type": "C:229", | |
24 | - "access": "rw", | |
25 | - "size": 229 | |
26 | - }, | |
27 | - "$activeGroup": { | |
28 | - "id": -10, | |
29 | - "align": 1, | |
30 | - "pack": 1, | |
31 | - "attributes": {"readwrite": true}, | |
32 | - "type": "E:system@emmoco.com.System/ParameterGroup", | |
33 | - "access": "rw", | |
34 | - "size": 1 | |
35 | - }, | |
36 | - "$mcmDisconnect": { | |
37 | - "id": -9, | |
38 | - "align": 1, | |
39 | - "attributes": {"writeonly": true}, | |
40 | - "type": "u1", | |
41 | - "access": "w", | |
42 | - "size": 1 | |
43 | - }, | |
44 | - "$eapBuildDate": { | |
45 | - "dim": 8, | |
46 | - "id": -4, | |
47 | - "align": 1, | |
48 | - "attributes": {"readonly": true}, | |
49 | - "type": "A8:u1", | |
50 | - "access": "r", | |
51 | - "size": 8 | |
52 | - }, | |
53 | - "numPackets": { | |
54 | - "id": 3, | |
55 | - "align": 1, | |
56 | - "attributes": {}, | |
57 | - "type": "u1", | |
58 | - "access": "rw", | |
59 | - "size": 1 | |
60 | - }, | |
61 | - "$resourceCount": { | |
62 | - "id": -7, | |
63 | - "align": 1, | |
64 | - "attributes": {"readonly": true}, | |
65 | - "type": "S:system@emmoco.com.System/ResourceCount", | |
66 | - "access": "r", | |
67 | - "size": 2 | |
68 | - }, | |
69 | - "$schemaHash": { | |
70 | - "dim": 20, | |
71 | - "id": -6, | |
72 | - "align": 1, | |
73 | - "attributes": {"readonly": true}, | |
74 | - "type": "A20:u1", | |
75 | - "access": "r", | |
76 | - "size": 20 | |
77 | - }, | |
78 | - "messageAvailable": { | |
79 | - "id": 4, | |
80 | - "align": 1, | |
81 | - "pack": 1, | |
82 | - "attributes": {"indicator": true}, | |
83 | - "type": "E:@emmoco.com.DUREX/BOOLEAN", | |
84 | - "access": "ir", | |
85 | - "size": 1 | |
86 | - }, | |
87 | - "$mcmProtocolLevel": { | |
88 | - "id": -2, | |
89 | - "align": 2, | |
90 | - "attributes": {"readonly": true}, | |
91 | - "type": "u2", | |
92 | - "access": "r", | |
93 | - "size": 2 | |
94 | - }, | |
95 | - "$mobileRssi": { | |
96 | - "id": -8, | |
97 | - "align": 1, | |
98 | - "attributes": {"readonly": true}, | |
99 | - "type": "i1", | |
100 | - "access": "r", | |
101 | - "size": 1 | |
102 | - }, | |
103 | - "$fileIndexReset": { | |
104 | - "id": -5, | |
105 | - "align": 2, | |
106 | - "attributes": {"writeonly": true}, | |
107 | - "type": "i2", | |
108 | - "access": "w", | |
109 | - "size": 2 | |
110 | - } | |
111 | - }, | |
112 | - "resourceNamesSys": [ | |
113 | - "$activeGroup", | |
114 | - "$eapBuildDate", | |
115 | - "$eapProtocolLevel", | |
116 | - "$fileIndexReset", | |
117 | - "$mcmDisconnect", | |
118 | - "$mcmProtocolLevel", | |
119 | - "$mobileRssi", | |
120 | - "$resourceCount", | |
121 | - "$schemaHash" | |
122 | - ], | |
123 | - "manifest": { | |
124 | - "protocolLevel": 13, | |
125 | - "hash": [ | |
126 | - 28, | |
127 | - 106, | |
128 | - 83, | |
129 | - 11, | |
130 | - 248, | |
131 | - 159, | |
132 | - 192, | |
133 | - 243, | |
134 | - 66, | |
135 | - 193, | |
136 | - 233, | |
137 | - 148, | |
138 | - 55, | |
139 | - 208, | |
140 | - 191, | |
141 | - 77 | |
142 | - ], | |
143 | - "toolVersion": "13.4.1.201311121909", | |
144 | - "name": "DUREX", | |
145 | - "$$md5": "1c6a530bf89fc0f342c1e99437d0bf4d", | |
146 | - "build": [ | |
147 | - 208, | |
148 | - 202, | |
149 | - 48, | |
150 | - 251, | |
151 | - 69, | |
152 | - 1, | |
153 | - 0, | |
154 | - 0 | |
155 | - ], | |
156 | - "date": "2014-05-14T16:44:10T", | |
157 | - "maxAlign": 2, | |
158 | - "maxSize": 229, | |
159 | - "version": "1.0.0" | |
160 | - }, | |
161 | - "resourceNames": [ | |
162 | - "numBytes", | |
163 | - "data", | |
164 | - "numPackets", | |
165 | - "messageAvailable", | |
166 | - "$mcmProtocolLevel", | |
167 | - "$eapProtocolLevel", | |
168 | - "$eapBuildDate", | |
169 | - "$fileIndexReset", | |
170 | - "$schemaHash", | |
171 | - "$resourceCount", | |
172 | - "$mobileRssi", | |
173 | - "$mcmDisconnect", | |
174 | - "$activeGroup" | |
175 | - ], | |
176 | - "attributes": { | |
177 | - "description": "", | |
178 | - "version": "1.0.0" | |
179 | - }, | |
180 | - "resourceNamesApp": [ | |
181 | - "numBytes", | |
182 | - "data", | |
183 | - "numPackets", | |
184 | - "messageAvailable" | |
185 | - ], | |
186 | - "types": { | |
187 | - "system@emmoco.com.System/ResourceCount": { | |
188 | - "packed": false, | |
189 | - "align": 1, | |
190 | - "type": "S:system@emmoco.com.System/ResourceCount", | |
191 | - "size": 2, | |
192 | - "fields": [ | |
193 | - { | |
194 | - "pad": 0, | |
195 | - "align": 1, | |
196 | - "name": "app", | |
197 | - "type": "u1", | |
198 | - "size": 1 | |
199 | - }, | |
200 | - { | |
201 | - "pad": 0, | |
202 | - "align": 1, | |
203 | - "name": "sys", | |
204 | - "type": "u1", | |
205 | - "size": 1 | |
206 | - } | |
207 | - ] | |
208 | - }, | |
209 | - "std:i2": { | |
210 | - "align": 2, | |
211 | - "size": 2 | |
212 | - }, | |
213 | - "std:i1": { | |
214 | - "align": 1, | |
215 | - "size": 1 | |
216 | - }, | |
217 | - "std:u1": { | |
218 | - "align": 1, | |
219 | - "size": 1 | |
220 | - }, | |
221 | - "@emmoco.com.DUREX/BOOLEAN": { | |
222 | - "values": [ | |
223 | - "TRUE", | |
224 | - "FALSE" | |
225 | - ], | |
226 | - "align": 1, | |
227 | - "pack": 1, | |
228 | - "type": "E:@emmoco.com.DUREX/BOOLEAN", | |
229 | - "size": 1 | |
230 | - }, | |
231 | - "system@emmoco.com.System/ParameterGroup": { | |
232 | - "values": [ | |
233 | - "GROUP_A", | |
234 | - "GROUP_B" | |
235 | - ], | |
236 | - "align": 1, | |
237 | - "pack": 1, | |
238 | - "type": "E:system@emmoco.com.System/ParameterGroup", | |
239 | - "size": 1 | |
240 | - }, | |
241 | - "std:u2": { | |
242 | - "align": 2, | |
243 | - "size": 2 | |
244 | - } | |
245 | - }, | |
246 | - "imports": {"@emmoco.com.DUREX": true} | |
247 | -} | |
248 | 0 | \ No newline at end of file |
DUREX/Schema-Imports/system@emmoco.com/System.ems deleted
1 | -owner = "system@emmoco.com" | |
2 | - | |
3 | -schema System { | |
4 | - | |
5 | - // protocolLevel #13 | |
6 | - | |
7 | - enum ParameterGroup { | |
8 | - GROUP_A, GROUP_B | |
9 | - } | |
10 | - | |
11 | - // protocolLevel #1 | |
12 | - | |
13 | - uint8 $schemaUuid[16] { // protocolLevel #10 -- invisible to applications | |
14 | - readonly | |
15 | - } | |
16 | - | |
17 | - uint16 $mcmProtocolLevel { | |
18 | - readonly | |
19 | - } | |
20 | - | |
21 | - uint16 $eapProtocolLevel { | |
22 | - readonly | |
23 | - } | |
24 | - | |
25 | - uint8 $eapBuildDate[8] { // protocolLevel #5 -- rename from $eapBuildNumber | |
26 | - readonly | |
27 | - } | |
28 | - | |
29 | - // protocolLevel #2 | |
30 | - | |
31 | - int16 $fileIndexReset { | |
32 | - writeonly | |
33 | - } | |
34 | - | |
35 | - // protocolLevel #5 | |
36 | - | |
37 | - // protocolLevel #12 -- increase size to 20 | |
38 | - | |
39 | - uint8 $schemaHash[20] { | |
40 | - readonly | |
41 | - } | |
42 | - | |
43 | - // protocolLevel #7 | |
44 | - | |
45 | - struct ResourceCount { | |
46 | - uint8 app | |
47 | - uint8 sys | |
48 | - } | |
49 | - | |
50 | - ResourceCount $resourceCount { | |
51 | - readonly | |
52 | - } | |
53 | - | |
54 | - // protocolLevel #9 | |
55 | - | |
56 | - int8 $mobileRssi { | |
57 | - readonly | |
58 | - } | |
59 | - | |
60 | - // protocolLevel #11 | |
61 | - | |
62 | - uint8 $mcmDisconnect { | |
63 | - writeonly | |
64 | - } | |
65 | - | |
66 | - // protocolLevel #13 | |
67 | - | |
68 | - ParameterGroup $activeGroup { | |
69 | - readwrite | |
70 | - } | |
71 | - | |
72 | -} |
DUREX/bundle.properties deleted
1 | -# generated file - do not edit | |
2 | - | |
3 | -bundle.requires = com.emmoco.schema.translator | |
4 | -com.emmoco.framework.Properties.applicationDirectory = Em | |
5 | -com.emmoco.framework.Properties.schemaDestinationDirectory = Em | |
6 | -com.emmoco.framework.Properties.serverAPIToken = | |
7 | -com.emmoco.framework.Properties.align16 = 2 | |
8 | -com.emmoco.framework.Properties.align32 = 4 | |
9 | -com.emmoco.framework.Properties.schemaFile = /Users/imanol/devel/durex/DUREX/schema.ems | |
10 | -com.emmoco.framework.Properties.toolVersion = 13.4.1.201311121909 |
DUREX/imports/system@emmoco.com/System.ems deleted
1 | -owner = "system@emmoco.com" | |
2 | - | |
3 | -schema System { | |
4 | - | |
5 | - // protocolLevel #1 | |
6 | - | |
7 | - uint8 $schemaUuid[16] { // protocolLevel #10 -- invisible to applications | |
8 | - readonly | |
9 | - } | |
10 | - | |
11 | - uint16 $mcmProtocolLevel { | |
12 | - readonly | |
13 | - } | |
14 | - | |
15 | - uint16 $eapProtocolLevel { | |
16 | - readonly | |
17 | - } | |
18 | - | |
19 | - uint8 $eapBuildDate[8] { // protocolLevel #5 -- rename from $eapBuildNumber | |
20 | - readonly | |
21 | - } | |
22 | - | |
23 | - // protocolLevel #2 | |
24 | - | |
25 | - int16 $fileIndexReset { | |
26 | - writeonly | |
27 | - } | |
28 | - | |
29 | - // protocolLevel #5 | |
30 | - | |
31 | - // protocolLevel #12 -- increase size to 20 | |
32 | - | |
33 | - uint8 $schemaHash[20] { | |
34 | - readonly | |
35 | - } | |
36 | - | |
37 | - // protocolLevel #7 | |
38 | - | |
39 | - struct ResourceCount { | |
40 | - uint8 app | |
41 | - uint8 sys | |
42 | - } | |
43 | - | |
44 | - ResourceCount $resourceCount { | |
45 | - readonly | |
46 | - } | |
47 | - | |
48 | - // protocolLevel #9 | |
49 | - | |
50 | - int8 $mobileRssi { | |
51 | - readonly | |
52 | - } | |
53 | - | |
54 | - // protocolLevel #11 | |
55 | - | |
56 | - uint8 $mcmDisconnect { | |
57 | - writeonly | |
58 | - } | |
59 | - | |
60 | -} |
DUREX/out/DUREX-TODO.c deleted
1 | -/**** DO NOT EDIT -- this file has been automatically generated from @emmoco.com.DUREX on 2014-05-14T13:18:01T ****/ | |
2 | -/**** protocolLevel = 12, toolsVersion = 12.0.0.201211010336 ****/ | |
3 | - | |
4 | -#include "DUREX.h" | |
5 | - | |
6 | -#ifdef Em_DUREX_TODO /* enables optional inclusion of empty functions */ | |
7 | - | |
8 | -/* Copy the function skeletons below into your own DUREX.c source file */ | |
9 | - | |
10 | -void DUREX_connectHandler(void) { | |
11 | - /* TODO: application is now connected */ | |
12 | -} | |
13 | - | |
14 | -void DUREX_disconnectHandler(void) { | |
15 | - /* TODO: application is now disconnected */ | |
16 | -} | |
17 | - | |
18 | -void DUREX_numBytes_fetch(DUREX_numBytes_t* const output) { | |
19 | - /* TODO: write resource 'numBytes' into 'output' */ | |
20 | -} | |
21 | - | |
22 | -void DUREX_numBytes_store(DUREX_numBytes_t* const input) { | |
23 | - /* TODO: read resource 'numBytes' from 'input' */ | |
24 | -} | |
25 | - | |
26 | -void DUREX_data_fetch(DUREX_data_t* const output) { | |
27 | - /* TODO: write resource 'data' into 'output' */ | |
28 | -} | |
29 | - | |
30 | -void DUREX_data_store(DUREX_data_t* const input) { | |
31 | - /* TODO: read resource 'data' from 'input' */ | |
32 | -} | |
33 | - | |
34 | -void DUREX_numPackets_fetch(DUREX_numPackets_t* const output) { | |
35 | - /* TODO: write resource 'numPackets' into 'output' */ | |
36 | -} | |
37 | - | |
38 | -void DUREX_numPackets_store(DUREX_numPackets_t* const input) { | |
39 | - /* TODO: read resource 'numPackets' from 'input' */ | |
40 | -} | |
41 | - | |
42 | -void DUREX_messageAvailable_fetch(DUREX_messageAvailable_t* const output) { | |
43 | - /* TODO: write resource 'messageAvailable' into 'output' */ | |
44 | -} | |
45 | - | |
46 | -void DUREX_messageAvailable_store(DUREX_messageAvailable_t* const input) { | |
47 | - /* TODO: read resource 'messageAvailable' from 'input' */ | |
48 | -} | |
49 | - | |
50 | -#endif /* dummy file */ |
DUREX/out/DUREX.c deleted
1 | -/**** DO NOT EDIT -- this file has been automatically generated from @emmoco.com.DUREX on 2014-05-14T13:18:01T ****/ | |
2 | -/**** protocolLevel = 12, toolsVersion = 12.0.0.201211010336 ****/ | |
3 | - | |
4 | -#include "Em_Message.h" | |
5 | -#include "DUREX.h" | |
6 | - | |
7 | -#ifdef __cplusplus | |
8 | -extern "C" { | |
9 | -#endif | |
10 | - | |
11 | -#define Em_Message_protocolLevel 12 | |
12 | - | |
13 | -typedef struct Em_App_Message { | |
14 | - uint8_t dummy; | |
15 | - uint8_t sot; | |
16 | - Em_Message_Header hdr; | |
17 | - uint8_t data[229]; | |
18 | -} Em_App_Message; | |
19 | - | |
20 | -const uint8_t Em_App_hash[] = {245, 13, 216, 92, 22, 189, 34, 32, 16, 124, 194, 50, 87, 152, 227, 110, 12, 0, ((sizeof(struct{uint8_t f1; uint16_t f2;}) - sizeof(uint16_t)) << 4) | (sizeof(struct{uint8_t f1; uint32_t f2;}) - sizeof(uint32_t))}; | |
21 | - | |
22 | -const uint8_t Em_App_build[] = {61, 15, 116, 250, 69, 1, 0, 0}; | |
23 | - | |
24 | -#define Em_App_APP_RESOURCE_COUNT 4 | |
25 | -#define Em_App_SYS_RESOURCE_COUNT 8 | |
26 | - | |
27 | -#define Em_App_ACCEPT DUREX_accept | |
28 | -#define Em_App_DISCONNECT DUREX_disconnect | |
29 | -#define Em_App_PAIRINGON DUREX_pairingOn | |
30 | -#define Em_App_PAIRINGOFF DUREX_pairingOff | |
31 | -#define Em_App_RESET DUREX_reset | |
32 | -#define Em_App_RUN DUREX_run | |
33 | - | |
34 | -#define Em_App_CONNECTHANDLER DUREX_connectHandler | |
35 | -#define Em_App_DISCONNECTHANDLER DUREX_disconnectHandler | |
36 | - | |
37 | -#define Em_App_MAX_INDICATOR 2 | |
38 | - | |
39 | -enum {Em_App_IDLE, Em_App_DISCONNECTED, Em_App_CONNECTED}; | |
40 | - | |
41 | -typedef struct Em_App_Indicator { | |
42 | - uint8_t dummy; | |
43 | - uint8_t sot; | |
44 | - Em_Message_Header hdr; | |
45 | - uint8_t data[Em_Message_INDSIZE]; | |
46 | -} Em_App_Indicator; | |
47 | - | |
48 | -void (*Em_App_pdHdlr)(void); | |
49 | - | |
50 | -const uint16_t Em_App_endian = 0x0100; | |
51 | - | |
52 | -Em_Message_Size Em_App_recvIdx; | |
53 | -Em_Message_Size Em_App_recvSize; | |
54 | -Em_Message_Size Em_App_xmitIdx; | |
55 | -Em_Message_Size Em_App_xmitSize; | |
56 | - | |
57 | -uint8_t Em_App_state = Em_App_IDLE; | |
58 | -Em_App_Message Em_App_msg; | |
59 | -Em_App_Indicator Em_App_ind; | |
60 | -bool Em_App_moreData = false; | |
61 | -bool Em_App_readIdle = true; | |
62 | -int32_t Em_App_fileIndex; | |
63 | -uint32_t Em_App_xmitMask; | |
64 | - | |
65 | -uint8_t* Em_App_inBuf = (uint8_t*)&Em_App_msg.hdr; | |
66 | -uint8_t* Em_App_outBuf; | |
67 | - | |
68 | -void Em_App_fetchDispatch(void); | |
69 | -void Em_App_storeDispatch(void); | |
70 | -void Em_App_sendIndicator(Em_Message_ResId indId); | |
71 | -void Em_App_sendResponse(Em_Message_Kind kind, Em_Message_Size size); | |
72 | -void Em_App_startIndSend(void); | |
73 | -void Em_App_startResSend(void); | |
74 | -void Em_App_sysFetchDispatch(void); | |
75 | -void Em_App_sysStoreDispatch(void); | |
76 | -bool Em_App_xmitReady(Em_Message_ResId indId); | |
77 | - | |
78 | -bool Em_Message_addByte(uint8_t b) { | |
79 | - if (Em_App_readIdle && b) { | |
80 | - Em_App_recvSize = Em_App_inBuf[0] = b; | |
81 | - Em_App_recvIdx = 1; | |
82 | - Em_App_readIdle = false; | |
83 | - return false; | |
84 | - } | |
85 | - Em_App_inBuf[Em_App_recvIdx++] = b; | |
86 | - if (Em_App_recvIdx < Em_App_recvSize) { | |
87 | - return false; | |
88 | - } | |
89 | - Em_App_readIdle = true; | |
90 | - return true; | |
91 | -} | |
92 | - | |
93 | -bool Em_Message_getByte(uint8_t* bp) { | |
94 | - uint8_t key = Em_Message_lock(); | |
95 | - Em_App_moreData = (Em_App_xmitSize != 0); | |
96 | - if (!Em_App_moreData && (Em_App_xmitMask != 0)) { | |
97 | - uint8_t i; | |
98 | - uint32_t m; | |
99 | - for (i = 0, m = 0x1; i < Em_App_MAX_INDICATOR; i++, m <<= 1) { | |
100 | - if (Em_App_xmitMask & m) { | |
101 | - Em_App_xmitMask &= ~m; | |
102 | - if (i == 0) { | |
103 | - Em_App_startResSend(); | |
104 | - } | |
105 | - else { | |
106 | - Em_App_sendIndicator(i); | |
107 | - } | |
108 | - break; | |
109 | - } | |
110 | - } | |
111 | - Em_Message_unlock(key); | |
112 | - return false; | |
113 | - } | |
114 | - else if (Em_App_moreData) { | |
115 | - *bp = Em_App_outBuf[Em_App_xmitIdx++]; | |
116 | - Em_App_xmitSize -= 1; | |
117 | - } | |
118 | - Em_Message_unlock(key); | |
119 | - return Em_App_moreData; | |
120 | -} | |
121 | - | |
122 | -void Em_App_ACCEPT(bool enable) { | |
123 | - if (Em_App_state == Em_App_CONNECTED) { | |
124 | - return; | |
125 | - } | |
126 | - Em_App_ind.sot = 0; | |
127 | - Em_App_ind.hdr.kind = Em_Message_ACCEPT; | |
128 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
129 | - Em_App_ind.hdr.resId = enable; | |
130 | - Em_App_startIndSend(); | |
131 | -} | |
132 | - | |
133 | -void Em_App_DISCONNECT(void) { | |
134 | - if (Em_App_state != Em_App_CONNECTED) { | |
135 | - return; | |
136 | - } | |
137 | - Em_App_state = Em_App_DISCONNECTED; | |
138 | - Em_App_ind.sot = 0; | |
139 | - Em_App_ind.hdr.kind = Em_Message_DISCONNECT; | |
140 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
141 | - Em_App_ind.hdr.resId = 0; | |
142 | - Em_App_startIndSend(); | |
143 | -} | |
144 | - | |
145 | -void Em_Message_dispatch(void) { | |
146 | - if (Em_App_state == Em_App_IDLE) { | |
147 | - return; | |
148 | - } | |
149 | - switch (Em_App_msg.hdr.kind) { | |
150 | - case Em_Message_CONNECT: | |
151 | - Em_App_state = Em_App_CONNECTED; | |
152 | - Em_App_CONNECTHANDLER(); | |
153 | - break; | |
154 | - case Em_Message_DISCONNECT: | |
155 | - Em_App_state = Em_App_DISCONNECTED; | |
156 | - Em_App_DISCONNECTHANDLER(); | |
157 | - break; | |
158 | - case Em_Message_PAIRING_DONE: | |
159 | - if (Em_App_pdHdlr) { | |
160 | - (*Em_App_pdHdlr)(); | |
161 | - } | |
162 | - break; | |
163 | - case Em_Message_FETCH: | |
164 | - if (Em_App_msg.hdr.resId > 0) { | |
165 | - Em_App_fetchDispatch(); | |
166 | - } | |
167 | - else { | |
168 | - Em_App_sysFetchDispatch(); | |
169 | - } | |
170 | - break; | |
171 | - case Em_Message_STORE: | |
172 | - if (Em_App_msg.hdr.resId > 0) { | |
173 | - Em_App_storeDispatch(); | |
174 | - } | |
175 | - else { | |
176 | - Em_App_sysStoreDispatch(); | |
177 | - } | |
178 | - break; | |
179 | - } | |
180 | -} | |
181 | - | |
182 | -void Em_App_PAIRINGOFF(void(*handler)(void)) { | |
183 | - Em_App_PAIRINGON(0, handler); | |
184 | -} | |
185 | - | |
186 | -void Em_App_PAIRINGON(uint8_t secs, void(*handler)(void)) { | |
187 | - if (Em_App_state != Em_App_DISCONNECTED) { | |
188 | - return; | |
189 | - } | |
190 | - Em_App_pdHdlr = handler; | |
191 | - Em_App_ind.sot = 0; | |
192 | - Em_App_ind.hdr.kind = Em_Message_PAIRING; | |
193 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header); | |
194 | - Em_App_ind.hdr.resId = secs; | |
195 | - Em_App_startIndSend(); | |
196 | -} | |
197 | - | |
198 | -void Em_App_RESET(void) { | |
199 | - Em_App_recvIdx = Em_App_recvSize = Em_App_xmitIdx = Em_App_xmitSize = 0; | |
200 | - Em_App_state = Em_App_IDLE; | |
201 | - Em_App_moreData = false; | |
202 | - Em_App_readIdle = true; | |
203 | - Em_App_fileIndex = 0; | |
204 | - Em_App_xmitMask = 0; | |
205 | -} | |
206 | - | |
207 | -void Em_App_RUN(void) { | |
208 | - Em_App_state = Em_App_DISCONNECTED; | |
209 | -} | |
210 | - | |
211 | -void Em_App_sendResponse(Em_Message_Kind kind, Em_Message_Size size) { | |
212 | - if (Em_App_state != Em_App_CONNECTED) { | |
213 | - return; | |
214 | - } | |
215 | - Em_App_msg.sot = 0; | |
216 | - Em_App_msg.hdr.kind = kind; | |
217 | - Em_App_msg.hdr.size = size + sizeof (Em_Message_Header); | |
218 | - if (Em_App_xmitReady(0)) { | |
219 | - Em_App_startResSend(); | |
220 | - } | |
221 | -} | |
222 | - | |
223 | -void Em_App_startIndSend(void) { | |
224 | - Em_App_outBuf = (uint8_t*)&Em_App_ind.sot; | |
225 | - Em_App_xmitSize = Em_App_ind.hdr.size + 1; | |
226 | - Em_App_xmitIdx = 0; | |
227 | - Em_Message_startSend(); | |
228 | -} | |
229 | - | |
230 | -void Em_App_startResSend(void) { | |
231 | - Em_App_outBuf = (uint8_t*)&Em_App_msg.sot; | |
232 | - Em_App_xmitSize = Em_App_msg.hdr.size + 1; | |
233 | - Em_App_xmitIdx = 0; | |
234 | - Em_Message_startSend(); | |
235 | -} | |
236 | - | |
237 | -void Em_App_sysFetchDispatch(void) { | |
238 | - uint8_t size = 0; | |
239 | - int i; | |
240 | - switch (Em_App_msg.hdr.resId) { | |
241 | - case Em_Message_SYS_SCHEMA_HASH: | |
242 | - for (i = 0; i < sizeof (Em_App_hash); i++) { | |
243 | - Em_App_msg.data[i] = Em_App_hash[i]; | |
244 | - } | |
245 | - Em_App_msg.data[sizeof (Em_App_hash)] = *((uint8_t*)&Em_App_endian); | |
246 | - size = sizeof (Em_App_hash) + 1; | |
247 | - break; | |
248 | - case Em_Message_SYS_EAP_PROTOCOL_LEVEL: | |
249 | - *((Em_Message_protocolLevel_t*)Em_App_msg.data) = Em_Message_protocolLevel; | |
250 | - size = sizeof (Em_Message_protocolLevel_t); | |
251 | - break; | |
252 | - case Em_Message_SYS_EAP_BUILD_DATE: | |
253 | - for (i = 0; i < sizeof (Em_App_build); i++) { | |
254 | - Em_App_msg.data[i] = Em_App_build[i]; | |
255 | - } | |
256 | - size = sizeof (Em_App_build); | |
257 | - break; | |
258 | - case Em_Message_SYS_RESOURCE_COUNT: | |
259 | - Em_App_msg.data[0] = Em_App_APP_RESOURCE_COUNT; | |
260 | - Em_App_msg.data[1] = Em_App_SYS_RESOURCE_COUNT; | |
261 | - size = 2; | |
262 | - break; | |
263 | - } | |
264 | - Em_App_sendResponse(Em_Message_FETCH_DONE, size); | |
265 | -} | |
266 | - | |
267 | -void Em_App_sysStoreDispatch(void) { | |
268 | - switch (Em_App_msg.hdr.resId) { | |
269 | - case Em_Message_SYS_FILE_INDEX_RESET: | |
270 | - Em_App_fileIndex = 0; | |
271 | - break; | |
272 | - } | |
273 | - Em_App_sendResponse(Em_Message_STORE_DONE, 0); | |
274 | -} | |
275 | - | |
276 | -bool Em_App_xmitReady(Em_Message_ResId indId) { | |
277 | - uint8_t key = Em_Message_lock(); | |
278 | - bool res = !Em_App_moreData && Em_App_xmitMask == 0; | |
279 | - if (!res) { | |
280 | - Em_App_xmitMask |= (1 << indId); | |
281 | - } | |
282 | - Em_Message_unlock(key); | |
283 | - return res; | |
284 | -} | |
285 | - | |
286 | -void Em_App_fetchDispatch(void) { | |
287 | - uint8_t size = 0; | |
288 | - switch (Em_App_msg.hdr.resId) { | |
289 | - case 0: | |
290 | - break; | |
291 | - case 1: | |
292 | - DUREX_numBytes_fetch((DUREX_numBytes_t*)Em_App_msg.data); | |
293 | - size = 1; | |
294 | - break; | |
295 | - case 2: | |
296 | - DUREX_data_fetch((DUREX_data_t*)Em_App_msg.data); | |
297 | - size = 229; | |
298 | - break; | |
299 | - case 3: | |
300 | - DUREX_numPackets_fetch((DUREX_numPackets_t*)Em_App_msg.data); | |
301 | - size = 1; | |
302 | - break; | |
303 | - case 4: | |
304 | - DUREX_messageAvailable_fetch((DUREX_messageAvailable_t*)Em_App_msg.data); | |
305 | - size = 1; | |
306 | - break; | |
307 | - } | |
308 | - Em_App_sendResponse(Em_Message_FETCH_DONE, size); | |
309 | -} | |
310 | - | |
311 | -void Em_App_storeDispatch(void) { | |
312 | - switch (Em_App_msg.hdr.resId) { | |
313 | - case 0: | |
314 | - break; | |
315 | - case 1: | |
316 | - DUREX_numBytes_store((DUREX_numBytes_t*)Em_App_msg.data); | |
317 | - break; | |
318 | - case 2: | |
319 | - DUREX_data_store((DUREX_data_t*)Em_App_msg.data); | |
320 | - break; | |
321 | - case 3: | |
322 | - DUREX_numPackets_store((DUREX_numPackets_t*)Em_App_msg.data); | |
323 | - break; | |
324 | - case 4: | |
325 | - DUREX_messageAvailable_store((DUREX_messageAvailable_t*)Em_App_msg.data); | |
326 | - break; | |
327 | - } | |
328 | - Em_App_sendResponse(Em_Message_STORE_DONE, 0); | |
329 | -} | |
330 | - | |
331 | -void Em_App_sendIndicator(Em_Message_ResId indId) { | |
332 | - Em_Message_Size resId = 0; | |
333 | - Em_Message_Size size = 0; | |
334 | - switch (indId) { | |
335 | - case 1: | |
336 | - DUREX_messageAvailable_fetch((DUREX_messageAvailable_t*)&Em_App_ind.data); | |
337 | - resId = 4; | |
338 | - size = 1; | |
339 | - break; | |
340 | -} | |
341 | - Em_App_ind.sot = 0; | |
342 | - Em_App_ind.hdr.kind = Em_Message_INDICATOR; | |
343 | - Em_App_ind.hdr.size = sizeof (Em_Message_Header) + size; | |
344 | - Em_App_ind.hdr.resId = resId; | |
345 | - Em_App_startIndSend(); | |
346 | -} | |
347 | - | |
348 | -void DUREX_messageAvailable_indicate(void) { | |
349 | - if (Em_App_state != Em_App_IDLE && Em_App_xmitReady(1)) Em_App_sendIndicator(1); | |
350 | -} | |
351 | - | |
352 | -#ifdef __cplusplus | |
353 | -} | |
354 | -#endif | |
355 | - |
DUREX/out/DUREX.h deleted
1 | -/**** DO NOT EDIT -- this file has been automatically generated from @emmoco.com.DUREX on 2014-05-14T13:18:01T ****/ | |
2 | -/**** protocolLevel = 12, toolsVersion = 12.0.0.201211010336 ****/ | |
3 | - | |
4 | -#ifndef DUREX__H | |
5 | -#define DUREX__H | |
6 | - | |
7 | -#include "Em_Types.h" | |
8 | -#include "Em_Message.h" | |
9 | - | |
10 | -#ifdef __cplusplus | |
11 | -extern "C" { | |
12 | -#endif | |
13 | - | |
14 | -/* typedef String */ | |
15 | -typedef char DUREX_String; | |
16 | -#define DUREX_String_length 229 | |
17 | - | |
18 | -/* enum BOOLEAN */ | |
19 | -typedef uint8_t DUREX_BOOLEAN; | |
20 | -#define DUREX_TRUE 0 | |
21 | -#define DUREX_FALSE 1 | |
22 | - | |
23 | -/* resource numBytes */ | |
24 | -typedef uint8_t DUREX_numBytes_t; | |
25 | -extern void DUREX_numBytes_fetch(DUREX_numBytes_t* const output); | |
26 | -extern void DUREX_numBytes_store(DUREX_numBytes_t* const input); | |
27 | - | |
28 | -/* resource data */ | |
29 | -typedef DUREX_String DUREX_data_t[229]; | |
30 | -extern void DUREX_data_fetch(DUREX_data_t* const output); | |
31 | -extern void DUREX_data_store(DUREX_data_t* const input); | |
32 | - | |
33 | -/* resource numPackets */ | |
34 | -typedef uint8_t DUREX_numPackets_t; | |
35 | -extern void DUREX_numPackets_fetch(DUREX_numPackets_t* const output); | |
36 | -extern void DUREX_numPackets_store(DUREX_numPackets_t* const input); | |
37 | - | |
38 | -/* resource messageAvailable */ | |
39 | -typedef DUREX_BOOLEAN DUREX_messageAvailable_t; | |
40 | -extern void DUREX_messageAvailable_fetch(DUREX_messageAvailable_t* const output); | |
41 | -extern void DUREX_messageAvailable_store(DUREX_messageAvailable_t* const input); | |
42 | -extern void DUREX_messageAvailable_indicate(void); | |
43 | - | |
44 | -void DUREX_reset(void); | |
45 | -void DUREX_run(void); | |
46 | - | |
47 | -void DUREX_accept(bool enable); | |
48 | -void DUREX_disconnect(void); | |
49 | -void DUREX_pairingOn(uint8_t secs, void(*handler)(void)); | |
50 | -void DUREX_pairingOff(void(*handler)(void)); | |
51 | - | |
52 | -void DUREX_connectHandler(void); | |
53 | -void DUREX_disconnectHandler(void); | |
54 | - | |
55 | -#ifdef __cplusplus | |
56 | -} | |
57 | -#endif | |
58 | - | |
59 | -#endif /* DUREX__H */ |
DUREX/out/DUREX.zip deleted
No preview for this file type
DUREX/out/Em_Message.h deleted
1 | -#ifndef Em_Message_H_ | |
2 | -#define Em_Message_H_ | |
3 | - | |
4 | -#include "Em_Types.h" | |
5 | - | |
6 | -#ifdef __cplusplus | |
7 | -extern "C" { | |
8 | -#endif | |
9 | - | |
10 | -/* protocolLevel #4 */ | |
11 | -#define Em_Message_INDSIZE 4 | |
12 | - | |
13 | -typedef uint8_t Em_Message_Size; | |
14 | -typedef uint8_t Em_Message_Kind; | |
15 | -/* protocolLevel #12 -- split 16-bit resId into <resId, chan> */ | |
16 | -typedef int8_t Em_Message_ResId; | |
17 | -typedef uint8_t Em_Message_Chan; | |
18 | - | |
19 | -#define Em_Message_NOP 0 | |
20 | -#define Em_Message_FETCH 1 | |
21 | -#define Em_Message_FETCH_DONE 2 | |
22 | -#define Em_Message_STORE 3 | |
23 | -#define Em_Message_STORE_DONE 4 | |
24 | -#define Em_Message_INDICATOR 5 | |
25 | -#define Em_Message_CONNECT 6 | |
26 | -#define Em_Message_DISCONNECT 7 | |
27 | -#define Em_Message_ECHO 8 | |
28 | -/* protocolLevel #3 */ | |
29 | -/* protocolLevel #6 -- rename from BROADCAST to PAIRING */ | |
30 | -#define Em_Message_PAIRING 9 | |
31 | -#define Em_Message_PAIRING_DONE 10 | |
32 | -/* protocolLevel #7 */ | |
33 | -#define Em_Message_OFFLINE 11 | |
34 | -/* protocolLevel #8 */ | |
35 | -#define Em_Message_ACCEPT 12 | |
36 | - | |
37 | -typedef struct Em_Message_Header { | |
38 | - Em_Message_Size size; | |
39 | - Em_Message_Kind kind; | |
40 | - Em_Message_ResId resId; | |
41 | - Em_Message_Chan chan; | |
42 | -} Em_Message_Header; | |
43 | - | |
44 | -typedef uint16_t Em_Message_protocolLevel_t; | |
45 | - | |
46 | -/* protocolLevel #1 */ | |
47 | - | |
48 | -/* protocolLevel #10 */ | |
49 | -/* #define Em_Message_SYS_SCHEMA_UUID -1 */ | |
50 | - | |
51 | -#define Em_Message_SYS_MCM_PROTOCOL_LEVEL -2 | |
52 | -#define Em_Message_SYS_EAP_PROTOCOL_LEVEL -3 | |
53 | -#define Em_Message_SYS_EAP_BUILD_DATE -4 | |
54 | - | |
55 | -/* protocolLevel #2 */ | |
56 | -#define Em_Message_SYS_FILE_INDEX_RESET -5 | |
57 | - | |
58 | -/* protocolLevel #5 */ | |
59 | -#define Em_Message_SYS_SCHEMA_HASH -6 | |
60 | - | |
61 | -/* protocolLevel #7 */ | |
62 | -#define Em_Message_SYS_RESOURCE_COUNT -7 | |
63 | - | |
64 | -/* protocolLevel #9 */ | |
65 | -#define Em_Message_SYS_MOBILE_RSSI -8 | |
66 | - | |
67 | -/* protocolLevel #11 */ | |
68 | -#define Em_Message_SYS_MCM_DISCONNECT -9 | |
69 | - | |
70 | -extern void Em_Message_init(void); | |
71 | - | |
72 | -extern bool Em_Message_addByte(uint8_t b); | |
73 | -extern void Em_Message_dispatch(void); | |
74 | -extern bool Em_Message_getByte(uint8_t *bp); | |
75 | -extern uint8_t Em_Message_lock(void); | |
76 | -extern void Em_Message_startSend(void); | |
77 | -extern void Em_Message_unlock(uint8_t key); | |
78 | - | |
79 | -#ifdef __cplusplus | |
80 | -} | |
81 | -#endif | |
82 | - | |
83 | -#endif /*Em_Message_H_*/ |
DUREX/out/Em_Types.h deleted
DUREX/out/durex.json deleted
1 | -{ | |
2 | - "resources": { | |
3 | - "$schemaHash": { | |
4 | - "id": -6, | |
5 | - "align": 1, | |
6 | - "attributes": {"readonly": true}, | |
7 | - "type": "A20:u1", | |
8 | - "access": "r", | |
9 | - "size": 20 | |
10 | - }, | |
11 | - "$eapProtocolLevel": { | |
12 | - "id": -3, | |
13 | - "align": 2, | |
14 | - "attributes": {"readonly": true}, | |
15 | - "type": "u2", | |
16 | - "access": "r", | |
17 | - "size": 2 | |
18 | - }, | |
19 | - "$mcmProtocolLevel": { | |
20 | - "id": -2, | |
21 | - "align": 2, | |
22 | - "attributes": {"readonly": true}, | |
23 | - "type": "u2", | |
24 | - "access": "r", | |
25 | - "size": 2 | |
26 | - }, | |
27 | - "messageAvailable": { | |
28 | - "id": 4, | |
29 | - "align": 1, | |
30 | - "attributes": {"indicator": true}, | |
31 | - "type": "E:@emmoco.com.DUREX/BOOLEAN", | |
32 | - "access": "irw", | |
33 | - "size": 1 | |
34 | - }, | |
35 | - "numBytes": { | |
36 | - "id": 1, | |
37 | - "align": 1, | |
38 | - "attributes": {}, | |
39 | - "type": "u1", | |
40 | - "access": "rw", | |
41 | - "size": 1 | |
42 | - }, | |
43 | - "$mobileRssi": { | |
44 | - "id": -8, | |
45 | - "align": 1, | |
46 | - "attributes": {"readonly": true}, | |
47 | - "type": "i1", | |
48 | - "access": "r", | |
49 | - "size": 1 | |
50 | - }, | |
51 | - "data": { | |
52 | - "id": 2, | |
53 | - "align": 1, | |
54 | - "attributes": {}, | |
55 | - "type": "C:229", | |
56 | - "access": "rw", | |
57 | - "size": 229 | |
58 | - }, | |
59 | - "$mcmDisconnect": { | |
60 | - "id": -9, | |
61 | - "align": 1, | |
62 | - "attributes": {"writeonly": true}, | |
63 | - "type": "u1", | |
64 | - "access": "w", | |
65 | - "size": 1 | |
66 | - }, | |
67 | - "$eapBuildDate": { | |
68 | - "id": -4, | |
69 | - "align": 1, | |
70 | - "attributes": {"readonly": true}, | |
71 | - "type": "A8:u1", | |
72 | - "access": "r", | |
73 | - "size": 8 | |
74 | - }, | |
75 | - "$resourceCount": { | |
76 | - "id": -7, | |
77 | - "align": 1, | |
78 | - "attributes": {"readonly": true}, | |
79 | - "type": "S:system@emmoco.com.System/ResourceCount", | |
80 | - "access": "r", | |
81 | - "size": 2 | |
82 | - }, | |
83 | - "numPackets": { | |
84 | - "id": 3, | |
85 | - "align": 1, | |
86 | - "attributes": {}, | |
87 | - "type": "u1", | |
88 | - "access": "rw", | |
89 | - "size": 1 | |
90 | - }, | |
91 | - "$fileIndexReset": { | |
92 | - "id": -5, | |
93 | - "align": 2, | |
94 | - "attributes": {"writeonly": true}, | |
95 | - "type": "i2", | |
96 | - "access": "w", | |
97 | - "size": 2 | |
98 | - } | |
99 | - }, | |
100 | - "resourceNamesSys": [ | |
101 | - "$eapBuildDate", | |
102 | - "$eapProtocolLevel", | |
103 | - "$fileIndexReset", | |
104 | - "$mcmDisconnect", | |
105 | - "$mcmProtocolLevel", | |
106 | - "$mobileRssi", | |
107 | - "$resourceCount", | |
108 | - "$schemaHash" | |
109 | - ], | |
110 | - "manifest": { | |
111 | - "protocolLevel": 12, | |
112 | - "hash": [ | |
113 | - 245, | |
114 | - 13, | |
115 | - 216, | |
116 | - 92, | |
117 | - 22, | |
118 | - 189, | |
119 | - 34, | |
120 | - 32, | |
121 | - 16, | |
122 | - 124, | |
123 | - 194, | |
124 | - 50, | |
125 | - 87, | |
126 | - 152, | |
127 | - 227, | |
128 | - 110 | |
129 | - ], | |
130 | - "toolVersion": "12.0.0.201211010336", | |
131 | - "name": "DUREX", | |
132 | - "$$md5": "f316f8e8839db2a2939bf3e0120a1fdf", | |
133 | - "build": [ | |
134 | - 61, | |
135 | - 15, | |
136 | - 116, | |
137 | - 250, | |
138 | - 69, | |
139 | - 1, | |
140 | - 0, | |
141 | - 0 | |
142 | - ], | |
143 | - "date": "2014-05-14T13:18:01T", | |
144 | - "maxAlign": 2, | |
145 | - "maxSize": 229, | |
146 | - "version": "1.0.0" | |
147 | - }, | |
148 | - "resourceNames": [ | |
149 | - "numBytes", | |
150 | - "data", | |
151 | - "numPackets", | |
152 | - "messageAvailable", | |
153 | - "$mcmProtocolLevel", | |
154 | - "$eapProtocolLevel", | |
155 | - "$eapBuildDate", | |
156 | - "$fileIndexReset", | |
157 | - "$schemaHash", | |
158 | - "$resourceCount", | |
159 | - "$mobileRssi", | |
160 | - "$mcmDisconnect" | |
161 | - ], | |
162 | - "attributes": { | |
163 | - "description": "", | |
164 | - "version": "1.0.0" | |
165 | - }, | |
166 | - "types": { | |
167 | - "system@emmoco.com.System/ResourceCount": { | |
168 | - "align": 1, | |
169 | - "type": "S:system@emmoco.com.System/ResourceCount", | |
170 | - "size": 2, | |
171 | - "fields": [ | |
172 | - { | |
173 | - "pad": 0, | |
174 | - "align": 1, | |
175 | - "name": "app", | |
176 | - "type": "u1", | |
177 | - "size": 1 | |
178 | - }, | |
179 | - { | |
180 | - "pad": 0, | |
181 | - "align": 1, | |
182 | - "name": "sys", | |
183 | - "type": "u1", | |
184 | - "size": 1 | |
185 | - } | |
186 | - ] | |
187 | - }, | |
188 | - "std:i2": { | |
189 | - "align": 2, | |
190 | - "size": 2 | |
191 | - }, | |
192 | - "std:i1": { | |
193 | - "align": 1, | |
194 | - "size": 1 | |
195 | - }, | |
196 | - "@emmoco.com.DUREX/BOOLEAN": { | |
197 | - "values": [ | |
198 | - "TRUE", | |
199 | - "FALSE" | |
200 | - ], | |
201 | - "align": 1, | |
202 | - "type": "E:@emmoco.com.DUREX/BOOLEAN", | |
203 | - "size": 1 | |
204 | - }, | |
205 | - "std:u1": { | |
206 | - "align": 1, | |
207 | - "size": 1 | |
208 | - }, | |
209 | - "std:u2": { | |
210 | - "align": 2, | |
211 | - "size": 2 | |
212 | - } | |
213 | - }, | |
214 | - "resourceNamesApp": [ | |
215 | - "data", | |
216 | - "messageAvailable", | |
217 | - "numBytes", | |
218 | - "numPackets" | |
219 | - ], | |
220 | - "imports": {"@emmoco.com.DUREX": true} | |
221 | -} | |
222 | 0 | \ No newline at end of file |
DUREX/schema.ems deleted
DUREXLaunchpad/.externalToolBuilders/DUREX LaunchPad Builder.launch deleted
1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
2 | -<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType"> | |
3 | -<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/> | |
4 | -<mapAttribute key="org.eclipse.debug.core.environmentVariables"> | |
5 | -<mapEntry key="PATH" value="${eclipse_home}/emmoco/msptools/bin${system_property:path.separator}${env_var:PATH}"/> | |
6 | -</mapAttribute> | |
7 | -<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> | |
8 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_BUILD_SCOPE" value="${working_set:<?xml version="1.0" encoding="UTF-8"?> <resources> <item path="/TesterLaunchPad/main.c" type="1"/> <item path="/TesterLaunchPad/main.out" type="1"/> <item path="/TesterLaunchPad/makefile" type="1"/> <item path="/TesterSchema/out/Tester.h" type="1"/> <item path="/TesterSchema/schema.ems" type="1"/> <item path="/CommonLaunchPad" type="4"/> </resources>}"/> | |
9 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}/emmoco/msptools/bin/gmake${exe_ext}"/> | |
10 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/> | |
11 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="all COMMON=${project_loc:/CommonLaunchPad} SCHEMA=${project_loc:/DUREX}"/> | |
12 | -<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> | |
13 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${project_loc}"/> | |
14 | -</launchConfiguration> |
DUREXLaunchpad/.externalToolBuilders/DUREX LaunchPad Cleaner.launch deleted
1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
2 | -<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType"> | |
3 | -<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" value="${project}"/> | |
4 | -<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> | |
5 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${eclipse_home}/emmoco/msptools/bin/gmake${exe_ext}"/> | |
6 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="clean"/> | |
7 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" value="local-clean COMMON=${project_loc:/CommonLaunchPad}"/> | |
8 | -<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> | |
9 | -<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${project_loc}"/> | |
10 | -</launchConfiguration> |
DUREXLaunchpad/.gitignore deleted
DUREXLaunchpad/.project deleted
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<projectDescription> | |
3 | - <name>DUREXLaunchpad</name> | |
4 | - <comment></comment> | |
5 | - <projects> | |
6 | - <project>DUREX</project> | |
7 | - </projects> | |
8 | - <buildSpec> | |
9 | - <buildCommand> | |
10 | - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> | |
11 | - <triggers>full,incremental,</triggers> | |
12 | - <arguments> | |
13 | - <dictionary> | |
14 | - <key>LaunchConfigHandle</key> | |
15 | - <value><project>/.externalToolBuilders/DUREX LaunchPad Builder.launch</value> | |
16 | - </dictionary> | |
17 | - </arguments> | |
18 | - </buildCommand> | |
19 | - <buildCommand> | |
20 | - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> | |
21 | - <triggers>clean,</triggers> | |
22 | - <arguments> | |
23 | - <dictionary> | |
24 | - <key>LaunchConfigHandle</key> | |
25 | - <value><project>/.externalToolBuilders/DUREX LaunchPad Cleaner.launch</value> | |
26 | - </dictionary> | |
27 | - </arguments> | |
28 | - </buildCommand> | |
29 | - </buildSpec> | |
30 | - <natures> | |
31 | - <nature>com.emmoco.mcmtooling.example.mcmToolingExampleNature</nature> | |
32 | - </natures> | |
33 | -</projectDescription> |
DUREXLaunchpad/.settings/org.eclipse.ltk.core.refactoring.prefs deleted
DUREXLaunchpad/DUREX.obj deleted
No preview for this file type
DUREXLaunchpad/Log/log.txt deleted
DUREXLaunchpad/main.c deleted
1 | -/* | |
2 | - * ============ Platform Configuration ============ | |
3 | - */ | |
4 | - | |
5 | -#include <msp430.h> | |
6 | - | |
7 | -#define EAP_RX_BUF UCA0RXBUF | |
8 | -#define EAP_TX_BUF UCA0TXBUF | |
9 | - | |
10 | -#define EAP_RX_VECTOR USCIAB0RX_VECTOR | |
11 | -#define EAP_TX_VECTOR PORT2_VECTOR | |
12 | - | |
13 | -#define EAP_RX_ACK_CONFIG() (P2DIR |= BIT0) | |
14 | -#define EAP_RX_ACK_SET() (P2OUT |= BIT0) | |
15 | -#define EAP_RX_ACK_CLR() (P2OUT &= ~BIT0) | |
16 | - | |
17 | -#define EAP_TX_INT_CONFIG() (P2DIR &= ~BIT1, P2IES |= BIT1, P2IFG &= BIT1, P2IE |= BIT1) | |
18 | -#define EAP_TX_INT_TST() (P2IFG & BIT1) | |
19 | -#define EAP_TX_INT_CLR() (P2IFG &= ~BIT1) | |
20 | - | |
21 | -void init(void) | |
22 | -{ | |
23 | - WDTCTL = WDTPW + WDTHOLD; | |
24 | - BCSCTL2 = SELM_0 + DIVM_0 + DIVS_0; | |
25 | - if (CALBC1_1MHZ != 0xFF) | |
26 | - { | |
27 | - DCOCTL = 0x00; | |
28 | - BCSCTL1 = CALBC1_1MHZ; /* Set DCO to 1MHz */ | |
29 | - DCOCTL = CALDCO_1MHZ; | |
30 | - } | |
31 | - BCSCTL1 |= XT2OFF + DIVA_0; | |
32 | - BCSCTL3 = XT2S_0 + LFXT1S_2 + XCAP_1; | |
33 | - | |
34 | - P1DIR |= BIT0 + BIT6; /* LED */ | |
35 | - P1OUT &= ~BIT0; | |
36 | - | |
37 | - UCA0CTL1 |= UCSWRST; | |
38 | - | |
39 | - P1SEL |= BIT1 + BIT2; | |
40 | - P1SEL2 |= BIT1 + BIT2; | |
41 | - | |
42 | - EAP_RX_ACK_CONFIG(); | |
43 | - EAP_RX_ACK_SET(); | |
44 | - | |
45 | - EAP_TX_INT_CONFIG(); | |
46 | - | |
47 | - UCA0CTL1 = UCSSEL_2 + UCSWRST; | |
48 | - UCA0MCTL = UCBRF_0 + UCBRS_6; | |
49 | - UCA0BR0 = 8; | |
50 | - UCA0CTL1 &= ~UCSWRST; | |
51 | - | |
52 | - IFG2 &= ~(UCA0RXIFG); | |
53 | - IE2 |= UCA0RXIE; | |
54 | - | |
55 | - __enable_interrupt(); | |
56 | -} | |
57 | - | |
58 | -/* | |
59 | - * ============ Serial Driver ============ | |
60 | - */ | |
61 | - | |
62 | -#include <Em_Message.h> | |
63 | - | |
64 | -__attribute__((interrupt(EAP_RX_VECTOR))) | |
65 | -static void rxHandler(void) | |
66 | -{ | |
67 | - uint8_t b = EAP_RX_BUF; | |
68 | - if (Em_Message_addByte(b)) | |
69 | - { | |
70 | - Em_Message_dispatch(); | |
71 | - } | |
72 | - EAP_RX_ACK_CLR(); | |
73 | - EAP_RX_ACK_SET(); | |
74 | -} | |
75 | - | |
76 | -__attribute__((interrupt(EAP_TX_VECTOR))) | |
77 | -static void txHandler(void) | |
78 | -{ | |
79 | - if (EAP_TX_INT_TST()) | |
80 | - { | |
81 | - uint8_t b; | |
82 | - if (Em_Message_getByte(&b)) | |
83 | - { | |
84 | - EAP_TX_BUF = b; | |
85 | - } | |
86 | - EAP_TX_INT_CLR(); | |
87 | - } | |
88 | -} | |
89 | - | |
90 | -void Em_Message_startSend() | |
91 | -{ | |
92 | - uint8_t b; | |
93 | - if (Em_Message_getByte(&b)) | |
94 | - { | |
95 | - UCA0TXBUF = b; | |
96 | - } | |
97 | -} | |
98 | - | |
99 | -uint8_t Em_Message_lock() | |
100 | -{ | |
101 | - uint8_t key; | |
102 | - asm ("MOV r2, %0": "=r" (key)); | |
103 | - key &= 0x8; | |
104 | - asm ("DINT"); | |
105 | - return key; | |
106 | -} | |
107 | - | |
108 | -void Em_Message_unlock(uint8_t key) | |
109 | -{ | |
110 | - if (key) | |
111 | - { | |
112 | - asm ("EINT"); | |
113 | - } | |
114 | - else | |
115 | - { | |
116 | - asm ("DINT"); | |
117 | - } | |
118 | -} | |
119 | - | |
120 | -/* | |
121 | - * Extra code and interrupts | |
122 | - */ | |
123 | - | |
124 | -void led0_toggle(void) | |
125 | -{ | |
126 | - P1OUT ^= BIT0; | |
127 | -} | |
128 | - | |
129 | -void led1_toggle(void) | |
130 | -{ | |
131 | - P1OUT ^= BIT6; | |
132 | -} | |
133 | - | |
134 | -void led0_on(void) | |
135 | -{ | |
136 | - P1OUT |= BIT0; | |
137 | -} | |
138 | - | |
139 | -void led0_off(void) | |
140 | -{ | |
141 | - P1OUT &= ~BIT0; | |
142 | -} | |
143 | - | |
144 | -void led1_on(void) | |
145 | -{ | |
146 | - P1OUT |= BIT6; | |
147 | -} | |
148 | - | |
149 | -void led1_off(void) | |
150 | -{ | |
151 | - P1OUT &= ~BIT6; | |
152 | -} | |
153 | - | |
154 | -__attribute__((interrupt(TIMER0_A0_VECTOR))) | |
155 | -static void Timer_A (void) | |
156 | -{ | |
157 | - led0_toggle(); // Toggle LED | |
158 | - //led1_toggle(); | |
159 | -} | |
160 | - | |
161 | -void initTimer(void) | |
162 | -{ | |
163 | - CCTL0 = CCIE; // CCR0 interrupt enabled | |
164 | - CCR0 = 2048; // 32kHz/8/4096 -> 1 sec | |
165 | - TACTL = TASSEL_1 + ID_3 + MC_1; // ACLK, /8, upmode | |
166 | - led1_off(); | |
167 | -} | |
168 | - | |
169 | -void stopTimer(void) | |
170 | -{ | |
171 | - CCTL0 ^= CCTL0 ; | |
172 | -} | |
173 | - | |
174 | -/* | |
175 | - * ============ Application Program ============ | |
176 | - */ | |
177 | - | |
178 | -#include <DUREX.h> | |
179 | -#include <string.h> | |
180 | - | |
181 | -DUREX_numBytes_t numBytes = 0; | |
182 | -DUREX_data_t data = ""; | |
183 | -DUREX_numPackets_t numPackets = 0; | |
184 | -DUREX_messageAvailable_t messageAvailable = 0; | |
185 | -uint8_t lastMessageAck = 1; | |
186 | - | |
187 | -int main(int argc, char *argv[]) | |
188 | -{ | |
189 | - volatile int dummy = 0; | |
190 | - init(); | |
191 | - initTimer(); | |
192 | - DUREX_run(); | |
193 | - while (dummy == 0) | |
194 | - { | |
195 | - /* idle */ | |
196 | - } | |
197 | - return 0; | |
198 | -} | |
199 | - | |
200 | -void DUREX_connectHandler(void) | |
201 | -{ | |
202 | - stopTimer(); | |
203 | - led0_on(); | |
204 | - led1_off(); | |
205 | -} | |
206 | - | |
207 | -void DUREX_disconnectHandler(void) | |
208 | -{ | |
209 | - led0_off(); | |
210 | - led1_off(); | |
211 | - initTimer(); | |
212 | -} | |
213 | - | |
214 | -void DUREX_numBytes_fetch(DUREX_numBytes_t* const output) | |
215 | -{ | |
216 | - *output = numBytes; | |
217 | -} | |
218 | - | |
219 | -void DUREX_numBytes_store(DUREX_numBytes_t* const input) | |
220 | -{ | |
221 | - numBytes = *input; | |
222 | -} | |
223 | - | |
224 | -void DUREX_data_fetch(DUREX_data_t* const output) | |
225 | -{ | |
226 | - memcpy(output,data,numBytes); | |
227 | -} | |
228 | - | |
229 | -void DUREX_data_store(DUREX_data_t* const input) | |
230 | -{ | |
231 | - memcpy(data,input,numBytes); | |
232 | -} | |
233 | - | |
234 | -void DUREX_numPackets_fetch(DUREX_numPackets_t* const output) | |
235 | -{ | |
236 | - *output = numPackets; | |
237 | -} | |
238 | - | |
239 | -void DUREX_numPackets_store(DUREX_numPackets_t* const input) | |
240 | -{ | |
241 | - numPackets = *input; | |
242 | -} | |
243 | - | |
244 | -void DUREX_messageAvailable_fetch(DUREX_messageAvailable_t* const output) | |
245 | -{ | |
246 | - *output = messageAvailable; | |
247 | -} | |
248 | - | |
249 | -void DUREX_messageAvailable_store(DUREX_messageAvailable_t* const input) | |
250 | -{ | |
251 | - messageAvailable = *input; | |
252 | - if(messageAvailable == DUREX_TRUE) | |
253 | - { | |
254 | - led1_on(); | |
255 | - lastMessageAck = 0; | |
256 | - messageAvailable = DUREX_FALSE; | |
257 | - DUREX_messageAvailable_indicate(); | |
258 | - memcpy(data,"ACK",4); | |
259 | - numPackets = 1; | |
260 | - numBytes = 4; | |
261 | - messageAvailable = DUREX_TRUE; | |
262 | - DUREX_messageAvailable_indicate(); | |
263 | - } | |
264 | - else if(messageAvailable == DUREX_FALSE) | |
265 | - { | |
266 | - led1_off(); | |
267 | - lastMessageAck = 1; | |
268 | - } | |
269 | -} | |
270 | - |
DUREXLaunchpad/main.map deleted
1 | -Archive member included because of file (symbol) | |
2 | - | |
3 | -/Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a(memcpy.o) | |
4 | - main.obj (memcpy) | |
5 | -/Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) | |
6 | - /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o (_reset_vector__) | |
7 | -/Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
8 | - /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (__watchdog_support) | |
9 | -/Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
10 | - /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (__init_stack) | |
11 | -/Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__low_level_init.o) | |
12 | - /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (__low_level_init) | |
13 | -/Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
14 | - /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (__do_copy_data) | |
15 | -/Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
16 | - /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (__do_clear_bss) | |
17 | -/Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__stop_progExec__.o) | |
18 | - /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (__stop_progExec__) | |
19 | -/Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
20 | - /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) (_endless_loop__) | |
21 | -/Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
22 | - /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o (_unexpected_) | |
23 | - | |
24 | -Allocating common symbols | |
25 | -Common symbol size file | |
26 | - | |
27 | -Em_App_recvIdx 0x1 DUREX.obj | |
28 | -Em_App_xmitSize 0x1 DUREX.obj | |
29 | -Em_App_outBuf 0x2 DUREX.obj | |
30 | -Em_App_ind 0xa DUREX.obj | |
31 | -Em_App_xmitMask 0x4 DUREX.obj | |
32 | -Em_App_msg 0xec DUREX.obj | |
33 | -Em_App_recvSize 0x1 DUREX.obj | |
34 | -Em_App_fileIndex 0x4 DUREX.obj | |
35 | -Em_App_pdHdlr 0x2 DUREX.obj | |
36 | -Em_App_xmitIdx 0x1 DUREX.obj | |
37 | - | |
38 | -Memory Configuration | |
39 | - | |
40 | -Name Origin Length Attributes | |
41 | -sfr 0x0000000000000000 0x0000000000000010 | |
42 | -peripheral_8bit 0x0000000000000010 0x00000000000000f0 | |
43 | -peripheral_16bit 0x0000000000000100 0x0000000000000100 | |
44 | -ram 0x0000000000000200 0x0000000000000200 xw | |
45 | -infomem 0x0000000000001000 0x0000000000000100 | |
46 | -infod 0x0000000000001000 0x0000000000000040 | |
47 | -infoc 0x0000000000001040 0x0000000000000040 | |
48 | -infob 0x0000000000001080 0x0000000000000040 | |
49 | -infoa 0x00000000000010c0 0x0000000000000040 | |
50 | -rom 0x000000000000c000 0x0000000000003fe0 xr | |
51 | -vectors 0x000000000000ffe0 0x0000000000000020 | |
52 | -bsl 0x0000000000000000 0x0000000000000000 | |
53 | -far_rom 0x0000000000000000 0x0000000000000000 | |
54 | -*default* 0x0000000000000000 0xffffffffffffffff | |
55 | - | |
56 | -Linker script and memory map | |
57 | - | |
58 | -LOAD /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o | |
59 | -LOAD main.obj | |
60 | -LOAD DUREX.obj | |
61 | -LOAD /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libgcc.a | |
62 | -LOAD /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a | |
63 | -LOAD /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libgcc.a | |
64 | -LOAD /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a | |
65 | - 0x0000000000000040 PROVIDE (__info_segment_size, 0x40) | |
66 | - 0x0000000000001000 PROVIDE (__infod, 0x1000) | |
67 | - 0x0000000000001040 PROVIDE (__infoc, 0x1040) | |
68 | - 0x0000000000001080 PROVIDE (__infob, 0x1080) | |
69 | - 0x00000000000010c0 PROVIDE (__infoa, 0x10c0) | |
70 | - 0x0000000000000000 __IE1 = 0x0 | |
71 | - 0x0000000000000002 __IFG1 = 0x2 | |
72 | - 0x0000000000000001 __IE2 = 0x1 | |
73 | - 0x0000000000000003 __IFG2 = 0x3 | |
74 | - 0x0000000000000048 __ADC10DTC0 = 0x48 | |
75 | - 0x0000000000000049 __ADC10DTC1 = 0x49 | |
76 | - 0x000000000000004a __ADC10AE0 = 0x4a | |
77 | - 0x00000000000001b0 __ADC10CTL0 = 0x1b0 | |
78 | - 0x00000000000001b2 __ADC10CTL1 = 0x1b2 | |
79 | - 0x00000000000001b4 __ADC10MEM = 0x1b4 | |
80 | - 0x00000000000001bc __ADC10SA = 0x1bc | |
81 | - 0x0000000000000056 __DCOCTL = 0x56 | |
82 | - 0x0000000000000057 __BCSCTL1 = 0x57 | |
83 | - 0x0000000000000058 __BCSCTL2 = 0x58 | |
84 | - 0x0000000000000053 __BCSCTL3 = 0x53 | |
85 | - 0x0000000000000059 __CACTL1 = 0x59 | |
86 | - 0x000000000000005a __CACTL2 = 0x5a | |
87 | - 0x000000000000005b __CAPD = 0x5b | |
88 | - 0x0000000000000128 __FCTL1 = 0x128 | |
89 | - 0x000000000000012a __FCTL2 = 0x12a | |
90 | - 0x000000000000012c __FCTL3 = 0x12c | |
91 | - 0x0000000000000020 __P1IN = 0x20 | |
92 | - 0x0000000000000021 __P1OUT = 0x21 | |
93 | - 0x0000000000000022 __P1DIR = 0x22 | |
94 | - 0x0000000000000023 __P1IFG = 0x23 | |
95 | - 0x0000000000000024 __P1IES = 0x24 | |
96 | - 0x0000000000000025 __P1IE = 0x25 | |
97 | - 0x0000000000000026 __P1SEL = 0x26 | |
98 | - 0x0000000000000041 __P1SEL2 = 0x41 | |
99 | - 0x0000000000000027 __P1REN = 0x27 | |
100 | - 0x0000000000000028 __P2IN = 0x28 | |
101 | - 0x0000000000000029 __P2OUT = 0x29 | |
102 | - 0x000000000000002a __P2DIR = 0x2a | |
103 | - 0x000000000000002b __P2IFG = 0x2b | |
104 | - 0x000000000000002c __P2IES = 0x2c | |
105 | - 0x000000000000002d __P2IE = 0x2d | |
106 | - 0x000000000000002e __P2SEL = 0x2e | |
107 | - 0x0000000000000042 __P2SEL2 = 0x42 | |
108 | - 0x000000000000002f __P2REN = 0x2f | |
109 | - 0x0000000000000018 __P3IN = 0x18 | |
110 | - 0x0000000000000019 __P3OUT = 0x19 | |
111 | - 0x000000000000001a __P3DIR = 0x1a | |
112 | - 0x000000000000001b __P3SEL = 0x1b | |
113 | - 0x0000000000000043 __P3SEL2 = 0x43 | |
114 | - 0x0000000000000010 __P3REN = 0x10 | |
115 | - 0x000000000000012e __TA0IV = 0x12e | |
116 | - 0x0000000000000160 __TA0CTL = 0x160 | |
117 | - 0x0000000000000162 __TA0CCTL0 = 0x162 | |
118 | - 0x0000000000000164 __TA0CCTL1 = 0x164 | |
119 | - 0x0000000000000166 __TA0CCTL2 = 0x166 | |
120 | - 0x0000000000000170 __TA0R = 0x170 | |
121 | - 0x0000000000000172 __TA0CCR0 = 0x172 | |
122 | - 0x0000000000000174 __TA0CCR1 = 0x174 | |
123 | - 0x0000000000000176 __TA0CCR2 = 0x176 | |
124 | - 0x000000000000011e __TA1IV = 0x11e | |
125 | - 0x0000000000000180 __TA1CTL = 0x180 | |
126 | - 0x0000000000000182 __TA1CCTL0 = 0x182 | |
127 | - 0x0000000000000184 __TA1CCTL1 = 0x184 | |
128 | - 0x0000000000000186 __TA1CCTL2 = 0x186 | |
129 | - 0x0000000000000190 __TA1R = 0x190 | |
130 | - 0x0000000000000192 __TA1CCR0 = 0x192 | |
131 | - 0x0000000000000194 __TA1CCR1 = 0x194 | |
132 | - 0x0000000000000196 __TA1CCR2 = 0x196 | |
133 | - 0x0000000000000060 __UCA0CTL0 = 0x60 | |
134 | - 0x0000000000000061 __UCA0CTL1 = 0x61 | |
135 | - 0x0000000000000062 __UCA0BR0 = 0x62 | |
136 | - 0x0000000000000063 __UCA0BR1 = 0x63 | |
137 | - 0x0000000000000064 __UCA0MCTL = 0x64 | |
138 | - 0x0000000000000065 __UCA0STAT = 0x65 | |
139 | - 0x0000000000000066 __UCA0RXBUF = 0x66 | |
140 | - 0x0000000000000067 __UCA0TXBUF = 0x67 | |
141 | - 0x000000000000005d __UCA0ABCTL = 0x5d | |
142 | - 0x000000000000005e __UCA0IRTCTL = 0x5e | |
143 | - 0x000000000000005f __UCA0IRRCTL = 0x5f | |
144 | - 0x0000000000000068 __UCB0CTL0 = 0x68 | |
145 | - 0x0000000000000069 __UCB0CTL1 = 0x69 | |
146 | - 0x000000000000006a __UCB0BR0 = 0x6a | |
147 | - 0x000000000000006b __UCB0BR1 = 0x6b | |
148 | - 0x000000000000006c __UCB0I2CIE = 0x6c | |
149 | - 0x000000000000006d __UCB0STAT = 0x6d | |
150 | - 0x000000000000006e __UCB0RXBUF = 0x6e | |
151 | - 0x000000000000006f __UCB0TXBUF = 0x6f | |
152 | - 0x0000000000000118 __UCB0I2COA = 0x118 | |
153 | - 0x000000000000011a __UCB0I2CSA = 0x11a | |
154 | - 0x0000000000000120 __WDTCTL = 0x120 | |
155 | - 0x00000000000010f8 __CALDCO_16MHZ = 0x10f8 | |
156 | - 0x00000000000010f9 __CALBC1_16MHZ = 0x10f9 | |
157 | - 0x00000000000010fa __CALDCO_12MHZ = 0x10fa | |
158 | - 0x00000000000010fb __CALBC1_12MHZ = 0x10fb | |
159 | - 0x00000000000010fc __CALDCO_8MHZ = 0x10fc | |
160 | - 0x00000000000010fd __CALBC1_8MHZ = 0x10fd | |
161 | - 0x00000000000010fe __CALDCO_1MHZ = 0x10fe | |
162 | - 0x00000000000010ff __CALBC1_1MHZ = 0x10ff | |
163 | - | |
164 | -.hash | |
165 | - *(.hash) | |
166 | - | |
167 | -.dynsym | |
168 | - *(.dynsym) | |
169 | - | |
170 | -.dynstr | |
171 | - *(.dynstr) | |
172 | - | |
173 | -.gnu.version | |
174 | - *(.gnu.version) | |
175 | - | |
176 | -.gnu.version_d | |
177 | - *(.gnu.version_d) | |
178 | - | |
179 | -.gnu.version_r | |
180 | - *(.gnu.version_r) | |
181 | - | |
182 | -.rel.init | |
183 | - *(.rel.init) | |
184 | - | |
185 | -.rela.init | |
186 | - *(.rela.init) | |
187 | - | |
188 | -.rel.fini | |
189 | - *(.rel.fini) | |
190 | - | |
191 | -.rela.fini | |
192 | - *(.rela.fini) | |
193 | - | |
194 | -.rel.text | |
195 | - *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) | |
196 | - | |
197 | -.rela.text | |
198 | - *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) | |
199 | - | |
200 | -.rel.rodata | |
201 | - *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) | |
202 | - | |
203 | -.rela.rodata | |
204 | - *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) | |
205 | - | |
206 | -.rel.data | |
207 | - *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) | |
208 | - | |
209 | -.rela.data | |
210 | - *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) | |
211 | - | |
212 | -.rel.bss | |
213 | - *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) | |
214 | - | |
215 | -.rela.bss | |
216 | - *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) | |
217 | - | |
218 | -.rel.ctors | |
219 | - *(.rel.ctors) | |
220 | - | |
221 | -.rela.ctors | |
222 | - *(.rela.ctors) | |
223 | - | |
224 | -.rel.dtors | |
225 | - *(.rel.dtors) | |
226 | - | |
227 | -.rela.dtors | |
228 | - *(.rela.dtors) | |
229 | - | |
230 | -.rel.got | |
231 | - *(.rel.got) | |
232 | - | |
233 | -.rela.got | |
234 | - *(.rela.got) | |
235 | - | |
236 | -.rel.plt | |
237 | - *(.rel.plt) | |
238 | - | |
239 | -.rela.plt | |
240 | - *(.rela.plt) | |
241 | - | |
242 | -.text 0x000000000000c000 0x7aa | |
243 | - 0x000000000000c000 . = ALIGN (0x2) | |
244 | - *(.init .init.*) | |
245 | - *(.init0) | |
246 | - .init0 0x000000000000c000 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) | |
247 | - 0x000000000000c000 _reset_vector__ | |
248 | - *(.init1) | |
249 | - .init1 0x000000000000c000 0xc /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
250 | - 0x000000000000c000 __watchdog_support | |
251 | - *(.init2) | |
252 | - .init2 0x000000000000c00c 0x4 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
253 | - 0x000000000000c00c __init_stack | |
254 | - *(.init3) | |
255 | - .init3 0x000000000000c010 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__low_level_init.o) | |
256 | - 0x000000000000c010 __low_level_init | |
257 | - *(.init4) | |
258 | - .init4 0x000000000000c010 0x18 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
259 | - 0x000000000000c010 __do_copy_data | |
260 | - .init4 0x000000000000c028 0x16 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
261 | - 0x000000000000c028 __do_clear_bss | |
262 | - *(.init5) | |
263 | - *(.init6) | |
264 | - *(.init7) | |
265 | - *(.init8) | |
266 | - *(.init9) | |
267 | - .init9 0x000000000000c03e 0x1c main.obj | |
268 | - 0x000000000000c03e main | |
269 | - *(.fini9) | |
270 | - .fini9 0x000000000000c05a 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__stop_progExec__.o) | |
271 | - 0x000000000000c05a __stop_progExec__ | |
272 | - *(.fini8) | |
273 | - *(.fini7) | |
274 | - *(.fini6) | |
275 | - *(.fini5) | |
276 | - *(.fini4) | |
277 | - *(.fini3) | |
278 | - *(.fini2) | |
279 | - *(.fini1) | |
280 | - *(.fini0) | |
281 | - .fini0 0x000000000000c05a 0x6 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
282 | - 0x000000000000c05a _endless_loop__ | |
283 | - *(.fini .fini.*) | |
284 | - 0x000000000000c060 . = ALIGN (0x2) | |
285 | - 0x000000000000c060 __ctors_start = . | |
286 | - *(.ctors) | |
287 | - 0x000000000000c060 __ctors_end = . | |
288 | - 0x000000000000c060 __dtors_start = . | |
289 | - *(.dtors) | |
290 | - 0x000000000000c060 __dtors_end = . | |
291 | - 0x000000000000c060 . = ALIGN (0x2) | |
292 | - *(.text .text.* .gnu.linkonce.t.*) | |
293 | - .text 0x000000000000c060 0x4 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o | |
294 | - 0x000000000000c060 __isr_1 | |
295 | - 0x000000000000c060 __isr_4 | |
296 | - 0x000000000000c060 __isr_11 | |
297 | - 0x000000000000c060 __isr_5 | |
298 | - 0x000000000000c060 __isr_2 | |
299 | - 0x000000000000c060 __isr_10 | |
300 | - 0x000000000000c060 __isr_0 | |
301 | - 0x000000000000c060 __isr_8 | |
302 | - 0x000000000000c060 __isr_12 | |
303 | - 0x000000000000c060 __isr_13 | |
304 | - 0x000000000000c060 __isr_6 | |
305 | - 0x000000000000c060 __isr_14 | |
306 | - .text.crt0 0x000000000000c064 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o | |
307 | - .text 0x000000000000c064 0x216 main.obj | |
308 | - 0x000000000000c064 init | |
309 | - 0x000000000000c0ec __isr_7 | |
310 | - 0x000000000000c118 __isr_3 | |
311 | - 0x000000000000c14a Em_Message_startSend | |
312 | - 0x000000000000c15e Em_Message_lock | |
313 | - 0x000000000000c166 Em_Message_unlock | |
314 | - 0x000000000000c172 led0_toggle | |
315 | - 0x000000000000c178 led1_toggle | |
316 | - 0x000000000000c180 led0_on | |
317 | - 0x000000000000c186 led0_off | |
318 | - 0x000000000000c18e led1_on | |
319 | - 0x000000000000c196 led1_off | |
320 | - 0x000000000000c19e __isr_9 | |
321 | - 0x000000000000c1b4 initTimer | |
322 | - 0x000000000000c1cc stopTimer | |
323 | - 0x000000000000c1d4 DUREX_connectHandler | |
324 | - 0x000000000000c1e2 DUREX_disconnectHandler | |
325 | - 0x000000000000c1f0 DUREX_numBytes_fetch | |
326 | - 0x000000000000c1f8 DUREX_numBytes_store | |
327 | - 0x000000000000c1fe DUREX_data_fetch | |
328 | - 0x000000000000c20c DUREX_data_store | |
329 | - 0x000000000000c21c DUREX_numPackets_fetch | |
330 | - 0x000000000000c224 DUREX_numPackets_store | |
331 | - 0x000000000000c22a DUREX_messageAvailable_fetch | |
332 | - 0x000000000000c232 DUREX_messageAvailable_store | |
333 | - .text 0x000000000000c27a 0x432 DUREX.obj | |
334 | - 0x000000000000c27a Em_Message_addByte | |
335 | - 0x000000000000c2c2 DUREX_reset | |
336 | - 0x000000000000c2f0 DUREX_run | |
337 | - 0x000000000000c2f6 Em_App_startIndSend | |
338 | - 0x000000000000c310 DUREX_pairingOn | |
339 | - 0x000000000000c332 DUREX_pairingOff | |
340 | - 0x000000000000c33c DUREX_disconnect | |
341 | - 0x000000000000c35e DUREX_accept | |
342 | - 0x000000000000c37c Em_App_startResSend | |
343 | - 0x000000000000c396 Em_App_xmitReady | |
344 | - 0x000000000000c3ea Em_App_sendResponse | |
345 | - 0x000000000000c40e Em_App_sysStoreDispatch | |
346 | - 0x000000000000c428 Em_App_sysFetchDispatch | |
347 | - 0x000000000000c4a8 Em_App_fetchDispatch | |
348 | - 0x000000000000c500 Em_App_storeDispatch | |
349 | - 0x000000000000c550 Em_Message_dispatch | |
350 | - 0x000000000000c5ae Em_App_sendIndicator | |
351 | - 0x000000000000c5de Em_Message_getByte | |
352 | - 0x000000000000c694 DUREX_messageAvailable_indicate | |
353 | - .text 0x000000000000c6ac 0xfc /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a(memcpy.o) | |
354 | - 0x000000000000c6ac memcpy | |
355 | - .text 0x000000000000c7a8 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) | |
356 | - .text 0x000000000000c7a8 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
357 | - .text 0x000000000000c7a8 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
358 | - .text 0x000000000000c7a8 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__low_level_init.o) | |
359 | - .text 0x000000000000c7a8 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
360 | - .text 0x000000000000c7a8 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
361 | - .text 0x000000000000c7a8 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__stop_progExec__.o) | |
362 | - .text 0x000000000000c7a8 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
363 | - .text 0x000000000000c7a8 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
364 | - .text.crt0 0x000000000000c7a8 0x2 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
365 | - 0x000000000000c7a8 _unexpected_ | |
366 | - 0x000000000000c7aa . = ALIGN (0x2) | |
367 | - | |
368 | -.rodata 0x000000000000c7aa 0x36 | |
369 | - 0x000000000000c7aa . = ALIGN (0x2) | |
370 | - *(.rodata .rodata.* .gnu.linkonce.r.*) | |
371 | - .rodata 0x000000000000c7aa 0x4 main.obj | |
372 | - .rodata 0x000000000000c7ae 0x32 DUREX.obj | |
373 | - 0x000000000000c7c2 Em_App_endian | |
374 | - 0x000000000000c7c4 Em_App_build | |
375 | - 0x000000000000c7cc Em_App_hash | |
376 | - 0x000000000000c7e0 . = ALIGN (0x2) | |
377 | - 0x000000000000c7e0 _etext = . | |
378 | - | |
379 | -.data 0x0000000000000200 0x6 load address 0x000000000000c7e0 | |
380 | - 0x0000000000000200 . = ALIGN (0x2) | |
381 | - 0x0000000000000200 PROVIDE (__data_start, .) | |
382 | - *(.data .data.* .gnu.linkonce.d.*) | |
383 | - .data 0x0000000000000200 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o | |
384 | - .data 0x0000000000000200 0x1 main.obj | |
385 | - 0x0000000000000200 lastMessageAck | |
386 | - *fill* 0x0000000000000201 0x1 00 | |
387 | - .data 0x0000000000000202 0x4 DUREX.obj | |
388 | - 0x0000000000000202 Em_App_inBuf | |
389 | - 0x0000000000000204 Em_App_readIdle | |
390 | - .data 0x0000000000000206 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a(memcpy.o) | |
391 | - .data 0x0000000000000206 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) | |
392 | - .data 0x0000000000000206 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
393 | - .data 0x0000000000000206 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
394 | - .data 0x0000000000000206 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__low_level_init.o) | |
395 | - .data 0x0000000000000206 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
396 | - .data 0x0000000000000206 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
397 | - .data 0x0000000000000206 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__stop_progExec__.o) | |
398 | - .data 0x0000000000000206 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
399 | - .data 0x0000000000000206 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
400 | - 0x0000000000000206 . = ALIGN (0x2) | |
401 | - 0x0000000000000206 _edata = . | |
402 | - 0x000000000000c7e0 PROVIDE (__data_load_start, LOADADDR (.data)) | |
403 | - 0x0000000000000006 PROVIDE (__data_size, SIZEOF (.data)) | |
404 | - | |
405 | -.bss 0x0000000000000206 0x1f8 load address 0x000000000000c7e6 | |
406 | - 0x0000000000000206 PROVIDE (__bss_start, .) | |
407 | - *(.bss .bss.*) | |
408 | - .bss 0x0000000000000206 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o | |
409 | - .bss 0x0000000000000206 0xec main.obj | |
410 | - 0x0000000000000206 messageAvailable | |
411 | - 0x0000000000000208 numPackets | |
412 | - 0x000000000000020a data | |
413 | - 0x00000000000002f0 numBytes | |
414 | - .bss 0x00000000000002f2 0x4 DUREX.obj | |
415 | - 0x00000000000002f2 Em_App_moreData | |
416 | - 0x00000000000002f4 Em_App_state | |
417 | - .bss 0x00000000000002f6 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a(memcpy.o) | |
418 | - .bss 0x00000000000002f6 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_reset_vector__.o) | |
419 | - .bss 0x00000000000002f6 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
420 | - .bss 0x00000000000002f6 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
421 | - .bss 0x00000000000002f6 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__low_level_init.o) | |
422 | - .bss 0x00000000000002f6 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
423 | - .bss 0x00000000000002f6 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
424 | - .bss 0x00000000000002f6 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__stop_progExec__.o) | |
425 | - .bss 0x00000000000002f6 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
426 | - .bss 0x00000000000002f6 0x0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
427 | - *(COMMON) | |
428 | - COMMON 0x00000000000002f6 0x107 DUREX.obj | |
429 | - 0x00000000000002f6 Em_App_recvIdx | |
430 | - 0x00000000000002f7 Em_App_xmitSize | |
431 | - 0x00000000000002f8 Em_App_outBuf | |
432 | - 0x00000000000002fa Em_App_ind | |
433 | - 0x0000000000000304 Em_App_xmitMask | |
434 | - 0x0000000000000308 Em_App_msg | |
435 | - 0x00000000000003f4 Em_App_recvSize | |
436 | - 0x00000000000003f6 Em_App_fileIndex | |
437 | - 0x00000000000003fa Em_App_pdHdlr | |
438 | - 0x00000000000003fc Em_App_xmitIdx | |
439 | - 0x00000000000003fe . = ALIGN (0x2) | |
440 | - *fill* 0x00000000000003fd 0x1 00 | |
441 | - 0x00000000000003fe PROVIDE (__bss_end, .) | |
442 | - 0x00000000000001f8 PROVIDE (__bss_size, SIZEOF (.bss)) | |
443 | - | |
444 | -.noinit 0x00000000000003fe 0x2 load address 0x000000000000c7e6 | |
445 | - 0x00000000000003fe PROVIDE (__noinit_start, .) | |
446 | - *(.noinit .noinit.*) | |
447 | - .noinit.crt0 0x00000000000003fe 0x2 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
448 | - 0x00000000000003fe __wdt_clear_value | |
449 | - 0x0000000000000400 . = ALIGN (0x2) | |
450 | - 0x0000000000000400 PROVIDE (__noinit_end, .) | |
451 | - 0x0000000000000400 . = ALIGN (0x2) | |
452 | - 0x0000000000000400 _end = . | |
453 | - | |
454 | -.infomem 0x0000000000001000 0x0 | |
455 | - *(.infomem) | |
456 | - 0x0000000000001000 . = ALIGN (0x2) | |
457 | - *(.infomem.*) | |
458 | - | |
459 | -.infomemnobits 0x0000000000001000 0x0 | |
460 | - *(.infomemnobits) | |
461 | - 0x0000000000001000 . = ALIGN (0x2) | |
462 | - *(.infomemnobits.*) | |
463 | - | |
464 | -.infoa | |
465 | - *(.infoa .infoa.*) | |
466 | - | |
467 | -.infob | |
468 | - *(.infob .infob.*) | |
469 | - | |
470 | -.infoc | |
471 | - *(.infoc .infoc.*) | |
472 | - | |
473 | -.infod | |
474 | - *(.infod .infod.*) | |
475 | - | |
476 | -.vectors 0x000000000000ffe0 0x20 | |
477 | - 0x000000000000ffe0 PROVIDE (__vectors_start, .) | |
478 | - *(.vectors*) | |
479 | - .vectors 0x000000000000ffe0 0x20 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/crt0ivtbl16.o | |
480 | - 0x000000000000ffe0 __ivtbl_16 | |
481 | - 0x0000000000010000 _vectors_end = . | |
482 | - | |
483 | -.fartext 0x0000000000000000 0x0 | |
484 | - 0x0000000000000000 . = ALIGN (0x2) | |
485 | - *(.fartext) | |
486 | - 0x0000000000000000 . = ALIGN (0x2) | |
487 | - *(.fartext.*) | |
488 | - 0x0000000000000000 _efartext = . | |
489 | - | |
490 | -.profiler | |
491 | - *(.profiler) | |
492 | - | |
493 | -.stab | |
494 | - *(.stab) | |
495 | - | |
496 | -.stabstr | |
497 | - *(.stabstr) | |
498 | - | |
499 | -.stab.excl | |
500 | - *(.stab.excl) | |
501 | - | |
502 | -.stab.exclstr | |
503 | - *(.stab.exclstr) | |
504 | - | |
505 | -.stab.index | |
506 | - *(.stab.index) | |
507 | - | |
508 | -.stab.indexstr | |
509 | - *(.stab.indexstr) | |
510 | - | |
511 | -.comment | |
512 | - *(.comment) | |
513 | - | |
514 | -.debug | |
515 | - *(.debug) | |
516 | - | |
517 | -.line | |
518 | - *(.line) | |
519 | - | |
520 | -.debug_srcinfo | |
521 | - *(.debug_srcinfo) | |
522 | - | |
523 | -.debug_sfnames | |
524 | - *(.debug_sfnames) | |
525 | - | |
526 | -.debug_aranges 0x0000000000000000 0xb8 | |
527 | - *(.debug_aranges) | |
528 | - .debug_aranges | |
529 | - 0x0000000000000000 0x18 main.obj | |
530 | - .debug_aranges | |
531 | - 0x0000000000000018 0x14 DUREX.obj | |
532 | - .debug_aranges | |
533 | - 0x000000000000002c 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a(memcpy.o) | |
534 | - .debug_aranges | |
535 | - 0x0000000000000040 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
536 | - .debug_aranges | |
537 | - 0x0000000000000054 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
538 | - .debug_aranges | |
539 | - 0x0000000000000068 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
540 | - .debug_aranges | |
541 | - 0x000000000000007c 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
542 | - .debug_aranges | |
543 | - 0x0000000000000090 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
544 | - .debug_aranges | |
545 | - 0x00000000000000a4 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
546 | - | |
547 | -.debug_pubnames | |
548 | - *(.debug_pubnames) | |
549 | - | |
550 | -.debug_info 0x0000000000000000 0x13e2 | |
551 | - *(.debug_info) | |
552 | - .debug_info 0x0000000000000000 0x81b main.obj | |
553 | - .debug_info 0x000000000000081b 0x75a DUREX.obj | |
554 | - .debug_info 0x0000000000000f75 0x113 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a(memcpy.o) | |
555 | - .debug_info 0x0000000000001088 0x8f /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
556 | - .debug_info 0x0000000000001117 0x8f /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
557 | - .debug_info 0x00000000000011a6 0x8f /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
558 | - .debug_info 0x0000000000001235 0x8f /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
559 | - .debug_info 0x00000000000012c4 0x8f /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
560 | - .debug_info 0x0000000000001353 0x8f /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
561 | - *(.gnu.linkonce.wi.*) | |
562 | - | |
563 | -.debug_abbrev 0x0000000000000000 0x4fd | |
564 | - *(.debug_abbrev) | |
565 | - .debug_abbrev 0x0000000000000000 0x1c0 main.obj | |
566 | - .debug_abbrev 0x00000000000001c0 0x22e DUREX.obj | |
567 | - .debug_abbrev 0x00000000000003ee 0x97 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a(memcpy.o) | |
568 | - .debug_abbrev 0x0000000000000485 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
569 | - .debug_abbrev 0x0000000000000499 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
570 | - .debug_abbrev 0x00000000000004ad 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
571 | - .debug_abbrev 0x00000000000004c1 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
572 | - .debug_abbrev 0x00000000000004d5 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
573 | - .debug_abbrev 0x00000000000004e9 0x14 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
574 | - | |
575 | -.debug_line 0x0000000000000000 0x762 | |
576 | - *(.debug_line) | |
577 | - .debug_line 0x0000000000000000 0x194 main.obj | |
578 | - .debug_line 0x0000000000000194 0x211 DUREX.obj | |
579 | - .debug_line 0x00000000000003a5 0x10e /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a(memcpy.o) | |
580 | - .debug_line 0x00000000000004b3 0x72 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__watchdog_support.o) | |
581 | - .debug_line 0x0000000000000525 0x70 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(__init_stack.o) | |
582 | - .debug_line 0x0000000000000595 0x76 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_copy_data.o) | |
583 | - .debug_line 0x000000000000060b 0x76 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_clear_bss.o) | |
584 | - .debug_line 0x0000000000000681 0x71 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_endless_loop__.o) | |
585 | - .debug_line 0x00000000000006f2 0x70 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/libcrt0.a(_unexpected_.o) | |
586 | - | |
587 | -.debug_frame 0x0000000000000000 0x2de | |
588 | - *(.debug_frame) | |
589 | - .debug_frame 0x0000000000000000 0x192 main.obj | |
590 | - .debug_frame 0x0000000000000192 0x114 DUREX.obj | |
591 | - .debug_frame 0x00000000000002a6 0x38 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a(memcpy.o) | |
592 | - | |
593 | -.debug_str 0x0000000000000000 0x7cc | |
594 | - *(.debug_str) | |
595 | - .debug_str 0x0000000000000000 0x3c8 main.obj | |
596 | - 0x4c0 (size before relaxing) | |
597 | - .debug_str 0x00000000000003c8 0x38f DUREX.obj | |
598 | - 0x48e (size before relaxing) | |
599 | - .debug_str 0x0000000000000757 0x75 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a(memcpy.o) | |
600 | - 0x100 (size before relaxing) | |
601 | - | |
602 | -.debug_loc 0x0000000000000000 0x59f | |
603 | - *(.debug_loc) | |
604 | - .debug_loc 0x0000000000000000 0x113 main.obj | |
605 | - .debug_loc 0x0000000000000113 0x29c DUREX.obj | |
606 | - .debug_loc 0x00000000000003af 0x1f0 /Applications/Development/Em-Builder-IDE/eclipse/emmoco/msptools/bin/../lib/gcc/msp430/4.6.1/../../../../msp430/lib/libc.a(memcpy.o) | |
607 | - | |
608 | -.debug_macinfo | |
609 | - *(.debug_macinfo) | |
610 | - | |
611 | -.debug_pubtypes | |
612 | - *(.debug_pubtypes) | |
613 | - | |
614 | -.debug_ranges 0x0000000000000000 0xc | |
615 | - *(.debug_ranges) | |
616 | - .debug_ranges 0x0000000000000000 0xc main.obj | |
617 | - 0x0000000000000400 PROVIDE (__stack, (ORIGIN (ram) + 0x200)) | |
618 | - 0x000000000000c7e0 PROVIDE (__data_start_rom, _etext) | |
619 | - 0x000000000000c7e6 PROVIDE (__data_end_rom, (_etext + SIZEOF (.data))) | |
620 | -OUTPUT(main.out elf32-msp430) |
DUREXLaunchpad/main.obj deleted
No preview for this file type
DUREXLaunchpad/main.out deleted
No preview for this file type
DUREXLaunchpad/makefile deleted
ISG-DUREX/examples-12.1.1.zip deleted
No preview for this file type
ISG-DUREX/examples.tar.gz
0 → 100644
No preview for this file type
CommonLaunchPad/.project renamed to Platform-MSP-EXP430G2/.project
1 | -<?xml version="1.0" encoding="UTF-8"?> | |
2 | -<projectDescription> | |
3 | - <name>CommonLaunchPad</name> | |
4 | - <comment></comment> | |
5 | - <projects> | |
6 | - </projects> | |
7 | - <buildSpec> | |
8 | - </buildSpec> | |
9 | - <natures> | |
10 | - </natures> | |
11 | -</projectDescription> | |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<projectDescription> | |
3 | + <name>Platform-MSP-EXP430G2</name> | |
4 | + <comment></comment> | |
5 | + <projects> | |
6 | + </projects> | |
7 | + <buildSpec> | |
8 | + </buildSpec> | |
9 | + <natures> | |
10 | + </natures> | |
11 | +</projectDescription> | ... | ... |
Platform-MSP-EXP430G2/Hal/Hal.c
0 → 100644
1 | +/* | |
2 | + * ============ Hardware Abstraction Layer for MSP-EXP430G2 LaunchPad ============ | |
3 | + */ | |
4 | + | |
5 | +#include "Hal.h" | |
6 | +#include "Em_Message.h" | |
7 | + | |
8 | +#include <msp430.h> | |
9 | + | |
10 | + | |
11 | +/* -------- INTERNAL FEATURES -------- */ | |
12 | + | |
13 | +#define LED_CONFIG() (P1DIR |= BIT6) | |
14 | +#define LED_ON() (P1OUT |= BIT6) | |
15 | +#define LED_OFF() (P1OUT &= ~BIT6) | |
16 | +#define LED_READ() (P1OUT & BIT6) | |
17 | +#define LED_TOGGLE() (P1OUT ^= BIT6) | |
18 | + | |
19 | +#define CONNECTED_LED_CONFIG() (P1DIR |= BIT0) | |
20 | +#define CONNECTED_LED_ON() (P1OUT |= BIT0) | |
21 | +#define CONNECTED_LED_OFF() (P1OUT &= ~BIT0) | |
22 | + | |
23 | +#define BUTTON_CONFIG() (P1DIR &= ~BIT3, P1REN |= BIT3, P1OUT |= BIT3, P1IES |= BIT3); | |
24 | +#define BUTTON_ENABLE() (P1IFG &= ~BIT3, P1IE |= BIT3) | |
25 | +#define BUTTON_PRESSED() (!(P1IN & BIT3)) | |
26 | +#define BUTTON_DEBOUNCE_MSECS 100 | |
27 | + | |
28 | +#define DEBUG1_CONFIG() (P2DIR |= BIT3) | |
29 | +#define DEBUG1_ON() (P2OUT |= BIT3) | |
30 | +#define DEBUG1_OFF() (P2OUT &= ~BIT3) | |
31 | + | |
32 | +#define DEBUG2_CONFIG() (P2DIR |= BIT4) | |
33 | +#define DEBUG2_ON() (P2OUT |= BIT4) | |
34 | +#define DEBUG2_OFF() (P2OUT &= ~BIT4) | |
35 | + | |
36 | +#define EAP_RX_BUF UCA0RXBUF | |
37 | +#define EAP_TX_BUF UCA0TXBUF | |
38 | + | |
39 | +#define EAP_RX_VECTOR USCIAB0RX_VECTOR | |
40 | +#define EAP_TX_VECTOR USCIAB0TX_VECTOR | |
41 | +#define EAP_TX_ACK_VECTOR PORT2_VECTOR | |
42 | + | |
43 | +#define EAP_RX_ENABLE() (P1SEL |= BIT1, P1SEL2 |= BIT1) | |
44 | +#define EAP_RX_DISABLE() (P1SEL &= ~BIT1, P1SEL2 &= ~BIT1) | |
45 | +#define EAP_TX_ENABLE() (P1SEL |= BIT2, P1SEL2 |= BIT2) | |
46 | +#define EAP_TX_DISABLE() (P1SEL &= ~BIT2, P1SEL2 &= ~BIT2) | |
47 | + | |
48 | +#define EAP_RX_ACK_CONFIG() (P2DIR |= BIT0) | |
49 | +#define EAP_RX_ACK_SET() (P2OUT |= BIT0) | |
50 | +#define EAP_RX_ACK_CLR() (P2OUT &= ~BIT0) | |
51 | + | |
52 | +#define EAP_TX_ACK_CONFIG() (P2DIR &= ~BIT1, P2IES |= BIT1, P2IFG &= ~BIT1, P2IE |= BIT1) | |
53 | +#define EAP_TX_ACK_TST() (P2IFG & BIT1) | |
54 | +#define EAP_TX_ACK_CLR() (P2IFG &= ~BIT1) | |
55 | + | |
56 | +#define EAP_RX_INT_CLR() (IFG2 &= ~UCA0RXIFG) | |
57 | +#define EAP_RX_INT_ENABLE() (IE2 |= UCA0RXIE) | |
58 | +#define EAP_TX_INT_CLR() (IFG2 &= ~UCA0TXIFG) | |
59 | +#define EAP_TX_INT_DISABLE() (IE2 &= ~UCA0TXIE) | |
60 | +#define EAP_TX_INT_ENABLE() (IE2 |= UCA0TXIE) | |
61 | + | |
62 | +#define MCLK_TICKS_PER_MS 1000L | |
63 | +#define ACLK_TICKS_PER_SECOND 12000L | |
64 | +#define UART_WATCHDOG_PERIOD (ACLK_TICKS_PER_SECOND * 250) / 1000 | |
65 | + | |
66 | +#define UART_WATCH_DISABLE() (TA1CCTL1 = 0) // Turn off CCR1 Interrupt | |
67 | +#define UART_WATCH_ENABLE() (TA1CCR1 = TA1R + UART_WATCHDOG_PERIOD, TA1CCTL1 = CCIE) // Set CCR1, and Enable CCR1 Interrupt | |
68 | + | |
69 | +#ifdef __GNUC__ | |
70 | +#define DINT() (__disable_interrupt()) | |
71 | +#define EINT() (__enable_interrupt()) | |
72 | +#define INTERRUPT | |
73 | +#define SLEEP() (_BIS_SR(LPM3_bits + GIE)) | |
74 | +#define WAKEUP() (_BIC_SR_IRQ(LPM3_bits)) | |
75 | +#endif | |
76 | + | |
77 | +#ifdef __TI_COMPILER_VERSION__ | |
78 | +#define DINT() (_disable_interrupt()) | |
79 | +#define EINT() (_enable_interrupt()) | |
80 | +#define INTERRUPT interrupt | |
81 | +#define SLEEP() (__bis_SR_register(LPM3_bits + GIE)) | |
82 | +#define WAKEUP() (__bic_SR_register_on_exit(LPM3_bits)) | |
83 | +#endif | |
84 | + | |
85 | +#define NUM_HANDLERS 3 | |
86 | + | |
87 | +#define BUTTON_HANDLER_ID 0 | |
88 | +#define TICK_HANDLER_ID 1 | |
89 | +#define DISPATCH_HANDLER_ID 2 | |
90 | + | |
91 | +static void buttonHandler(void); | |
92 | +static void postEvent(uint8_t handlerId); | |
93 | + | |
94 | +static Hal_Handler appButtonHandler; | |
95 | +static volatile uint16_t handlerEvents = 0; | |
96 | +static uint16_t clockTick = 0; | |
97 | +static Hal_Handler handlerTab[NUM_HANDLERS]; | |
98 | + | |
99 | + | |
100 | +/* -------- APP-HAL INTERFACE -------- */ | |
101 | + | |
102 | +void Hal_buttonEnable(Hal_Handler handler) { | |
103 | + handlerTab[BUTTON_HANDLER_ID] = buttonHandler; | |
104 | + appButtonHandler = handler; | |
105 | + BUTTON_CONFIG(); | |
106 | + Hal_delay(100); | |
107 | + BUTTON_ENABLE(); | |
108 | +} | |
109 | + | |
110 | +void Hal_connected(void) { | |
111 | + CONNECTED_LED_ON(); | |
112 | +} | |
113 | + | |
114 | +void Hal_debugOn(uint8_t line) { | |
115 | + switch (line) { | |
116 | + case 1: | |
117 | + DEBUG1_ON(); | |
118 | + break; | |
119 | + case 2: | |
120 | + DEBUG2_ON(); | |
121 | + } | |
122 | +} | |
123 | + | |
124 | +void Hal_debugOff(uint8_t line) { | |
125 | + switch (line) { | |
126 | + case 1: | |
127 | + DEBUG1_OFF(); | |
128 | + break; | |
129 | + case 2: | |
130 | + DEBUG2_OFF(); | |
131 | + } | |
132 | +} | |
133 | + | |
134 | +void Hal_debugPulse(uint8_t line) { | |
135 | + switch (line) { | |
136 | + case 1: | |
137 | + DEBUG1_ON(); | |
138 | + DEBUG1_OFF(); | |
139 | + break; | |
140 | + case 2: | |
141 | + DEBUG2_ON(); | |
142 | + DEBUG2_OFF(); | |
143 | + } | |
144 | +} | |
145 | + | |
146 | +void Hal_delay(uint16_t msecs) { | |
147 | + while (msecs--) { | |
148 | + __delay_cycles(MCLK_TICKS_PER_MS); | |
149 | + } | |
150 | +} | |
151 | + | |
152 | +void Hal_disconnected(void) { | |
153 | + CONNECTED_LED_OFF(); | |
154 | +} | |
155 | + | |
156 | +void Hal_init(void) { | |
157 | + | |
158 | + /* setup clocks */ | |
159 | + | |
160 | + WDTCTL = WDTPW + WDTHOLD; | |
161 | + BCSCTL2 = SELM_0 + DIVM_0 + DIVS_0; | |
162 | + if (CALBC1_1MHZ != 0xFF) { | |
163 | + DCOCTL = 0x00; | |
164 | + BCSCTL1 = CALBC1_1MHZ; /* Set DCO to 1MHz */ | |
165 | + DCOCTL = CALDCO_1MHZ; | |
166 | + } | |
167 | + BCSCTL1 |= XT2OFF + DIVA_0; | |
168 | + BCSCTL3 = XT2S_0 + LFXT1S_2 + XCAP_1; | |
169 | + | |
170 | + /* setup LEDs */ | |
171 | + | |
172 | + LED_CONFIG(); | |
173 | + LED_OFF(); | |
174 | + CONNECTED_LED_CONFIG(); | |
175 | + CONNECTED_LED_OFF(); | |
176 | + | |
177 | + /* setup debug pins */ | |
178 | + | |
179 | + DEBUG1_CONFIG(); DEBUG1_OFF(); | |
180 | + DEBUG2_CONFIG(); DEBUG2_OFF(); | |
181 | + | |
182 | + DEBUG1_ON(); DEBUG1_OFF(); | |
183 | + | |
184 | + /* setup TimerA1 */ | |
185 | + TA1CTL = TASSEL_1 + MC_2; // ACLK, Continuous mode | |
186 | + UART_WATCH_ENABLE(); | |
187 | + | |
188 | + /* setup UART */ | |
189 | + | |
190 | + UCA0CTL1 |= UCSWRST; | |
191 | + | |
192 | + EAP_RX_ENABLE(); | |
193 | + EAP_TX_ENABLE(); | |
194 | + | |
195 | + EAP_RX_ACK_CONFIG(); | |
196 | + EAP_RX_ACK_SET(); | |
197 | + | |
198 | + EAP_TX_ACK_CONFIG(); | |
199 | + | |
200 | + // suspend the MCM | |
201 | + EAP_RX_ACK_CLR(); | |
202 | + | |
203 | + UCA0CTL1 = UCSSEL_2 + UCSWRST; | |
204 | + UCA0MCTL = UCBRF_0 + UCBRS_6; | |
205 | + UCA0BR0 = 8; | |
206 | + UCA0CTL1 &= ~UCSWRST; | |
207 | + | |
208 | + handlerTab[DISPATCH_HANDLER_ID] = Em_Message_dispatch; | |
209 | +} | |
210 | + | |
211 | +void Hal_idleLoop(void) { | |
212 | + | |
213 | + EINT(); | |
214 | + for (;;) { | |
215 | + | |
216 | + // atomically read/clear all handlerEvents | |
217 | + DINT(); | |
218 | + uint16_t events = handlerEvents; | |
219 | + handlerEvents = 0; | |
220 | + | |
221 | + if (events) { // dispatch all current events | |
222 | + EINT(); | |
223 | + uint16_t mask; | |
224 | + uint8_t id; | |
225 | + for (id = 0, mask = 0x1; id < NUM_HANDLERS; id++, mask <<= 1) { | |
226 | + if ((events & mask) && handlerTab[id]) { | |
227 | + handlerTab[id](); | |
228 | + } | |
229 | + } | |
230 | + } | |
231 | + else { // await more events | |
232 | + SLEEP(); | |
233 | + } | |
234 | + } | |
235 | +} | |
236 | + | |
237 | +void Hal_ledOn(void) { | |
238 | + LED_ON(); | |
239 | +} | |
240 | + | |
241 | +void Hal_ledOff(void) { | |
242 | + LED_OFF(); | |
243 | +} | |
244 | + | |
245 | +bool Hal_ledRead(void) { | |
246 | + return LED_READ(); | |
247 | +} | |
248 | + | |
249 | +void Hal_ledToggle(void) { | |
250 | + LED_TOGGLE(); | |
251 | +} | |
252 | + | |
253 | +void Hal_tickStart(uint16_t msecs, Hal_Handler handler) { | |
254 | + handlerTab[TICK_HANDLER_ID] = handler; | |
255 | + clockTick = (ACLK_TICKS_PER_SECOND * msecs) / 1000; | |
256 | + TA1CCR0 = TA1R + clockTick; // Set the CCR0 interrupt for msecs from now. | |
257 | + TA1CCTL0 = CCIE; // Enable the CCR0 interrupt | |
258 | +} | |
259 | + | |
260 | + | |
261 | +/* -------- SRT-HAL INTERFACE -------- */ | |
262 | + | |
263 | +uint8_t Em_Hal_lock(void) { | |
264 | + #ifdef __GNUC__ | |
265 | + uint8_t key = READ_SR & 0x8; | |
266 | + __disable_interrupt(); | |
267 | + return key; | |
268 | + #endif | |
269 | + #ifdef __TI_COMPILER_VERSION__ | |
270 | + uint8_t key = _get_interrupt_state(); | |
271 | + _disable_interrupt(); | |
272 | + return key; | |
273 | + #endif | |
274 | +} | |
275 | + | |
276 | +void Em_Hal_reset(void) { | |
277 | + uint8_t key = Em_Hal_lock(); | |
278 | + EAP_RX_ACK_CLR(); // suspend the MCM | |
279 | + Hal_delay(100); | |
280 | + EAP_RX_ACK_SET(); // reset the MCM | |
281 | + Hal_delay(500); | |
282 | + EAP_RX_INT_CLR(); | |
283 | + EAP_TX_INT_CLR(); | |
284 | + EAP_TX_ACK_CLR(); | |
285 | + EAP_RX_INT_ENABLE(); | |
286 | + Em_Hal_unlock(key); | |
287 | +} | |
288 | + | |
289 | +void Em_Hal_startSend() { | |
290 | + EAP_TX_BUF = Em_Message_startTx(); | |
291 | +} | |
292 | + | |
293 | +void Em_Hal_unlock(uint8_t key) { | |
294 | + #ifdef __GNUC__ | |
295 | + __asm__("bis %0,r2" : : "ir" ((uint16_t) key)); | |
296 | + #endif | |
297 | + #ifdef __TI_COMPILER_VERSION__ | |
298 | + _set_interrupt_state(key); | |
299 | + #endif | |
300 | +} | |
301 | + | |
302 | +void Em_Hal_watchOff(void) { | |
303 | + UART_WATCH_DISABLE(); | |
304 | +} | |
305 | + | |
306 | +void Em_Hal_watchOn(void) { | |
307 | + UART_WATCH_ENABLE(); | |
308 | +} | |
309 | + | |
310 | + | |
311 | +/* -------- INTERNAL FUNCTIONS -------- */ | |
312 | + | |
313 | +static void buttonHandler(void) { | |
314 | + Hal_delay(100); | |
315 | + if (BUTTON_PRESSED() && appButtonHandler) { | |
316 | + appButtonHandler(); | |
317 | + } | |
318 | +} | |
319 | + | |
320 | +static void postEvent(uint8_t handlerId) { | |
321 | + uint8_t key = Em_Hal_lock(); | |
322 | + handlerEvents |= 1 << handlerId; | |
323 | + Em_Hal_unlock(key); | |
324 | +} | |
325 | + | |
326 | +/* -------- INTERRUPT SERVICE ROUTINES -------- */ | |
327 | + | |
328 | +#ifdef __GNUC__ | |
329 | + __attribute__((interrupt(PORT1_VECTOR))) | |
330 | +#endif | |
331 | +#ifdef __TI_COMPILER_VERSION__ | |
332 | + #pragma vector=PORT1_VECTOR | |
333 | +#endif | |
334 | +INTERRUPT void buttonIsr(void) { | |
335 | + postEvent(BUTTON_HANDLER_ID); | |
336 | + BUTTON_ENABLE(); | |
337 | + WAKEUP(); | |
338 | +} | |
339 | + | |
340 | +#ifdef __GNUC__ | |
341 | + __attribute__((interrupt(EAP_RX_VECTOR))) | |
342 | +#endif | |
343 | +#ifdef __TI_COMPILER_VERSION__ | |
344 | + #pragma vector=EAP_RX_VECTOR | |
345 | +#endif | |
346 | +INTERRUPT void rxIsr(void) { | |
347 | + uint8_t b = EAP_RX_BUF; | |
348 | + Em_Message_startRx(); | |
349 | + EAP_RX_ACK_CLR(); | |
350 | + EAP_RX_ACK_SET(); | |
351 | + if (Em_Message_addByte(b)) { | |
352 | + postEvent(DISPATCH_HANDLER_ID); | |
353 | + } | |
354 | + WAKEUP(); | |
355 | +} | |
356 | + | |
357 | +#ifdef __GNUC__ | |
358 | + __attribute__((interrupt(TIMER1_A0_VECTOR))) | |
359 | +#endif | |
360 | +#ifdef __TI_COMPILER_VERSION__ | |
361 | + #pragma vector=TIMER1_A0_VECTOR | |
362 | +#endif | |
363 | +INTERRUPT void timerIsr(void) { | |
364 | + TA1CCR0 += clockTick; | |
365 | + postEvent(TICK_HANDLER_ID); | |
366 | + WAKEUP(); | |
367 | +} | |
368 | + | |
369 | +#ifdef __GNUC__ | |
370 | + __attribute__((interrupt(EAP_TX_ACK_VECTOR))) | |
371 | +#endif | |
372 | +#ifdef __TI_COMPILER_VERSION__ | |
373 | + #pragma vector=EAP_TX_ACK_VECTOR | |
374 | +#endif | |
375 | +INTERRUPT void txAckIsr(void) { | |
376 | + if (EAP_TX_ACK_TST()) { | |
377 | + uint8_t b; | |
378 | + if (Em_Message_getByte(&b)) { | |
379 | + EAP_TX_BUF = b; | |
380 | + } | |
381 | + EAP_TX_ACK_CLR(); | |
382 | + } | |
383 | + WAKEUP(); | |
384 | +} | |
385 | + | |
386 | +#ifdef __GNUC__ | |
387 | + __attribute__((interrupt(TIMER1_A1_VECTOR))) | |
388 | +#endif | |
389 | +#ifdef __TI_COMPILER_VERSION__ | |
390 | + #pragma vector=TIMER1_A1_VECTOR | |
391 | +#endif | |
392 | +INTERRUPT void uartWatchdogIsr(void) { | |
393 | + switch (TA1IV) { | |
394 | + case 2: // CCR1 | |
395 | + UART_WATCH_DISABLE(); | |
396 | + Em_Message_restart(); | |
397 | + WAKEUP(); | |
398 | + break; | |
399 | + } | |
400 | +} | ... | ... |
Platform-MSP-EXP430G2/Hal/Hal.h
0 → 100644
1 | +/** | |
2 | + * Hal.h -- HAL Interface Definitions | |
3 | + * | |
4 | + * This example HAL is intentionally simple. The implementation is limited to: | |
5 | + * | |
6 | + * BUTTON -- a single button that when pressed will cause an interrupt. | |
7 | + * CONNECTED_LED -- an LED that is controlled inside the HAL to indicate connection to a central. | |
8 | + * DEBUG -- two debug GPIOs that are available as outputs from the EAP and under user control. | |
9 | + * DELAY -- a delay routine that can delay by n milliseconds. | |
10 | + * INIT -- set the hardware up to its initial state | |
11 | + * LED -- a user LED that is available for application control. | |
12 | + * TICK -- a timer that can be set to interrupt every n milliseconds | |
13 | + * IDLE LOOP -- an event driven idle loop for controlling the EAP | |
14 | + * | |
15 | + * For information on Hal implementations for specific target hardware platforms, | |
16 | + * visit the http://wiki.em-hub.com/display/ED. | |
17 | + * | |
18 | + **/ | |
19 | + | |
20 | +#ifndef Hal__H | |
21 | +#define Hal__H | |
22 | + | |
23 | +#include <stdint.h> | |
24 | +#include <stdbool.h> | |
25 | + | |
26 | +#ifdef __cplusplus | |
27 | +extern "C" { | |
28 | +#endif | |
29 | + | |
30 | +typedef void (*Hal_Handler)(void); | |
31 | + | |
32 | +/** | |
33 | + * --------- Hal_buttonEnable --------- | |
34 | + * | |
35 | + * Enable the button interrupt and connect it to the user's buttonHandler | |
36 | + * | |
37 | + * When the button is pressed, it will cause an interrupt that will cause BUTTON event | |
38 | + * to be entered into the event list. Once dispatched by the idle loop, the user's | |
39 | + * buttonHandler will be called. | |
40 | + * | |
41 | + * Inputs: | |
42 | + * buttonHandler - pointer to the user's handler to be called after interrupt | |
43 | + * | |
44 | + * Returns: | |
45 | + * None | |
46 | + * | |
47 | + * Side effects: | |
48 | + * BUTTON interrupt enabled | |
49 | + * | |
50 | + **/ | |
51 | +extern void Hal_buttonEnable(Hal_Handler handler); | |
52 | +/** | |
53 | + * --------- Hal_connected --------- | |
54 | + * | |
55 | + * Called whenever the MCM peripheral connects to a central. | |
56 | + * | |
57 | + * Turns on the CONNECTED_LED to show connectivity to the central | |
58 | + * Could do other things associated with connection to the central. | |
59 | + * | |
60 | + * Inputs: | |
61 | + * None | |
62 | + * | |
63 | + * Returns: | |
64 | + * None | |
65 | + * | |
66 | + * Side Effects: | |
67 | + * CONNECTED_LED on. | |
68 | + * | |
69 | + **/ | |
70 | +extern void Hal_connected(void); | |
71 | +/** | |
72 | + * --------- Hal_debugOff --------- | |
73 | + * | |
74 | + * Turns the selected DEBUG line off. | |
75 | + * | |
76 | + * The two DEBUG lines are output GPIOs that are available to the user for | |
77 | + * debug purposes. | |
78 | + * | |
79 | + * Inputs: | |
80 | + * line - the index value of the debug line to turn off | |
81 | + * | |
82 | + * Returns: | |
83 | + * None | |
84 | + * | |
85 | + * Side Effects: | |
86 | + * DEBUG line off. | |
87 | + * | |
88 | + **/ | |
89 | +extern void Hal_debugOff(uint8_t line); | |
90 | +/** | |
91 | + * --------- Hal_debugOn --------- | |
92 | + * | |
93 | + * Turns the selected DEBUG line on. | |
94 | + * | |
95 | + * The two DEBUG lines are output GPIOs that are available to the user for | |
96 | + * debug purposes. | |
97 | + * | |
98 | + * Inputs: | |
99 | + * line - the index value of the debug line to turn on | |
100 | + * | |
101 | + * Returns: | |
102 | + * None | |
103 | + * | |
104 | + * Side Effects: | |
105 | + * DEBUG line on. | |
106 | + * | |
107 | + **/ | |
108 | +extern void Hal_debugOn(uint8_t line); | |
109 | +/** | |
110 | + * --------- Hal_debugPulse --------- | |
111 | + * | |
112 | + * Emits a pulse on the selected DEBUG line. | |
113 | + * | |
114 | + * The two DEBUG lines are output GPIOs that are available to the user for | |
115 | + * debug purposes. | |
116 | + * | |
117 | + * Inputs: | |
118 | + * line - the index value of the debug line to emit a pulse | |
119 | + * | |
120 | + * Returns: | |
121 | + * None | |
122 | + * | |
123 | + * Side Effects: | |
124 | + * DEBUG line turns on then off. | |
125 | + * | |
126 | + **/ | |
127 | +extern void Hal_debugPulse(uint8_t line); | |
128 | +/** | |
129 | + * --------- Hal_delay --------- | |
130 | + * | |
131 | + * Delays for the specified number of milliseconds. | |
132 | + * | |
133 | + * In this example, delay is done with CPU spinning for simplicity's sake. | |
134 | + * This could easily use a timer interrupt for more power savings. | |
135 | + * | |
136 | + * Inputs: | |
137 | + * msecs - the number of milliseconds to delay | |
138 | + * | |
139 | + * Returns: | |
140 | + * None | |
141 | + * | |
142 | + * Side Effects: | |
143 | + * None | |
144 | + * | |
145 | + **/ | |
146 | +extern void Hal_delay(uint16_t msecs); | |
147 | +/** | |
148 | + * --------- Hal_disconnected --------- | |
149 | + * | |
150 | + * Called whenever the MCM peripheral disconnects from a central. | |
151 | + * | |
152 | + * Turns off the CONNECTED_LED to show lack of connectivity to the central | |
153 | + * Could do other things associated with connection to the central. | |
154 | + * | |
155 | + * Inputs: | |
156 | + * None | |
157 | + * | |
158 | + * Returns: | |
159 | + * None | |
160 | + * | |
161 | + * Side Effects: | |
162 | + * CONNECTED_LED off. | |
163 | + * | |
164 | + **/ | |
165 | +extern void Hal_disconnected(void); | |
166 | +/** | |
167 | + * --------- Hal_idleLoop --------- | |
168 | + * | |
169 | + * The idle loop that controls EAP operations. | |
170 | + * | |
171 | + * The hal implements an event driven "idle loop" scheduler. | |
172 | + * When there are no events pending, the idle loop sleeps. | |
173 | + * When an event happens, the idle loop wakes up, and dispatches | |
174 | + * to the appropriate event handler. | |
175 | + * | |
176 | + * The dispatching is done through a handlerTab that has one entry for each type of event. | |
177 | + * Each handlerTab entry should be a handler of type hal_handler *. | |
178 | + * There are currently three types of events, i.e. entries in the handlerTab: | |
179 | + * BUTTON_HANDLER_ID: handler to call upon a button press | |
180 | + * TICK_HANDLER_ID: handler to call upon a timer interrupt | |
181 | + * DISPATCH_HANDLER_ID: handler to call upon a received message from the MCM | |
182 | + * | |
183 | + * Inputs: | |
184 | + * None | |
185 | + * | |
186 | + * Returns: | |
187 | + * None | |
188 | + * | |
189 | + * Side Effects: | |
190 | + * dispatches events as they come in | |
191 | + * | |
192 | + **/ | |
193 | +extern void Hal_idleLoop(void); | |
194 | +/** | |
195 | + * --------- Hal_init --------- | |
196 | + * | |
197 | + * Initialize the hardware | |
198 | + * | |
199 | + * Initializes the EAP and MCM into their reset state. Should be called first. | |
200 | + * Sets up the clock, ports, watchdog timer, etc. | |
201 | + * | |
202 | + * | |
203 | + * Inputs: | |
204 | + * None | |
205 | + * | |
206 | + * Returns: | |
207 | + * None | |
208 | + * | |
209 | + * Side Effects: | |
210 | + * EAP and MCM in their initial state. | |
211 | + * | |
212 | + **/ | |
213 | +extern void Hal_init(void); | |
214 | +/** | |
215 | + * --------- Hal_ledOff --------- | |
216 | + * | |
217 | + * Turns the user LED off. | |
218 | + * | |
219 | + * Inputs: | |
220 | + * None | |
221 | + * | |
222 | + * Returns: | |
223 | + * None | |
224 | + * | |
225 | + * Side Effects: | |
226 | + * User LED off. | |
227 | + * | |
228 | + **/ | |
229 | +extern void Hal_ledOff(void); | |
230 | +/** | |
231 | + * --------- Hal_ledOn --------- | |
232 | + * | |
233 | + * Turns the user LED on. | |
234 | + * | |
235 | + * Inputs: | |
236 | + * None | |
237 | + * | |
238 | + * Returns: | |
239 | + * None | |
240 | + * | |
241 | + * Side Effects: | |
242 | + * User LED on. | |
243 | + * | |
244 | + **/ | |
245 | +extern void Hal_ledOn(void); | |
246 | +/** | |
247 | + * --------- Hal_ledRead --------- | |
248 | + * | |
249 | + * Returns the user LED state. | |
250 | + * | |
251 | + * Inputs: | |
252 | + * None | |
253 | + * | |
254 | + * Returns: | |
255 | + * Bool - (true = user LED is on, false = user LED is off) | |
256 | + * | |
257 | + * Side Effects: | |
258 | + * None | |
259 | + * | |
260 | + **/ | |
261 | +extern bool Hal_ledRead(void); | |
262 | +/** | |
263 | + * --------- Hal_ledToggle --------- | |
264 | + * | |
265 | + * Toggles the user LED. | |
266 | + * | |
267 | + * Inputs: | |
268 | + * None | |
269 | + * | |
270 | + * Returns: | |
271 | + * None | |
272 | + * | |
273 | + * Side Effects: | |
274 | + * User LED toggles state. | |
275 | + * | |
276 | + **/ | |
277 | +extern void Hal_ledToggle(void); | |
278 | +/** | |
279 | + * --------- Hal_tickStart --------- | |
280 | + * | |
281 | + * Sets up the timer to interrupt every msecs milliseconds and the user's tickHandler | |
282 | + * that will be called upon interrupt. | |
283 | + * | |
284 | + * Enable a timer interrupt every msecs ms. The interrupt will cause a TICK event | |
285 | + * to be entered into the event list. Once dispatched by the idle loop, the user's | |
286 | + * tickHandler will be called. | |
287 | + * | |
288 | + * Inputs: | |
289 | + * msecs - the number of milliseconds between tick interrupts | |
290 | + * tickHandler - the address of the user's tick handler that will be called | |
291 | + * | |
292 | + * Returns: | |
293 | + * None | |
294 | + * | |
295 | + * Side Effects: | |
296 | + * tickhandler called by the idle loop | |
297 | + * | |
298 | + **/ | |
299 | +extern void Hal_tickStart(uint16_t msecs, Hal_Handler Handler); | |
300 | + | |
301 | +#ifdef __cplusplus | |
302 | +} | |
303 | +#endif | |
304 | + | |
305 | +#endif /* Hal__H */ | ... | ... |
Platform-MSP-EXP430G2/common.mk
0 → 100644
1 | +OUTDIR = Output | |
2 | +EMMOCO-ROOT = /Applications/Development/Em-Builder-IDE/eclipse/emmoco | |
3 | +EMBUILDER ?= | |
4 | +SCHEMAFILE = $(APPNAME).ems | |
5 | +MAIN = $(APPNAME)-Prog | |
6 | +BINFILE = $(OUTDIR)/$(MAIN).bin | |
7 | +HEXFILE = $(OUTDIR)/$(MAIN).hex | |
8 | +OUTFILE = $(OUTDIR)/$(MAIN).out | |
9 | +OBJECTS = $(OUTDIR)/$(MAIN).obj $(OUTDIR)/$(APPNAME).obj $(OUTDIR)/Hal.obj | |
10 | + | |
11 | +CC = $(TOOLS)/$(GCCARCH)-gcc | |
12 | +LD = $(TOOLS)/$(GCCARCH)-ld | |
13 | +OBJCOPY = $(TOOLS)/$(GCCARCH)-objcopy | |
14 | +SIZE = $(TOOLS)/$(GCCARCH)-size | |
15 | + | |
16 | +CFLAGS = -std=gnu99 -O2 -w -ffunction-sections -fdata-sections -fpack-struct=1 -fno-strict-aliasing -fomit-frame-pointer -c -g -I$(PLATFORM)/Hal -IEm $(COPTS) | |
17 | + | |
18 | +load: out-check | |
19 | + $(EXEC) | |
20 | + | |
21 | +build: $(OUTDIR) out-remove $(OUTFILE) | |
22 | + | |
23 | +$(OUTDIR): | |
24 | +ifeq (,$(findstring Windows,$(OS))) | |
25 | + mkdir $(OUTDIR) | |
26 | +else | |
27 | + cmd /c mkdir $(OUTDIR) | |
28 | +endif | |
29 | + | |
30 | +$(OUTDIR)/$(MAIN).obj: $(MAIN).c Em/$(APPNAME).c | |
31 | + $(CC) $< -o $@ $(CFLAGS) | |
32 | + | |
33 | +$(OUTDIR)/$(APPNAME).obj: Em/$(APPNAME).c | |
34 | + $(CC) $< -o $@ $(CFLAGS) | |
35 | + | |
36 | +$(OUTDIR)/Hal.obj: $(PLATFORM)/Hal/Hal.c | |
37 | + $(CC) $< -o $@ $(CFLAGS) | |
38 | + | |
39 | +Em/$(APPNAME).c: $(SCHEMAFILE) | |
40 | +ifneq (,$(EMBUILDER)) | |
41 | + $(EMBUILDER) -v --root=$(<D) --outdir=Em --jsondir=Em $< | |
42 | +else | |
43 | + @echo terminating because of prior schema errors 1>&2 | |
44 | + @exit 1 | |
45 | +endif | |
46 | + | |
47 | +local-clean: | |
48 | +ifeq (,$(findstring Windows,$(OS))) | |
49 | + rm -rf $(OUTDIR) | |
50 | +else | |
51 | +ifneq (,$(wildcard $(OUTDIR))) | |
52 | + cmd /c rmdir /q /s $(subst /,\,$(OUTDIR)) | |
53 | +endif | |
54 | +endif | |
55 | + | |
56 | +clean: local-clean | |
57 | +ifeq (,$(findstring Windows,$(OS))) | |
58 | + rm -rf $(EM) | |
59 | +else | |
60 | +ifneq (,$(wildcard Em)) | |
61 | + cmd /c rmdir /q /s $(subst /,\,Em) | |
62 | +endif | |
63 | +endif | |
64 | + | |
65 | +out-check: | |
66 | +ifeq (,$(wildcard $(OUTFILE))) | |
67 | + @echo error: $(OUTFILE): No such file or directory 1>&2 | |
68 | + @exit 1 | |
69 | +endif | |
70 | + | |
71 | +out-remove: | |
72 | +ifeq (,$(findstring Windows,$(OS))) | |
73 | + rm -f $(OUTFILE) | |
74 | +else | |
75 | +ifneq (,$(wildcard $(OUTFILE))) | |
76 | + cmd /c del /q $(subst /,\,$(OUTFILE)) | |
77 | +endif | |
78 | +endif | |
79 | + | |
80 | +.PHONY: all load clean local-clean out-check | ... | ... |
Platform-MSP-EXP430G2/rules.mk
0 → 100644
1 | +include $(PLATFORM)/common.mk | |
2 | + | |
3 | +TOOLS ?= $(EMMOCO-ROOT)/msptools/bin | |
4 | +GCCARCH = msp430 | |
5 | +MCU = msp430g2553 | |
6 | + | |
7 | +COPTS = -mmcu=$(MCU) | |
8 | +LDOPTS = -mmcu=$(MCU) -Wl,-Map=$(OUTDIR)/$(MAIN).map,--gc-sections | |
9 | + | |
10 | +ifeq (,$(findstring Windows,$(OS))) | |
11 | +EXEC = $(EMMOCO-ROOT)/msptools/bin/mspdebug rf2500 "prog $(OUTFILE)" 2>&1 | |
12 | +else | |
13 | +EXEC = $(EMMOCO-ROOT)/msptools/bin/MSP430Flasher -i USB -m AUTO -e ERASE_MAIN -n $(MCU) -w $(HEXFILE) -v -z [VCC] -g -s -q | |
14 | +endif | |
15 | + | |
16 | +$(OUTFILE): $(OBJECTS) | |
17 | + $(CC) -o $(OUTFILE) $^ $(LDOPTS) | |
18 | + $(OBJCOPY) -O ihex $(OUTFILE) $(HEXFILE) | |
19 | + $(SIZE) $(OUTFILE) | |
20 | + | |
21 | + | |
22 | + | ... | ... |