Subversion Repositories HomeAutomation

Rev

Rev 1641 | Rev 1868 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1641 Rev 1747
Line 1... Line 1...
1
/*
1
/*
2
 * $Id: bios.c 1641 2010-12-05 22:37:37Z nattgris $
2
 * $Id: bios.c 1747 2011-08-16 15:32:00Z arune $
3
 */
3
 */
4
 
4
 
5
#include <inttypes.h>
5
#include <inttypes.h>
6
#include <avr/io.h>
6
#include <avr/io.h>
7
#include <avr/interrupt.h>
7
#include <avr/interrupt.h>
Line 137... Line 137...
137
    IVSEL_REG = _BV(IVCE);
137
    IVSEL_REG = _BV(IVCE);
138
    IVSEL_REG = _BV(IVSEL);
138
    IVSEL_REG = _BV(IVSEL);
139
    sei();
139
    sei();
140
 
140
 
141
    if (Can_Init() != CAN_OK) BIOS_Reset();
141
    if (Can_Init() != CAN_OK) BIOS_Reset();
-
 
142
#if defined(INITDDRB)
-
 
143
    DDRB=INITDDRB;
-
 
144
#endif
-
 
145
#if defined(INITDDRC)
-
 
146
    DDRC=INITDDRC;
-
 
147
#endif
-
 
148
#if defined(INITDDRD)
-
 
149
    DDRD=INITDDRD;
-
 
150
#endif
-
 
151
#if defined(INITPORTB)
-
 
152
    PORTB=INITPORTB;
-
 
153
#endif
-
 
154
#if defined(INITPORTC)
-
 
155
    PORTC=INITPORTC;
-
 
156
#endif
-
 
157
#if defined(INITPORTD)
-
 
158
    PORTD=INITPORTD;
-
 
159
#endif
-
 
160
#if defined(INITPINB)
-
 
161
    PINB=INITPINB;
-
 
162
#endif
-
 
163
#if defined(INITPINC)
-
 
164
    PINC=INITPINC;
-
 
165
#endif
-
 
166
#if defined(INITPIND)
-
 
167
    PIND=INITPIND;
-
 
168
#endif
-
 
169
 
142
 
170
 
143
    tx_msg.RemoteFlag = 0;
171
    tx_msg.RemoteFlag = 0;
144
    tx_msg.ExtendedFlag = 1;
172
    tx_msg.ExtendedFlag = 1;
145
    tx_msg.Id = CAN_ID_NMT_BIOS_START;
173
    tx_msg.Id = CAN_ID_NMT_BIOS_START;
146
    tx_msg.DataLength = 8;
174
    tx_msg.DataLength = 8;