This commit is contained in:
Mark Qvist 2014-04-03 22:41:49 +02:00
parent 6b6042462c
commit 9b435bbd59
5 changed files with 10 additions and 77 deletions

View File

@ -9,8 +9,6 @@
#define HDLC_RESET 0x7F #define HDLC_RESET 0x7F
#define AX25_ESC 0x1B #define AX25_ESC 0x1B
#define LOG_LEVEL AFSK_LOG_LEVEL
#define LOG_FORMAT AFSK_LOG_FORMAT
#include <cfg/log.h> #include <cfg/log.h>
#include <cpu/power.h> #include <cpu/power.h>
@ -28,7 +26,6 @@
// Modulator constants // Modulator constants
#define MARK_FREQ 1200 #define MARK_FREQ 1200
#define MARK_INC (uint16_t)(DIV_ROUND(SIN_LEN * (uint32_t)MARK_FREQ, CONFIG_AFSK_DAC_SAMPLERATE)) #define MARK_INC (uint16_t)(DIV_ROUND(SIN_LEN * (uint32_t)MARK_FREQ, CONFIG_AFSK_DAC_SAMPLERATE))
#define SPACE_FREQ 2200 #define SPACE_FREQ 2200
#define SPACE_INC (uint16_t)(DIV_ROUND(SIN_LEN * (uint32_t)SPACE_FREQ, CONFIG_AFSK_DAC_SAMPLERATE)) #define SPACE_INC (uint16_t)(DIV_ROUND(SIN_LEN * (uint32_t)SPACE_FREQ, CONFIG_AFSK_DAC_SAMPLERATE))
@ -519,7 +516,7 @@ void afsk_init(Afsk *af, int adc_ch, int dac_ch)
AFSK_ADC_INIT(adc_ch, af); AFSK_ADC_INIT(adc_ch, af);
AFSK_DAC_INIT(dac_ch, af); AFSK_DAC_INIT(dac_ch, af);
AFSK_STROBE_INIT(); AFSK_STROBE_INIT();
LOG_INFO("MARK_INC %d, SPACE_INC %d\n", MARK_INC, SPACE_INC); //LOG_INFO("MARK_INC %d, SPACE_INC %d\n", MARK_INC, SPACE_INC);
DB(af->fd._type = KFT_AFSK); DB(af->fd._type = KFT_AFSK);
af->fd.write = afsk_write; af->fd.write = afsk_write;

View File

@ -1,14 +1,12 @@
#ifndef NET_AFSK_H #ifndef FSK_MODEM_H
#define NET_AFSK_H #define FSK_MODEM_H
#include "cfg/cfg_afsk.h" #include "config.h"
#include "hw/hw_afsk.h" #include "hardware.h"
#include <cfg/compiler.h> #include <cfg/compiler.h>
#include <io/kfile.h> #include <io/kfile.h>
#include <struct/fifobuf.h> #include <struct/fifobuf.h>

View File

@ -1,77 +1,15 @@
#ifndef CFG_AFSK_H #ifndef FSK_CFG
#define CFG_AFSK_H #define FSK_CFG
/**
* Module logging level.
*
* $WIZ$ type = "enum"
* $WIZ$ value_list = "log_level"
*/
//#define AFSK_LOG_LEVEL LOG_LVL_WARN
/**
* Module logging format.
*
* $WIZ$ type = "enum"
* $WIZ$ value_list = "log_format"
*/
#define AFSK_LOG_FORMAT LOG_FMT_TERSE
/**
* AFSK discriminator filter type.
*
* $WIZ$ type = "enum"; value_list = "afsk_filter_list"
*/
#define CONFIG_AFSK_FILTER AFSK_CHEBYSHEV #define CONFIG_AFSK_FILTER AFSK_CHEBYSHEV
/**
* AFSK receiver buffer length.
*
* $WIZ$ type = "int"
* $WIZ$ min = 2
*/
#define CONFIG_AFSK_RX_BUFLEN 64 #define CONFIG_AFSK_RX_BUFLEN 64
/**
* AFSK transimtter buffer length.
*
* $WIZ$ type = "int"
* $WIZ$ min = 2
*/
#define CONFIG_AFSK_TX_BUFLEN 64 #define CONFIG_AFSK_TX_BUFLEN 64
/**
* AFSK DAC sample rate for modem outout.
* $WIZ$ type = "int"
* $WIZ$ min = 2400
*/
#define CONFIG_AFSK_DAC_SAMPLERATE 9600 #define CONFIG_AFSK_DAC_SAMPLERATE 9600
/**
* AFSK RX timeout in ms, set to -1 to disable.
* $WIZ$ type = "int"
* $WIZ$ min = -1
*/
#define CONFIG_AFSK_RXTIMEOUT 0 #define CONFIG_AFSK_RXTIMEOUT 0
/**
* AFSK Preamble length in [ms], before starting transmissions.
* $WIZ$ type = "int"
* $WIZ$ min = 1
*/
#define CONFIG_AFSK_PREAMBLE_LEN 300UL #define CONFIG_AFSK_PREAMBLE_LEN 300UL
/**
* AFSK Trailer length in [ms], before stopping transmissions.
* $WIZ$ type = "int"
* $WIZ$ min = 1
*/
#define CONFIG_AFSK_TRAILER_LEN 50UL #define CONFIG_AFSK_TRAILER_LEN 50UL
#endif /* CFG_AFSK_H */ #endif

View File

@ -1,2 +1,2 @@
#define VERS_BUILD 10 #define VERS_BUILD 30
#define VERS_HOST "vixen" #define VERS_HOST "vixen"