Infrared4Arduino
Macros
boarddefs.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HAS_AVR_INTERRUPT_H
 
#define SENDING_SUPPORTED
 
#define USE_DEFAULT_ENABLE_IR_IN
 
#define DUTY_CYCLE   50
 
#define PULSE_CORRECTION   3
 
#define BLINKLED   13
 
#define BLINKLED_ON()   (PORTB |= B00100000)
 
#define BLINKLED_OFF()   (PORTB &= B11011111)
 
#define SYSCLOCK   16000000
 
#define USECPERTICK   50
 
#define IR_USE_TIMER2
 
#define TIMER_RESET
 
#define TIMER_ENABLE_PWM   (TCCR2A |= _BV(COM2B1))
 
#define TIMER_DISABLE_PWM   (TCCR2A &= ~(_BV(COM2B1)))
 
#define TIMER_ENABLE_INTR   (TIMSK2 = _BV(OCIE2A))
 
#define TIMER_DISABLE_INTR   (TIMSK2 = 0)
 
#define TIMER_INTR_NAME   TIMER2_COMPA_vect
 
#define TIMER_CONFIG_KHZ(val)
 
#define TIMER_COUNT_TOP   (SYSCLOCK * USECPERTICK / 1000000)
 
#define TIMER_CONFIG_NORMAL()
 
#define SEND_PIN   3
 
#define SENDPIN_ON(pin)   digitalWrite(pin, HIGH)
 
#define SENDPIN_OFF(pin)   digitalWrite(pin, LOW)
 

Macro Definition Documentation

◆ BLINKLED

#define BLINKLED   13

Definition at line 106 of file boarddefs.h.

◆ BLINKLED_OFF

#define BLINKLED_OFF ( )    (PORTB &= B11011111)

Definition at line 108 of file boarddefs.h.

◆ BLINKLED_ON

#define BLINKLED_ON ( )    (PORTB |= B00100000)

Definition at line 107 of file boarddefs.h.

◆ DUTY_CYCLE

#define DUTY_CYCLE   50

Definition at line 36 of file boarddefs.h.

◆ HAS_AVR_INTERRUPT_H

#define HAS_AVR_INTERRUPT_H

Definition at line 26 of file boarddefs.h.

◆ IR_USE_TIMER2

#define IR_USE_TIMER2

Definition at line 209 of file boarddefs.h.

◆ PULSE_CORRECTION

#define PULSE_CORRECTION   3

Definition at line 40 of file boarddefs.h.

◆ SEND_PIN

#define SEND_PIN   3

Definition at line 267 of file boarddefs.h.

◆ SENDING_SUPPORTED

#define SENDING_SUPPORTED

Definition at line 29 of file boarddefs.h.

◆ SENDPIN_OFF

#define SENDPIN_OFF (   pin)    digitalWrite(pin, LOW)

Definition at line 678 of file boarddefs.h.

◆ SENDPIN_ON

#define SENDPIN_ON (   pin)    digitalWrite(pin, HIGH)

Definition at line 674 of file boarddefs.h.

◆ SYSCLOCK

#define SYSCLOCK   16000000

Definition at line 117 of file boarddefs.h.

◆ TIMER_CONFIG_KHZ

#define TIMER_CONFIG_KHZ (   val)
Value:
({ \
const uint8_t pwmval = SYSCLOCK / 2000 / (val); \
TCCR2A = _BV(WGM20); \
TCCR2B = _BV(WGM22) | _BV(CS20); \
OCR2A = pwmval; \
OCR2B = pwmval / 3; \
})
#define SYSCLOCK
Definition: boarddefs.h:117

Definition at line 228 of file boarddefs.h.

◆ TIMER_CONFIG_NORMAL

#define TIMER_CONFIG_NORMAL ( )
Value:
({ \
TCCR2A = _BV(WGM21); \
TCCR2B = _BV(CS21); \
OCR2A = TIMER_COUNT_TOP / 8; \
TCNT2 = 0; \
})
#define TIMER_COUNT_TOP
Definition: boarddefs.h:236

Definition at line 247 of file boarddefs.h.

◆ TIMER_COUNT_TOP

#define TIMER_COUNT_TOP   (SYSCLOCK * USECPERTICK / 1000000)

Definition at line 236 of file boarddefs.h.

◆ TIMER_DISABLE_INTR

#define TIMER_DISABLE_INTR   (TIMSK2 = 0)

Definition at line 225 of file boarddefs.h.

◆ TIMER_DISABLE_PWM

#define TIMER_DISABLE_PWM   (TCCR2A &= ~(_BV(COM2B1)))

Definition at line 223 of file boarddefs.h.

◆ TIMER_ENABLE_INTR

#define TIMER_ENABLE_INTR   (TIMSK2 = _BV(OCIE2A))

Definition at line 224 of file boarddefs.h.

◆ TIMER_ENABLE_PWM

#define TIMER_ENABLE_PWM   (TCCR2A |= _BV(COM2B1))

Definition at line 222 of file boarddefs.h.

◆ TIMER_INTR_NAME

#define TIMER_INTR_NAME   TIMER2_COMPA_vect

Definition at line 226 of file boarddefs.h.

◆ TIMER_RESET

#define TIMER_RESET

Definition at line 221 of file boarddefs.h.

◆ USE_DEFAULT_ENABLE_IR_IN

#define USE_DEFAULT_ENABLE_IR_IN

Definition at line 33 of file boarddefs.h.

◆ USECPERTICK

#define USECPERTICK   50

Definition at line 121 of file boarddefs.h.