forked from markqvist/LibAPRS
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdevice.h
More file actions
43 lines (35 loc) · 859 Bytes
/
Copy pathdevice.h
File metadata and controls
43 lines (35 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "constants.h"
#ifndef DEVICE_CONFIGURATION
#define DEVICE_CONFIGURATION
// CPU settings
#ifndef TARGET_CPU
#define TARGET_CPU m328p
#endif
#ifndef F_CPU
#define F_CPU 16000000
#endif
#ifndef FREQUENCY_CORRECTION
#define FREQUENCY_CORRECTION 0
#endif
// Sampling & timer setup
#define CONFIG_AFSK_DAC_SAMPLERATE 9600
// Port settings
#if TARGET_CPU == m328p
#define DAC_PORT PORTD
#define DAC_DDR DDRD
#define LED_PORT PORTB
#define LED_DDR DDRB
// Use Arduino digital pin 13 (PB5) for TX_PIN for Arduino Pro Mini and Arduino Nano
#if defined(ARDUINO_AVR_PRO) || defined(ARDUINO_AVR_NANO)
#define LED_RX_PIN 0
#define LED_TX_PIN 5
#else
#define LED_RX_PIN 2
#define LED_TX_PIN 1
#endif
#define ADC_PORT PORTC
#define ADC_DDR DDRC
#define ADC_PIN 0
#define PPT_PIN 3
#endif
#endif