Rework to support test project build.

pull/4/head
CInsights 2018-03-14 19:46:44 +11:00
rodzic 3bf228a84c
commit ef46c486e6
10 zmienionych plików z 26 dodań i 25 usunięć

Wyświetl plik

@ -20,6 +20,8 @@
/* Driver exported variables. */
/*===========================================================================*/
/* TODO: Remove or recalculate Matlab/Octave filter coefficients. */
#if MAG_FILTER_GEN_COEFF == TRUE
float32_t mag_filter_coeff_f32[MAG_FILTER_NUM_TAPS];
@ -217,7 +219,7 @@ void pktDisablePWM(AFSKDemodDriver *myDriver) {
*
* @param[in] myDriver pointer to a @p AFSKDemodDriver structure
*
* @return status indicating if symbol decoding should take place.
* @return status indicating if symbol decoding should take place.
* @retval true decoding should run before getting next PWM entry.
* @retval false continue immediately with next PWM data entry.
*
@ -424,7 +426,7 @@ bool pktDecodeAFSKSymbol(AFSKDemodDriver *myDriver) {
} /* End case AFSK_DSP_QCORR_DECODE. */
case AFSK_DSP_FCORR_DECODE: {
/* TODO: Tone analysis is done per sample in FCORR. */
/* Tone analysis is done per sample in FCORR. */
break;
} /* End case AFSK_DSP_FCORR_DECODE. */
@ -818,7 +820,7 @@ THD_FUNCTION(pktAFSKDecoder, arg) {
} /* End case 0. */
case PWM_TERM_ICU_OVERFLOW:
case PWM_TERM_NO_RESOURCE:
case PWM_TERM_NO_QUEUE:
case PWM_TERM_QUEUE_FULL: {
/* Buffer overrun flag from PWM.
* PWM side has set the global event for this.

Wyświetl plik

@ -259,7 +259,7 @@ void pktOpenPWMChannelI(ICUDriver *myICU, eventflags_t evt) {
* Shouldn't happen unless CCA has not triggered an EXTI trailing edge.
* For now just flag that an error condition happened.
*/
pktClosePWMChannelI(myICU, EVT_RADIO_CCA_FIFO_ERR, PWM_TERM_NO_RESOURCE);
pktClosePWMChannelI(myICU, EVT_RADIO_CCA_FIFO_ERR, PWM_TERM_NO_QUEUE);
return;
}
/* Normal CCA handling. */

Wyświetl plik

@ -38,7 +38,7 @@
#define PWM_TERM_CCA_CLOSE 0
#define PWM_TERM_QUEUE_FULL 1
#define PWM_TERM_ICU_OVERFLOW 2
#define PWM_TERM_NO_RESOURCE 3
#define PWM_TERM_NO_QUEUE 3
#define PWM_TERM_DECODE_ENDED 4
#define PWM_TERM_DECODE_STOP 5
@ -102,9 +102,9 @@ typedef union {
/* Union of packed PWM data buffer and byte array representation. */
typedef union {
byte_packed_pwm_t pwm_buffer[PWM_BUFFER_SLOTS];
byte_packed_pwm_t pwm_buffer[PWM_DATA_SLOTS];
packed_pwm_data_t pwm_bytes[sizeof(byte_packed_pwm_t)
* PWM_BUFFER_SLOTS];
* PWM_DATA_SLOTS];
} radio_pwm_buffer_t;
/* PWM FIFO object with embedded queue shared between ICU and decoder. */

Wyświetl plik

@ -12,10 +12,8 @@
#include "debug.h"
#endif
#include "pktconf.h"
#ifndef PKT_IS_TEST_PROJECT
#include "radio.h"
#ifdef PKT_IS_TEST_PROJECT
void ax25_delete(packet_t pp);
#endif
// Access locking
@ -940,7 +938,7 @@ static bool Si4464_restoreRX(void) {
" RSSI %d, %s",
op_freq/1000000, (op_freq % 1000000)/1000,
rx_chan,
rx_rssi, getModulation(rx_mod)
rx_rssi, rx_mod
);
/* Resume decoding. */

Wyświetl plik

@ -15,7 +15,9 @@
*/
#include "pktconf.h"
#ifndef PKT_IS_TEST_PROJECT
#include "radio.h"
#endif
#include "si446x.h"
/**

Wyświetl plik

@ -74,7 +74,7 @@ typedef uint8_t radio_squelch_t;
typedef struct radioTask radio_task_object_t;
typedef struct packetHandlerData packet_svc_t;
#ifdef PKT_IS_TEST_PROJECT
typedef void * packet_t;
//typedef void * packet_t;
#endif
/**

Wyświetl plik

@ -51,11 +51,7 @@ typedef enum HDLCFrameStates {
#ifdef PKT_IS_TEST_PROJECT
/* Modulation type. */
typedef enum {
MOD_NONE,
MOD_AFSK,
MOD_2FSK
} mod_t;
#include "pktconf.h"
#endif

Wyświetl plik

@ -127,10 +127,10 @@
#ifdef PKT_IS_TEST_PROJECT
/* Define macro replacements for TRACE. */
#define TRACE_DEBUG(format, args...) dbgPrintf(DBG_DEBUG, format, args...)
#define TRACE_INFO(format, args...) dbgPrintf(DBG_INFO, format, args...)
#define TRACE_WARN(format, args...) dbgPrintf(DBG_WARN, format, args...)
#define TRACE_ERROR(format, args...) dbgPrintf(DBG_ERROR, format, args...)
#define TRACE_DEBUG(format, args...) dbgPrintf(DBG_DEBUG, format, ##args)
#define TRACE_INFO(format, args...) dbgPrintf(DBG_INFO, format, ##args)
#define TRACE_WARN(format, args...) dbgPrintf(DBG_WARN, format, ##args)
#define TRACE_ERROR(format, args...) dbgPrintf(DBG_ERROR, format, ##args)
#endif
/* Extra GPIO value used in local GPIO set/clear/toggle functions. */
@ -156,6 +156,7 @@
#include "ax25_dump.h"
#include "si446x.h"
extern packet_svc_t RPKTD1;
/*===========================================================================*/
@ -354,6 +355,10 @@ static inline msg_t pktSendRadioCommand(packet_svc_t *handler,
#endif
}
#ifdef PKT_IS_TEST_PROJECT
void ax25_delete(packet_t pp);
#endif
#endif /* _PKTCONF_H_ */
/** @} */

Wyświetl plik

@ -161,7 +161,7 @@ struct packet_s {
/* For U frames: set to 0 - not applicable */
/* For I & S frames: 8 or 128 if known. 0 if unknown. */
unsigned char frame_data[PKT_MAX_PACKET_LEN + 1];
unsigned char frame_data[PKT_MAX_RX_PACKET_LEN + 1];
/* Raw frame contents, without the CRC. */
@ -169,8 +169,6 @@ struct packet_s {
};
typedef struct packet_s *packet_t;
#endif

Wyświetl plik

@ -86,7 +86,7 @@
/* Definitions for ICU FIFO implemented using chfactory. */
#define NUMBER_PWM_FIFOS 4U
#define PWM_BUFFER_SLOTS 6000
#define PWM_DATA_SLOTS 6000
/* Number of frame output buffers. */
#define NUMBER_PKT_FIFOS 2U