]> cloudbase.mooo.com Git - irmp.git/blob - irsnd.h
version 1.9.3: added thomson protocol
[irmp.git] / irsnd.h
1 /*---------------------------------------------------------------------------------------------------------------------------------------------------
2 * irsnd.h
3 *
4 * Copyright (c) 2010-2011 Frank Meyer - frank(at)fli4l.de
5 *
6 * $Id: irsnd.h,v 1.5 2011/05/20 09:31:25 fm Exp $
7 *
8 * ATMEGA88 @ 8 MHz
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *---------------------------------------------------------------------------------------------------------------------------------------------------
15 */
16
17 #ifndef _WC_IRSND_H_
18 #define _WC_IRSND_H_
19
20 #define IRSND_NO_REPETITIONS 0 // no repetitions
21 #define IRSND_MAX_REPETITIONS 14 // max # of repetitions
22 #define IRSND_ENDLESS_REPETITION 15 // endless repetions
23 #define IRSND_REPETITION_MASK 0x0F // lower nibble of flags
24
25 /**
26 * Initialize ISND encoder
27 * @details Configures ISDN output pin
28 */
29 extern void irsnd_init (void);
30
31 /**
32 * Check if sender is busy
33 * @details checks if sender is busy
34 * @return TRUE: sender is busy, FALSE: sender is not busy
35 */
36 extern uint8_t irsnd_is_busy (void);
37
38 /**
39 * Send IRMP data
40 * @details sends IRMP data
41 * @param pointer to IRMP data structure
42 * @return TRUE: successful, FALSE: failed
43 */
44 extern uint8_t irsnd_send_data (IRMP_DATA *, uint8_t);
45
46 /**
47 * Stop sending IRMP data
48 * @details stops sending IRMP data
49 */
50 extern void irsnd_stop (void);
51
52 /**
53 * ISR routine
54 * @details ISR routine, called 10000 times per second
55 */
56 extern uint8_t irsnd_ISR (void);
57
58 #if IRSND_USE_CALLBACK == 1
59 extern void irsnd_set_callback_ptr (void (*cb)(uint8_t));
60 #endif // IRSND_USE_CALLBACK == 1
61
62 #endif /* _WC_IRSND_H_ */