Subversion Repositories HomeAutomation

Rev

Rev 145 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 145 Rev 149
Line 15... Line 15...
15
#include <avr/interrupt.h>
15
#include <avr/interrupt.h>
16
#include <avr/wdt.h>
16
#include <avr/wdt.h>
17
#include <stdio.h>
17
#include <stdio.h>
18
/* lib files */
18
/* lib files */
19
#include <can.h>
19
#include <can.h>
20
#include <uart.h>
20
#include <serial.h>
21
#include <timebase.h>
21
#include <timebase.h>
22
 
22
 
23
 
23
 
24
/*-----------------------------------------------------------------------------
24
/*-----------------------------------------------------------------------------
25
 * Main Program
25
 * Main Program
26
 *---------------------------------------------------------------------------*/
26
 *---------------------------------------------------------------------------*/
27
int main(void) {
27
int main(void) {
28
    Timebase_Init();
28
    Timebase_Init();
29
    Uart_Init();
29
    Serial_Init();
30
    sei();
30
    sei();
31
   
31
   
32
    printf("\n------------------------------------------------------------\n");
32
    printf("\n------------------------------------------------------------\n");
33
    printf(  "   CAN Test: Periodic Transmission\n");
33
    printf(  "   CAN Test: Periodic Transmission\n");
34
    printf(  "------------------------------------------------------------\n");
34
    printf(  "------------------------------------------------------------\n");
Line 43... Line 43...
43
   
43
   
44
    uint32_t timeStamp = 0;
44
    uint32_t timeStamp = 0;
45
   
45
   
46
    Can_Message_t txMsg;
46
    Can_Message_t txMsg;
47
    Can_Message_t rxMsg;
47
    Can_Message_t rxMsg;
48
    txMsg.DataLength = 8;
-
 
49
    txMsg.Data.bytes[0] = 7;
-
 
50
    txMsg.Id = 0;
48
    txMsg.Id = 0;
51
    txMsg.RemoteFlag = 0;
49
    txMsg.RemoteFlag = 0;
52
    txMsg.ExtendedFlag = 1;
50
    txMsg.ExtendedFlag = 1;
53
   
51
   
54
    /* main loop */
52
    /* main loop */