Initial class for isix driver handling

master
Lucjan Bryndza 2014-05-06 22:07:56 +02:00
rodzic e3cf9f2a56
commit 48992ab2cf
2 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -2,6 +2,7 @@
LIBPSK_CPPSRC += $(wildcard $(LIBPSK_DIR)/libpsk/src/codec/*.cpp)
LIBPSK_CPPSRC += $(wildcard $(LIBPSK_DIR)/libpsk/src/ham/*.cpp)
LIBPSK_CPPSRC += $(wildcard $(LIBPSK_DIR)/libpsk/src/psk/*.cpp)
LIBPSK_CPPSRC += $(wildcard $(LIBPSK_DIR)/libpsk/src/port/isix/*.cpp)
LIBPSK_INC += -I$(LIBPSK_DIR)/libpsk/include

Wyświetl plik

@ -9,7 +9,7 @@
#ifndef COMPILED_UNDER_ISIX
#include "libpsk/port/pulse/pulse_device.hpp"
#else
#warning not implemented yet
#include "libpsk/port/isix/stm32adac_device.hpp"
#endif
#include "libpsk/psk/decoder.hpp"
#include "libpsk/psk/modulator.hpp"
@ -31,13 +31,13 @@ namespace {
#ifndef COMPILED_UNDER_ISIX
inline trx_device_base* create_default_device( ham_digi::handler_t h )
{
static const int sys_idx = ham_digi::SYS_CALLBACK_ID;
static constexpr auto sys_idx = ham_digi::SYS_CALLBACK_ID;
return new pulse_device( std::bind(h, sys_idx, std::placeholders::_1) );
}
#else
inline trx_device_base* create_default_device( ham_digi::handler_t h ) {
terminate();
return nullptr;
static constexpr auto sys_idx = ham_digi::SYS_CALLBACK_ID;
return new stm32adac_device( std::bind( h, sys_idx, std::placeholders::_1 ) );
}
#endif
}