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