2014-12-18 17:45:36 -05:00
|
|
|
#include "util/constants.h"
|
|
|
|
|
2014-12-02 19:10:06 -05:00
|
|
|
#ifndef DEVICE_CONFIGURATION
|
|
|
|
#define DEVICE_CONFIGURATION
|
|
|
|
|
|
|
|
// CPU settings
|
2018-12-27 14:24:21 -05:00
|
|
|
#define TARGET_CPU m1284p
|
2019-01-01 14:34:02 -05:00
|
|
|
#define F_CPU 20000000UL
|
2014-12-02 19:10:06 -05:00
|
|
|
#define FREQUENCY_CORRECTION 0
|
|
|
|
|
2019-01-04 10:13:29 -05:00
|
|
|
// Voltage references
|
|
|
|
// TODO: Determine best defaults
|
|
|
|
#define CONFIG_ADC_REF 128
|
|
|
|
#define CONFIG_DAC_REF 255
|
|
|
|
|
2019-01-12 09:12:51 -05:00
|
|
|
// TODO: Change this back to default
|
|
|
|
#define CONFIG_LED_INTENSITY 35
|
|
|
|
//#define CONFIG_LED_INTENSITY 192
|
|
|
|
#define COM_LED_TIMEOUT_MS 40
|
|
|
|
|
2019-01-04 10:13:29 -05:00
|
|
|
// Demodulator settings
|
2018-04-24 09:34:50 -04:00
|
|
|
#define OPEN_SQUELCH true
|
2014-12-18 17:45:36 -05:00
|
|
|
|
2014-12-02 19:10:06 -05:00
|
|
|
// Serial settings
|
2018-12-27 14:24:21 -05:00
|
|
|
#define BAUD 115200
|
2014-12-18 17:45:36 -05:00
|
|
|
#define SERIAL_DEBUG false
|
|
|
|
#define TX_MAXWAIT 2UL
|
2019-01-08 14:56:58 -05:00
|
|
|
#define CONFIG_QUEUE_SIZE 7500
|
|
|
|
#define CONFIG_QUEUE_MAX_LENGTH 15
|
|
|
|
#define CONFIG_SERIAL_BUFFER_SIZE 1532 // TODO: Tune this, what is actually required?
|
2019-01-08 16:24:29 -05:00
|
|
|
#define CONFIG_SERIAL_TIMEOUT_MS 10
|
2014-12-02 19:10:06 -05:00
|
|
|
|
2018-12-29 09:57:49 -05:00
|
|
|
// CSMA Settings
|
2019-01-05 07:47:46 -05:00
|
|
|
#define CONFIG_FULL_DUPLEX false // TODO: Actually implement fdx
|
2018-12-29 09:57:49 -05:00
|
|
|
#define CONFIG_CSMA_P 255
|
|
|
|
|
2019-01-08 14:56:58 -05:00
|
|
|
#define AX25_MIN_FRAME_LEN 1
|
|
|
|
#define AX25_MAX_FRAME_LEN 1532
|
|
|
|
|
2018-12-29 18:32:19 -05:00
|
|
|
// Packet settings
|
|
|
|
#define CONFIG_PASSALL false
|
|
|
|
|
2014-12-02 19:10:06 -05:00
|
|
|
// Port settings
|
2018-12-27 14:24:21 -05:00
|
|
|
#if TARGET_CPU == m1284p
|
2019-01-12 09:12:51 -05:00
|
|
|
#define ADC_PORT PORTA
|
|
|
|
#define ADC_DDR DDRA
|
|
|
|
#define DAC_PORT PORTC
|
|
|
|
#define DAC_DDR DDRC
|
|
|
|
#define VREF_PORT PORTD
|
|
|
|
#define VREF_DDR DDRD
|
|
|
|
#define LED_PORT PORTB
|
|
|
|
#define LED_DDR DDRB
|
|
|
|
#endif
|
|
|
|
|
2014-12-18 17:45:36 -05:00
|
|
|
#endif
|
2014-12-02 19:10:06 -05:00
|
|
|
|
2019-01-12 09:12:51 -05:00
|
|
|
/*
|
|
|
|
|
|
|
|
PA0 ANALOG_IN
|
|
|
|
PA1
|
|
|
|
PA2
|
|
|
|
PA3
|
|
|
|
PA4
|
|
|
|
PA5
|
|
|
|
PA6
|
|
|
|
PA7
|
|
|
|
|
|
|
|
PB0 LED_RX
|
|
|
|
PB1 LED_TX
|
|
|
|
PB2 LED_STATUS
|
|
|
|
PB3 LED_DRAIN_PWM
|
|
|
|
PB4 LED_COM / SPI_SS PGM
|
|
|
|
PB5 SPI_MOSI SD/PGM
|
|
|
|
PB6 SPI_MISO SD/PGM
|
|
|
|
PB7 SPI_CLK SD/PGM
|
|
|
|
|
|
|
|
PC0 DAC_0
|
|
|
|
PC1 DAC_1
|
|
|
|
PC2 DAC_2
|
|
|
|
PC3 DAC_3
|
|
|
|
PC4 DAC_4
|
|
|
|
PC5 DAC_5
|
|
|
|
PC6 DAC_6
|
|
|
|
PC7 DAC_7
|
|
|
|
|
|
|
|
PD0 UART0_RX
|
|
|
|
PD1 UART0_TX
|
|
|
|
PD2 UART1_RX GPS
|
|
|
|
PD3 UART1_TX GPS
|
|
|
|
PD4
|
|
|
|
PD5
|
|
|
|
PD6 REF_DAC
|
|
|
|
PD7 REF_ADC
|
|
|
|
|
|
|
|
*/
|