]>
Commit | Line | Data |
---|---|---|
1 | /*---------------------------------------------------------------------------------------------------------------------------------------------------\r | |
2 | * irsnd.h\r | |
3 | *\r | |
4 | * Copyright (c) 2010-2011 Frank Meyer - frank(at)fli4l.de\r | |
5 | *\r | |
6 | * $Id: irsnd.h,v 1.7 2012/02/16 12:39:36 fm Exp $\r | |
7 | *\r | |
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 | |
20 | #if defined(__18CXX) // Microchip C18 declaration of missing typedef\r | |
21 | typedef unsigned char uint8_t;\r | |
22 | typedef unsigned int uint16_t;\r | |
23 | #endif \r | |
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 | |
29 | \r | |
30 | /**\r | |
31 | * Initialize ISND encoder\r | |
32 | * @details Configures ISDN output pin\r | |
33 | */\r | |
34 | extern 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 | |
41 | extern 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 | |
49 | extern uint8_t irsnd_send_data (IRMP_DATA *, uint8_t);\r | |
50 | \r | |
51 | /**\r | |
52 | * Stop sending IRMP data\r | |
53 | * @details stops sending IRMP data\r | |
54 | */\r | |
55 | extern void irsnd_stop (void);\r | |
56 | \r | |
57 | /**\r | |
58 | * ISR routine\r | |
59 | * @details ISR routine, called 10000 times per second\r | |
60 | */\r | |
61 | extern uint8_t irsnd_ISR (void);\r | |
62 | \r | |
63 | #if IRSND_USE_CALLBACK == 1\r | |
64 | extern void irsnd_set_callback_ptr (void (*cb)(uint8_t));\r | |
65 | #endif // IRSND_USE_CALLBACK == 1\r | |
66 | \r | |
67 | #endif /* _WC_IRSND_H_ */\r |