Rev 73 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 73 | Rev 79 | ||
|---|---|---|---|
| Line 7... | Line 7... | ||
| 7 | * |
7 | * |
| 8 | * Author Date Comment |
8 | * Author Date Comment |
| 9 | *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
9 | *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 10 | * Johan Böhlin 21-10-06 Original (Rev 1.0) |
10 | * Johan Böhlin 21-10-06 Original (Rev 1.0) |
| 11 | ********************************************************************/ |
11 | ********************************************************************/ |
| - | 12 | // $IDI$ |
|
| 12 | 13 | ||
| 13 | #include <compiler.h> |
14 | #include <compiler.h> |
| 14 | #include <stackTasks.h> |
15 | #include <stackTasks.h> |
| 15 | #include <CANdefs.h> |
16 | #include <CANdefs.h> |
| 16 | #include <CAN.h> |
17 | #include <CAN.h> |
| 17 | //#include <Tick.h> |
- | |
| 18 | #include <boot.h> |
18 | #include <boot.h> |
| 19 | 19 | ||
| 20 | /** V E C T O R R E M A P P I N G *******************************************/ |
20 | /** V E C T O R R E M A P P I N G *******************************************/ |
| 21 | 21 | ||
| 22 | #pragma code _HIGH_INTERRUPT_VECTOR = 0x000008 |
22 | #pragma code _HIGH_INTERRUPT_VECTOR = 0x000008 |
| Line 99... | Line 99... | ||
| 99 | 99 | ||
| 100 | switch(pgs) |
100 | switch(pgs) |
| 101 | { |
101 | { |
| 102 | case pgsWATING_START: |
102 | case pgsWATING_START: |
| 103 | // Check if there is bootloader start packet |
103 | // Check if there is bootloader start packet |
| 104 | if (hasPacket==TRUE && cm.funct==FUNCT_BOOTLOADER && cm.funcc==FUNCC_BOOT_INIT && cm.data |
104 | if (hasPacket==TRUE && cm.funct==FUNCT_BOOTLOADER && cm.funcc==FUNCC_BOOT_INIT && ((((unsigned int)cm.data[RID_HIGH_INDEX])<<8)+cm.data[RID_LOW_INDEX])==MY_ID && cm.nid==MY_NID) |
| 105 | { |
105 | { |
| 106 | // Has new start packet |
106 | // Has new start packet |
| 107 | pgmAddress = (((DWORD)cm.data[ADDRU_INDEX])<<16)+(((DWORD)cm.data[ADDRH_INDEX])<<8)+((DWORD)cm.data[ADDRL_INDEX]); |
107 | pgmAddress = (((DWORD)cm.data[ADDRU_INDEX])<<16)+(((DWORD)cm.data[ADDRH_INDEX])<<8)+((DWORD)cm.data[ADDRL_INDEX]); |
| 108 | programmerSid = cm.sid; |
108 | programmerSid = cm.sid; |
| 109 | t = tickGet(); |
109 | t = tickGet(); |