]> cloudbase.mooo.com Git - irmp.git/blame - irsnd.h
Version 2.0.4
[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
cea96148 6 * $Id: irsnd.h,v 1.7 2012/02/16 12:39:36 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
cea96148 20#if defined(__18CXX) // Microchip C18 declaration of missing typedef\r
9c86ff1a 21typedef unsigned char uint8_t;\r
22typedef unsigned int uint16_t;\r
cea96148 23#endif \r
9c86ff1a 24\r
25#define IRSND_NO_REPETITIONS 0 // no repetitions\r
26#define IRSND_MAX_REPETITIONS 14 // max # of repetitions\r
27#define IRSND_ENDLESS_REPETITION 15 // endless repetions\r
28#define IRSND_REPETITION_MASK 0x0F // lower nibble of flags\r
beda975f 29\r
4225a882 30/**\r
31 * Initialize ISND encoder\r
32 * @details Configures ISDN output pin\r
33 */\r
34extern void irsnd_init (void);\r
35\r
36/**\r
37 * Check if sender is busy\r
38 * @details checks if sender is busy\r
39 * @return TRUE: sender is busy, FALSE: sender is not busy\r
40 */\r
41extern uint8_t irsnd_is_busy (void);\r
42\r
43/**\r
44 * Send IRMP data\r
45 * @details sends IRMP data\r
46 * @param pointer to IRMP data structure\r
47 * @return TRUE: successful, FALSE: failed\r
48 */\r
879b06c2 49extern uint8_t irsnd_send_data (IRMP_DATA *, uint8_t);\r
4225a882 50\r
beda975f 51/**\r
52 * Stop sending IRMP data\r
53 * @details stops sending IRMP data\r
54 */\r
55extern void irsnd_stop (void);\r
56\r
4225a882 57/**\r
58 * ISR routine\r
59 * @details ISR routine, called 10000 times per second\r
60 */\r
61extern uint8_t irsnd_ISR (void);\r
62\r
f50e01e7 63#if IRSND_USE_CALLBACK == 1\r
64extern void irsnd_set_callback_ptr (void (*cb)(uint8_t));\r
65#endif // IRSND_USE_CALLBACK == 1\r
66\r
4225a882 67#endif /* _WC_IRSND_H_ */\r