From aef5ae9c57a34a342c7a6c83ece45ee77483ef0d Mon Sep 17 00:00:00 2001 From: batt Date: Wed, 7 Oct 2009 21:42:11 +0000 Subject: [PATCH] Move function doc in the implementation file. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3041 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/net/ax25.c | 29 +++++++++++++++++++++++++++++ bertos/net/ax25.h | 31 +------------------------------ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/bertos/net/ax25.c b/bertos/net/ax25.c index 88913659..32adf4eb 100644 --- a/bertos/net/ax25.c +++ b/bertos/net/ax25.c @@ -112,6 +112,17 @@ static void ax25_decode(AX25Ctx *ctx) ctx->hook(&msg); } + +/** + * Check if there are any AX25 messages to be processed. + * This function read available characters from the medium and search for + * any AX25 messages. + * If a message is found it is decoded and the linked callback executed. + * This function may be blocking if there are no available chars and the KFile + * used in \a ctx to access the medium is configured in blocking mode. + * + * \param ctx AX25 context to operate on. + */ void ax25_poll(AX25Ctx *ctx) { int c; @@ -201,6 +212,16 @@ static void ax25_sendCall(AX25Ctx *ctx, const AX25Call *addr) ax25_putchar(ctx, ' ' << 1); } +/** + * Send an AX25 frame on the channel. + * \param ctx AX25 context to operate on. + * \param dst the destination callsign for the frame, \see AX25_CALL + * for a handy way to create a callsign on the fly. + * \param src the source callsign for the frame, \see AX25_CALL + * for a handy way to create a callsign on the fly. + * \param _buf payload buffer. + * \param len length of the payload. + */ void ax25_send(AX25Ctx *ctx, const AX25Call *dst, const AX25Call *src, const void *_buf, size_t len) { const uint8_t *buf = (const uint8_t *)_buf; @@ -233,6 +254,14 @@ void ax25_send(AX25Ctx *ctx, const AX25Call *dst, const AX25Call *src, const voi kfile_putc(HDLC_FLAG, ctx->ch); } + +/** + * Init the AX25 protocol decoder. + * + * \param ctx AX25 context to init. + * \param channel Used to gain access to the physical medium + * \param hook Callback function called when a message is received + */ void ax25_init(AX25Ctx *ctx, KFile *channel, ax25_callback_t hook) { ASSERT(ctx); diff --git a/bertos/net/ax25.h b/bertos/net/ax25.h index 5daabd5b..da56b28b 100644 --- a/bertos/net/ax25.h +++ b/bertos/net/ax25.h @@ -141,38 +141,9 @@ typedef struct AX25Msg /* \} */ -/** - * Check if there are any AX25 messages to be processed. - * This function read available characters from the medium and search for - * any AX25 messages. - * If a message is found it is decoded and the linked callback executed. - * This function may be blocking if there are no available chars and the KFile - * used in \a ctx to access the medium is configured in blocking mode. - * - * \param ctx AX25 context to operate on. - */ -void ax25_poll(AX25Ctx *ctx); -/** - * Send an AX25 frame on the channel. - * \param ctx AX25 context to operate on. - * \param dst the destination callsign for the frame, \see AX25_CALL - * for a handy way to create a callsign on the fly. - * \param src the source callsign for the frame, \see AX25_CALL - * for a handy way to create a callsign on the fly. - * \param _buf payload buffer. - * \param len length of the payload. - */ +void ax25_poll(AX25Ctx *ctx); void ax25_send(AX25Ctx *ctx, const AX25Call *dst, const AX25Call *src, const void *_buf, size_t len); - - -/** - * Init the AX25 protocol decoder. - * - * \param ctx AX25 context to init. - * \param channel Used to gain access to the physical medium - * \param hook Callback function called when a message is received - */ void ax25_init(AX25Ctx *ctx, KFile *channel, ax25_callback_t hook); int ax25_testSetup(void); -- 2.25.1