OpenModem/device.h

48 lines
1.0 KiB
C
Raw Normal View History

2014-12-18 15:45:36 -07:00
#include "util/constants.h"
2014-12-02 17:10:06 -07:00
#ifndef DEVICE_CONFIGURATION
#define DEVICE_CONFIGURATION
// CPU settings
#define TARGET_CPU m1284p
#define F_CPU 20000000UL
2014-12-02 17:10:06 -07:00
#define FREQUENCY_CORRECTION 0
// Voltage references
// TODO: Determine best defaults
#define CONFIG_ADC_REF 128
#define CONFIG_DAC_REF 255
// Demodulator settings
2018-04-24 07:34:50 -06:00
#define OPEN_SQUELCH true
2014-12-18 15:45:36 -07:00
2014-12-02 17:10:06 -07:00
// Serial settings
#define BAUD 115200
2014-12-18 15:45:36 -07:00
#define SERIAL_DEBUG false
#define TX_MAXWAIT 2UL
2019-01-08 12:56:58 -07: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?
#define CONFIG_SERIAL_TIMEOUT_MS 10
2014-12-02 17:10:06 -07:00
2018-12-29 07:57:49 -07:00
// CSMA Settings
2019-01-05 05:47:46 -07:00
#define CONFIG_FULL_DUPLEX false // TODO: Actually implement fdx
2018-12-29 07:57:49 -07:00
#define CONFIG_CSMA_P 255
2019-01-08 12:56:58 -07:00
#define AX25_MIN_FRAME_LEN 1
#define AX25_MAX_FRAME_LEN 1532
2018-12-29 16:32:19 -07:00
// Packet settings
#define CONFIG_PASSALL false
2014-12-02 17:10:06 -07:00
// Port settings
#if TARGET_CPU == m1284p
#define ADC_PORT PORTA
#define ADC_DDR DDRA
#define DAC_PORT PORTB
#define DAC_DDR DDRB
#define LED_PORT PORTC
#define LED_DDR DDRC
2014-12-18 15:45:36 -07:00
#endif
2014-12-02 17:10:06 -07:00
#endif