summaryrefslogtreecommitdiff
path: root/sec-2.h
diff options
context:
space:
mode:
authorkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-12-17 02:19:03 +0000
committerkpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2005-12-17 02:19:03 +0000
commite2cab742b1d41becf87d7b21e4b451370e8a7c12 (patch)
tree2766ab70c7472182f7adeca4b66bd8545b0170e3 /sec-2.h
parent51be44f5b34ffe5032414266787aca1aa8213316 (diff)
don't include the echo canceller headers in every module that includes zaptel.h... instead, only in zaptel.c
git-svn-id: http://svn.digium.com/svn/zaptel/trunk@867 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'sec-2.h')
-rw-r--r--sec-2.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/sec-2.h b/sec-2.h
index dd7dcf7..c54836f 100644
--- a/sec-2.h
+++ b/sec-2.h
@@ -67,7 +67,7 @@
#define NONUPDATE_DWELL_TIME 600 /* 600 samples, or 75ms */
-typedef struct
+struct echo_can_state
{
int tx_power;
int rx_power;
@@ -95,11 +95,11 @@ typedef struct
int32_t latest_correction; /* Indication of the magnitude of the latest
adaption, or a code to indicate why adaption
was skipped, for test purposes */
-} echo_can_state_t;
+};
-static echo_can_state_t *echo_can_create(int len, int adaption_mode);
-static void echo_can_free(echo_can_state_t *ec);
-static int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx);
+static struct echo_can_state *echo_can_create(int len, int adaption_mode);
+static void echo_can_free(struct echo_can_state *ec);
+static int16_t echo_can_update(struct echo_can_state *ec, int16_t tx, int16_t rx);
/*
* According to Jim...
@@ -113,12 +113,12 @@ static int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx);
/* #define MIN_TX_POWER_FOR_ADAPTION 4096
#define MIN_RX_POWER_FOR_ADAPTION 64 */
-static inline echo_can_state_t *echo_can_create(int len, int adaption_mode)
+static inline struct echo_can_state *echo_can_create(int len, int adaption_mode)
{
- echo_can_state_t *ec;
+ struct echo_can_state *ec;
void *ptr;
- ptr = ec = (echo_can_state_t *) MALLOC(sizeof(*ec) + len * sizeof(int32_t) +
+ ptr = ec = (struct echo_can_state *) MALLOC(sizeof(*ec) + len * sizeof(int32_t) +
len * sizeof(int16_t));
if (ec == NULL)
return NULL;
@@ -139,14 +139,14 @@ static inline echo_can_state_t *echo_can_create(int len, int adaption_mode)
}
/*- End of function --------------------------------------------------------*/
-static inline void echo_can_free(echo_can_state_t *ec)
+static inline void echo_can_free(struct echo_can_state *ec)
{
fir16_free(&ec->fir_state);
FREE(ec);
}
/*- End of function --------------------------------------------------------*/
-static inline int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx)
+static inline int16_t echo_can_update(struct echo_can_state *ec, int16_t tx, int16_t rx)
{
int offset1;
int offset2;
@@ -278,7 +278,7 @@ static inline int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t
}
#if 0
-static inline int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t rx)
+static inline int16_t echo_can_update(struct echo_can_state *ec, int16_t tx, int16_t rx)
{
int offset;
int limit;
@@ -412,7 +412,7 @@ static inline int16_t echo_can_update(echo_can_state_t *ec, int16_t tx, int16_t
/*- End of function --------------------------------------------------------*/
#endif
-static inline int echo_can_traintap(echo_can_state_t *ec, int pos, short val)
+static inline int echo_can_traintap(struct echo_can_state *ec, int pos, short val)
{
/* Reset hang counter to avoid adjustments after
initial forced training */