X-Git-Url: http://cloudbase.mooo.com/gitweb/irmp.git/blobdiff_plain/eaaf80c3a29b0c4bcc2040b8202152e8c0b675f0..48664931c4d9371a7be6735227011e54954f79cc:/irsnd.c diff --git a/irsnd.c b/irsnd.c index c2a4da7..570b916 100644 --- a/irsnd.c +++ b/irsnd.c @@ -3,7 +3,7 @@ * * Copyright (c) 2010 Frank Meyer - frank(at)fli4l.de * - * $Id: irsnd.c,v 1.18 2010/06/10 21:24:50 fm Exp $ + * $Id: irsnd.c,v 1.19 2010/06/14 15:55:11 fm Exp $ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -153,12 +153,12 @@ typedef unsigned short uint16_t; #define IRSND_FREQ_56_KHZ (uint8_t) ((F_CPU / 56000 / 2) - 1) #define IRSND_FREQ_455_KHZ (uint8_t) ((F_CPU / 455000 / 2) - 1) -#define FDC1_START_BIT_PULSE_LEN (uint8_t)(F_INTERRUPTS * FDC1_START_BIT_PULSE_TIME + 0.5) -#define FDC1_START_BIT_PAUSE_LEN (uint8_t)(F_INTERRUPTS * FDC1_START_BIT_PAUSE_TIME + 0.5) -#define FDC1_PULSE_LEN (uint8_t)(F_INTERRUPTS * FDC1_PULSE_TIME + 0.5) -#define FDC1_1_PAUSE_LEN (uint8_t)(F_INTERRUPTS * FDC1_1_PAUSE_TIME + 0.5) -#define FDC1_0_PAUSE_LEN (uint8_t)(F_INTERRUPTS * FDC1_0_PAUSE_TIME + 0.5) -#define FDC1_FRAME_REPEAT_PAUSE_LEN (uint16_t)(F_INTERRUPTS * FDC1_FRAME_REPEAT_PAUSE_TIME + 0.5) // use uint16_t! +#define FDC_START_BIT_PULSE_LEN (uint8_t)(F_INTERRUPTS * FDC_START_BIT_PULSE_TIME + 0.5) +#define FDC_START_BIT_PAUSE_LEN (uint8_t)(F_INTERRUPTS * FDC_START_BIT_PAUSE_TIME + 0.5) +#define FDC_PULSE_LEN (uint8_t)(F_INTERRUPTS * FDC_PULSE_TIME + 0.5) +#define FDC_1_PAUSE_LEN (uint8_t)(F_INTERRUPTS * FDC_1_PAUSE_TIME + 0.5) +#define FDC_0_PAUSE_LEN (uint8_t)(F_INTERRUPTS * FDC_0_PAUSE_TIME + 0.5) +#define FDC_FRAME_REPEAT_PAUSE_LEN (uint16_t)(F_INTERRUPTS * FDC_FRAME_REPEAT_PAUSE_TIME + 0.5) // use uint16_t! static volatile uint8_t irsnd_busy; static volatile uint8_t irsnd_protocol; @@ -490,11 +490,11 @@ irsnd_send_data (IRMP_DATA * irmp_data_p, uint8_t do_wait) break; } #endif -#if IRSND_SUPPORT_FDC1_PROTOCOL == 1 - case IRMP_FDC1_PROTOCOL: +#if IRSND_SUPPORT_FDC_PROTOCOL == 1 + case IRMP_FDC_PROTOCOL: { - address = bitsrevervse (irmp_data_p->address, FDC1_ADDRESS_LEN); - command = bitsrevervse (irmp_data_p->command, FDC1_COMMAND_LEN); + address = bitsrevervse (irmp_data_p->address, FDC_ADDRESS_LEN); + command = bitsrevervse (irmp_data_p->command, FDC_COMMAND_LEN); irsnd_buffer[0] = (address & 0xFF00) >> 8; // AAAAAAAA irsnd_buffer[1] = (address & 0x00FF); // AAAAAAAA @@ -879,20 +879,20 @@ irsnd_ISR (void) break; } #endif -#if IRSND_SUPPORT_FDC1_PROTOCOL == 1 - case IRMP_FDC1_PROTOCOL: +#if IRSND_SUPPORT_FDC_PROTOCOL == 1 + case IRMP_FDC_PROTOCOL: { - startbit_pulse_len = FDC1_START_BIT_PULSE_LEN; - startbit_pause_len = FDC1_START_BIT_PAUSE_LEN; - complete_data_len = FDC1_COMPLETE_DATA_LEN; - pulse_1_len = FDC1_PULSE_LEN; - pause_1_len = FDC1_1_PAUSE_LEN; - pulse_0_len = FDC1_PULSE_LEN; - pause_0_len = FDC1_0_PAUSE_LEN; - has_stop_bit = FDC1_STOP_BIT; + startbit_pulse_len = FDC_START_BIT_PULSE_LEN; + startbit_pause_len = FDC_START_BIT_PAUSE_LEN; + complete_data_len = FDC_COMPLETE_DATA_LEN; + pulse_1_len = FDC_PULSE_LEN; + pause_1_len = FDC_1_PAUSE_LEN; + pulse_0_len = FDC_PULSE_LEN; + pause_0_len = FDC_0_PAUSE_LEN; + has_stop_bit = FDC_STOP_BIT; n_auto_repetitions = 1; // 1 frame auto_repetition_pause_len = 0; - repeat_frame_pause_len = FDC1_FRAME_REPEAT_PAUSE_LEN; + repeat_frame_pause_len = FDC_FRAME_REPEAT_PAUSE_LEN; irsnd_set_freq (IRSND_FREQ_38_KHZ); break; } @@ -941,13 +941,13 @@ irsnd_ISR (void) case IRMP_BANG_OLUFSEN_PROTOCOL: #endif #if IRSND_SUPPORT_NEC_PROTOCOL == 1 - case IRMP_FDC1_PROTOCOL: + case IRMP_FDC_PROTOCOL: #endif #if IRSND_SUPPORT_SIRCS_PROTOCOL == 1 || IRSND_SUPPORT_NEC_PROTOCOL == 1 || IRSND_SUPPORT_SAMSUNG_PROTOCOL == 1 || IRSND_SUPPORT_MATSUSHITA_PROTOCOL == 1 || \ IRSND_SUPPORT_RECS80_PROTOCOL == 1 || IRSND_SUPPORT_RECS80EXT_PROTOCOL == 1 || IRSND_SUPPORT_DENON_PROTOCOL == 1 || IRSND_SUPPORT_NUBERT_PROTOCOL == 1 || \ - IRSND_SUPPORT_BANG_OLUFSEN_PROTOCOL == 1 || IRSND_SUPPORT_FDC1_PROTOCOL == 1 + IRSND_SUPPORT_BANG_OLUFSEN_PROTOCOL == 1 || IRSND_SUPPORT_FDC_PROTOCOL == 1 { if (pulse_counter == 0) {