Subversion Repositories HomeAutomation

Rev

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

Rev 1972 Rev 1973
Line 13... Line 13...
13
#include <config.h>
13
#include <config.h>
14
#include <drivers/ir/transceiver/irtransceiver.h>
14
#include <drivers/ir/transceiver/irtransceiver.h>
15
#include <drivers/ir/protocols.h>
15
#include <drivers/ir/protocols.h>
16
#include <avr/io.h>
16
#include <avr/io.h>
17
#include <avr/interrupt.h>
17
#include <avr/interrupt.h>
18
 
-
 
19
 
-
 
20
 
-
 
21
#include <stdio.h>
-
 
22
#include <drivers/mcu/gpio.h>
-
 
23
 
-
 
24
 
-
 
25
 
-
 
26
 
-
 
27
 
18
 
28
/*-----------------------------------------------------------------------------
19
/*-----------------------------------------------------------------------------
29
 * Globals
20
 * Globals
30
 *---------------------------------------------------------------------------*/
21
 *---------------------------------------------------------------------------*/
31
#if IR_RX_ENABLE==1
22
#if IR_RX_ENABLE==1
Line 120... Line 111...
120
#if IR_TX_ENABLE==1
111
#if IR_TX_ENABLE==1
121
ISR(IR_COMPARE_VECTOR)
112
ISR(IR_COMPARE_VECTOR)
122
{
113
{
123
    if ((bufIndex&1) == 1) {        /* if odd, ir-pause */
114
    if ((bufIndex&1) == 1) {        /* if odd, ir-pause */
124
        IR_OUTP_LOW();
115
        IR_OUTP_LOW();
125
gpio_clr_pin(EXP_P);
-
 
126
gpio_set_out(EXP_P);
-
 
127
    } else {
116
    } else {
128
        IR_OUTP_HIGH();
117
        IR_OUTP_HIGH();
129
gpio_set_pin(EXP_P);
-
 
130
gpio_set_out(EXP_P);
-
 
131
    }
118
    }
132
   
119
   
133
    //The following three lines is just to allow a start signal to be zero.
120
    //The following three lines is just to allow a start signal to be zero.
134
/*  bufIndex++;
121
/*  bufIndex++;
135
    while (txbuf[bufIndex] == 0){
122
    while (txbuf[bufIndex] == 0){