Commenting

This commit is contained in:
Mark Qvist 2014-04-06 17:17:13 +02:00
parent 0c4bc75be9
commit 017a1e6887
6 changed files with 263 additions and 62 deletions

View file

@ -13,13 +13,21 @@ void hw_afsk_dacInit(int ch, struct Afsk *_ctx);
// ADC initialization
#define AFSK_ADC_INIT(ch, ctx) hw_afsk_adcInit(ch, ctx)
// LED on/off (pin 13)
#define AFSK_STROBE_INIT() do { DDRB |= BV(5); } while (0)
#define AFSK_STROBE_ON() do { PORTB |= BV(5); } while (0)
#define AFSK_STROBE_OFF() do { PORTB &= ~BV(5); } while (0)
// LED TX/RX on/off (pin 9/10)
#define LED_TX_INIT() do { DDRB |= BV(1); } while (0)
#define LED_TX_ON() do { PORTB |= BV(1); } while (0)
#define LED_TX_OFF() do { PORTB &= ~BV(1); } while (0)
#define LED_RX_INIT() do { DDRB |= BV(2); } while (0)
#define LED_RX_ON() do { PORTB |= BV(2); } while (0)
#define LED_RX_OFF() do { PORTB &= ~BV(2); } while (0)
#define PTT_INIT() do { DDRD |= BV(3); } while (0)
#define PTT_ON() do { PORTD |= BV(3); } while (0)
#define PTT_OFF() do { PORTD &= ~BV(3); } while (0)
// Initialization, start and stop for DAC
#define AFSK_DAC_INIT(ch, ctx) do { (void)ch, (void)ctx; DDRD |= 0xF0; DDRB |= BV(3); } while (0)
#define AFSK_DAC_INIT(ch, ctx) do { (void)ch, (void)ctx; DDRD |= 0xF4; DDRB |= BV(3); } while (0)
#define AFSK_DAC_IRQ_START(ch) do { (void)ch; extern bool hw_afsk_dac_isr; PORTB |= BV(3); hw_afsk_dac_isr = true; } while (0)
#define AFSK_DAC_IRQ_STOP(ch) do { (void)ch; extern bool hw_afsk_dac_isr; PORTB &= ~BV(3); hw_afsk_dac_isr = false; } while (0)