mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-06 05:43:01 +00:00
add the NxScope library - a real-time data logging tool
This commit is contained in:
parent
ea7241a1a6
commit
cd499f9d37
18 changed files with 4893 additions and 0 deletions
488
include/logging/nxscope/nxscope.h
Normal file
488
include/logging/nxscope/nxscope.h
Normal file
|
|
@ -0,0 +1,488 @@
|
|||
/****************************************************************************
|
||||
* apps/include/logging/nxscope/nxscope.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __APPS_INCLUDE_LOGGING_NXSCOPE_NXSCOPE_H
|
||||
#define __APPS_INCLUDE_LOGGING_NXSCOPE_NXSCOPE_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
#include <nuttx/compiler.h>
|
||||
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <logging/nxscope/nxscope_chan.h>
|
||||
#include <logging/nxscope/nxscope_intf.h>
|
||||
#include <logging/nxscope/nxscope_proto.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define NXSCOPE_ENABLE_LEN (sizeof(struct nxscope_enable_data_s))
|
||||
#define NXSCOPE_DIV_LEN (sizeof(struct nxscope_div_data_s))
|
||||
#define NXSCOPE_START_LEN (sizeof(struct nxscope_start_data_s))
|
||||
|
||||
/* MSB bit in the channel type means a critical channel */
|
||||
|
||||
#define NXSCOPE_IS_CRICHAN(chtype) (chtype & 0x80)
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/* Nxscope header ID */
|
||||
|
||||
enum nxscope_hdr_id_e
|
||||
{
|
||||
NXSCOPE_HDRID_UNDEF = 0, /* Reserved */
|
||||
|
||||
/* Stream frames */
|
||||
|
||||
NXSCOPE_HDRID_STREAM = 1, /* Stream data */
|
||||
|
||||
/* Get frames */
|
||||
|
||||
NXSCOPE_HDRID_CMNINFO = 2, /* Get nxscope common info */
|
||||
NXSCOPE_HDRID_CHINFO = 3, /* Get nxscope channel info */
|
||||
|
||||
/* Special frames */
|
||||
|
||||
NXSCOPE_HDRID_ACK = 4, /* ACK/NACK */
|
||||
|
||||
/* Set frames.
|
||||
*
|
||||
* If CONFIG_LOGGING_NXSCOPE_ACKFRAMES=y this requests must
|
||||
* be confirmed with ACK frames to report success or failure.
|
||||
*/
|
||||
|
||||
NXSCOPE_HDRID_START = 5, /* Start/stop stream.
|
||||
* NOTE: this frame do not follow
|
||||
* 'struct nxscope_set_frame_s' format
|
||||
*/
|
||||
NXSCOPE_HDRID_ENABLE = 6, /* Snable/disable channels */
|
||||
NXSCOPE_HDRID_DIV = 7, /* Channels divider */
|
||||
|
||||
/* User defined frames.
|
||||
* Must be alway the last element.
|
||||
*/
|
||||
|
||||
NXSCOPE_HDRID_USER = 8
|
||||
};
|
||||
|
||||
/* Nxscope flags */
|
||||
|
||||
enum nxscope_info_flags_e
|
||||
{
|
||||
NXSCOPE_FLAGS_DIVIDER_SUPPORT = (1 << 0),
|
||||
NXSCOPE_FLAGS_ACK_SUPPORT = (1 << 1),
|
||||
NXSCOPE_FLAGS_RES2 = (1 << 2),
|
||||
NXSCOPE_FLAGS_RES3 = (1 << 3),
|
||||
NXSCOPE_FLAGS_RES4 = (1 << 4),
|
||||
NXSCOPE_FLAGS_RES5 = (1 << 5),
|
||||
NXSCOPE_FLAGS_RES6 = (1 << 6),
|
||||
NXSCOPE_FLAGS_RES7 = (1 << 7),
|
||||
};
|
||||
|
||||
/* Nxscope stream flags */
|
||||
|
||||
enum nxscope_stream_flags_s
|
||||
{
|
||||
NXSCOPE_STREAM_FLAGS_OVERFLOW = (1 << 0)
|
||||
};
|
||||
|
||||
/* Nxscope start frame data */
|
||||
|
||||
begin_packed_struct struct nxscope_start_data_s
|
||||
{
|
||||
uint8_t start; /* Start/stop flag */
|
||||
} end_packed_struct;
|
||||
|
||||
/* Nxscope enable channel data */
|
||||
|
||||
begin_packed_struct struct nxscope_enable_ch_data_s
|
||||
{
|
||||
uint8_t en; /* Channel enable */
|
||||
} end_packed_struct;
|
||||
|
||||
/* Nxscope divider channel data */
|
||||
|
||||
begin_packed_struct struct nxscope_div_ch_data_s
|
||||
{
|
||||
uint8_t div; /* Channel divider - starts from 0 */
|
||||
} end_packed_struct;
|
||||
|
||||
/* Nxscope enable frame data */
|
||||
|
||||
begin_packed_struct struct nxscope_enable_data_s
|
||||
{
|
||||
struct nxscope_enable_ch_data_s ch[1]; /* Chmax elements */
|
||||
} end_packed_struct;
|
||||
|
||||
/* Nxscope divider frame data */
|
||||
|
||||
begin_packed_struct struct nxscope_div_data_s
|
||||
{
|
||||
struct nxscope_div_ch_data_s ch[1]; /* Chmax elements */
|
||||
} end_packed_struct;
|
||||
|
||||
/* Set channel frame */
|
||||
|
||||
enum nxscope_set_frame_req_s
|
||||
{
|
||||
NXSCOPE_SET_REQ_SINGLE = 0, /* Single channel request */
|
||||
NXSCOPE_SET_REQ_BULK = 1, /* Set different values for all channels */
|
||||
NXSCOPE_SET_REQ_ALL = 2 /* Set one value for all channles */
|
||||
};
|
||||
|
||||
/* Set frame common data */
|
||||
|
||||
begin_packed_struct struct nxscope_set_frame_s
|
||||
{
|
||||
uint8_t req; /* Request type */
|
||||
uint8_t chan; /* Channel id */
|
||||
uint8_t data[1]; /* n bytes data - depends on the request type */
|
||||
} end_packed_struct;
|
||||
|
||||
/* Chanel type */
|
||||
|
||||
begin_packed_struct struct nxscope_chinfo_type_s
|
||||
{
|
||||
uint8_t dtype:5; /* Data type */
|
||||
uint8_t _res:2; /* Reserved for future use */
|
||||
uint8_t cri:1; /* Criticial channel - no buffering */
|
||||
} end_packed_struct;
|
||||
|
||||
/* Chanel type union */
|
||||
|
||||
union nxscope_chinfo_type_u
|
||||
{
|
||||
struct nxscope_chinfo_type_s s;
|
||||
uint8_t u8;
|
||||
};
|
||||
|
||||
/* Nxscope channel info */
|
||||
|
||||
begin_packed_struct struct nxscope_chinfo_s
|
||||
{
|
||||
uint8_t enable; /* Enable flag */
|
||||
union nxscope_chinfo_type_u type; /* Channel data type */
|
||||
uint8_t vdim; /* Vector dimention */
|
||||
uint8_t div; /* Divider - starts from 0 */
|
||||
uint8_t mlen; /* Metadata size */
|
||||
FAR char *name; /* Chanel name */
|
||||
} end_packed_struct;
|
||||
|
||||
/* Nxscope info common */
|
||||
|
||||
begin_packed_struct struct nxscope_info_cmn_s
|
||||
{
|
||||
uint8_t chmax; /* Supported channels */
|
||||
uint8_t flags; /* Flags (enum nxscope_info_flags_e) */
|
||||
uint8_t rx_padding; /* RX padding (>0 if used) */
|
||||
} end_packed_struct;
|
||||
|
||||
/* Nxscope sample hdr:
|
||||
*
|
||||
* +----------+-------------+----------+
|
||||
* | channel | sample data | metadata |
|
||||
* +----------+-------------+----------+
|
||||
* | 1B | n bytes [1] | m bytes |
|
||||
* +----------+-------------+----------+
|
||||
*
|
||||
* [1] - sizeof(channel_type) * channel_vdim
|
||||
* NOTE: sample data always little-endian !
|
||||
*
|
||||
*/
|
||||
|
||||
struct nxscope_sample_s
|
||||
{
|
||||
uint8_t chan; /* 1 byte: Channel id - starts from 0 */
|
||||
/* n bytes: Data */
|
||||
/* m bytes: Metadata */
|
||||
};
|
||||
|
||||
/* Nxscope stream data:
|
||||
*
|
||||
* +----------+--------------+
|
||||
* | flags | samples data |
|
||||
* +----------+--------------+
|
||||
* | 1B | n bytes |
|
||||
* +----------+--------------+
|
||||
*
|
||||
*/
|
||||
|
||||
struct nxscope_stream_s
|
||||
{
|
||||
uint8_t flags; /* stream flags */
|
||||
struct nxscope_sample_s samples[1]; /* stream samples */
|
||||
};
|
||||
|
||||
/* Nxscope callbacks */
|
||||
|
||||
struct nxscope_callbacks_s
|
||||
{
|
||||
/* User-defined id callback */
|
||||
|
||||
FAR void *userid_priv;
|
||||
CODE int (*userid)(FAR void *priv, uint8_t id, FAR uint8_t *buff);
|
||||
|
||||
/* Start request callback */
|
||||
|
||||
FAR void *start_priv;
|
||||
CODE int (*start)(FAR void *priv, bool start);
|
||||
};
|
||||
|
||||
/* Nxscope general configuration */
|
||||
|
||||
struct nxscope_cfg_s
|
||||
{
|
||||
/* NOTE: It is possible to configure separate interface
|
||||
* and protocol for control commands and data stream.
|
||||
*/
|
||||
|
||||
/* Interface implementation for commands */
|
||||
|
||||
FAR struct nxscope_intf_s *intf_cmd;
|
||||
|
||||
/* Interface implementation for stream data */
|
||||
|
||||
FAR struct nxscope_intf_s *intf_stream;
|
||||
|
||||
/* Protocol implementation for commands */
|
||||
|
||||
FAR struct nxscope_proto_s *proto_cmd;
|
||||
|
||||
/* Protocol implementation for stream data */
|
||||
|
||||
FAR struct nxscope_proto_s *proto_stream;
|
||||
|
||||
/* Callbacks */
|
||||
|
||||
FAR struct nxscope_callbacks_s *callbacks;
|
||||
|
||||
/* Number of suppoted channels */
|
||||
|
||||
uint8_t channels;
|
||||
|
||||
/* Stream buffer len */
|
||||
|
||||
size_t streambuf_len;
|
||||
|
||||
/* RX buffer len */
|
||||
|
||||
size_t rxbuf_len;
|
||||
|
||||
#ifdef CONFIG_LOGGING_NXSCOPE_CRICHANNELS
|
||||
/* Critical buffer len.
|
||||
*
|
||||
* It's the user's responsibility to correctly choose this value.
|
||||
* The minimal buffer size for critical channels can be calculate
|
||||
* with this formula:
|
||||
* buff_size = max(proto_stream->hdrlen + 1 + type_size * vdim +
|
||||
* meta_len + proto_stream->footlen)
|
||||
*
|
||||
* where max() means the maximum value from all initialized critical
|
||||
* channels.
|
||||
*
|
||||
* When CONFIG_DEBUG_FEATURES is enabled the correct buffer size is
|
||||
* verified in run-time.
|
||||
*/
|
||||
|
||||
size_t cribuf_len;
|
||||
#endif
|
||||
|
||||
/* RX padding.
|
||||
*
|
||||
* This option will be provided for client in common info data
|
||||
* and can be useful if we use DMA for receiving frames
|
||||
*/
|
||||
|
||||
uint8_t rx_padding;
|
||||
};
|
||||
|
||||
/* Nxscope data */
|
||||
|
||||
struct nxscope_s
|
||||
{
|
||||
/* Nxscope interface handlers */
|
||||
|
||||
FAR struct nxscope_intf_s *intf_cmd;
|
||||
FAR struct nxscope_intf_s *intf_stream;
|
||||
|
||||
/* Nxscope protocol handlers */
|
||||
|
||||
FAR struct nxscope_proto_s *proto_cmd;
|
||||
FAR struct nxscope_proto_s *proto_stream;
|
||||
|
||||
/* Callbacks */
|
||||
|
||||
FAR struct nxscope_callbacks_s *callbacks;
|
||||
|
||||
/* Nxscope common info */
|
||||
|
||||
struct nxscope_info_cmn_s cmninfo;
|
||||
|
||||
/* Channels info, chmax elements */
|
||||
|
||||
FAR struct nxscope_chinfo_s *chinfo;
|
||||
size_t chinfo_size;
|
||||
|
||||
/* Nxscope data */
|
||||
|
||||
#ifdef CONFIG_LOGGING_NXSCOPE_DIVIDER
|
||||
FAR uint32_t *cntr;
|
||||
#endif
|
||||
uint8_t start;
|
||||
|
||||
/* Stream data */
|
||||
|
||||
FAR uint8_t *streambuf;
|
||||
size_t streambuf_len;
|
||||
size_t stream_i;
|
||||
|
||||
#ifdef CONFIG_LOGGING_NXSCOPE_CRICHANNELS
|
||||
/* Critical buffer data */
|
||||
|
||||
FAR uint8_t *cribuf;
|
||||
size_t cribuf_len;
|
||||
#endif
|
||||
|
||||
/* RX data buffer */
|
||||
|
||||
FAR uint8_t *rxbuf;
|
||||
size_t rxbuf_len;
|
||||
size_t rxbuf_i;
|
||||
|
||||
/* TX data buffer */
|
||||
|
||||
FAR uint8_t *txbuf;
|
||||
size_t txbuf_len;
|
||||
|
||||
/* Exclusive access */
|
||||
|
||||
pthread_mutex_t lock;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_init
|
||||
*
|
||||
* Description:
|
||||
* Initialize a nxscope instance
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
* cfg - a pointer to a nxscope configuration data
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_init(FAR struct nxscope_s *s, FAR struct nxscope_cfg_s *cfg);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_deinit
|
||||
*
|
||||
* Description:
|
||||
* De-initialize a nxscope instance
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void nxscope_deinit(FAR struct nxscope_s *s);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_lock
|
||||
*
|
||||
* Description:
|
||||
* Lock a nxscope instance
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void nxscope_lock(FAR struct nxscope_s *s);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_unlock
|
||||
*
|
||||
* Description:
|
||||
* Unlock a nxscope instance
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void nxscope_unlock(FAR struct nxscope_s *s);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_stream
|
||||
*
|
||||
* Description:
|
||||
* Send nxscope stream data.
|
||||
*
|
||||
* NOTE: It's the user's responsibility to periodically call this function.
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_stream(FAR struct nxscope_s *s);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_recv
|
||||
*
|
||||
* Description:
|
||||
* Receive and handle nxscope protocol data.
|
||||
*
|
||||
* NOTE: It's the user's responsibility to periodically call this function.
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_recv(FAR struct nxscope_s *s);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_stream_start
|
||||
*
|
||||
* Description:
|
||||
* Start/stop data stream
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
* start - start/stop
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_stream_start(FAR struct nxscope_s *s, bool start);
|
||||
|
||||
#endif /* __APPS_INCLUDE_LOGGING_NXSCOPE_NXSCOPE_H */
|
||||
419
include/logging/nxscope/nxscope_chan.h
Normal file
419
include/logging/nxscope/nxscope_chan.h
Normal file
|
|
@ -0,0 +1,419 @@
|
|||
/****************************************************************************
|
||||
* apps/include/logging/nxscope/nxscope_chan.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __APPS_INCLUDE_LOGGING_NXSCOPE_NXSCOPE_CHAN_H
|
||||
#define __APPS_INCLUDE_LOGGING_NXSCOPE_NXSCOPE_CHAN_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <fixedmath.h>
|
||||
|
||||
#include <logging/nxscope/nxscope.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/* Nxscope sample type */
|
||||
|
||||
enum nxscope_sample_dtype_e
|
||||
{
|
||||
/* Default numerical types */
|
||||
|
||||
NXSCOPE_TYPE_UNDEF = 0,
|
||||
NXSCOPE_TYPE_NONE = 1,
|
||||
NXSCOPE_TYPE_UINT8 = 2,
|
||||
NXSCOPE_TYPE_INT8 = 3,
|
||||
NXSCOPE_TYPE_UINT16 = 4,
|
||||
NXSCOPE_TYPE_INT16 = 5,
|
||||
NXSCOPE_TYPE_UINT32 = 6,
|
||||
NXSCOPE_TYPE_INT32 = 7,
|
||||
NXSCOPE_TYPE_UINT64 = 8,
|
||||
NXSCOPE_TYPE_INT64 = 9,
|
||||
NXSCOPE_TYPE_FLOAT = 10,
|
||||
NXSCOPE_TYPE_DOUBLE = 11,
|
||||
NXSCOPE_TYPE_UB8 = 12,
|
||||
NXSCOPE_TYPE_B8 = 13,
|
||||
NXSCOPE_TYPE_UB16 = 14,
|
||||
NXSCOPE_TYPE_B16 = 15,
|
||||
NXSCOPE_TYPE_UB32 = 16,
|
||||
NXSCOPE_TYPE_B32 = 17,
|
||||
|
||||
/* Char/string data */
|
||||
|
||||
NXSCOPE_TYPE_CHAR = 18,
|
||||
|
||||
#if 0
|
||||
/* Reserved for future use */
|
||||
|
||||
NXSCOPE_TYPE_WCHAR = 19,
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LOGGING_NXSCOPE_USERTYPES
|
||||
/* User defined types starts from here.
|
||||
* NXSCOPE_TYPE_USER must be always the last element.
|
||||
*
|
||||
* Type of size 1B. Together with channel.vdim this
|
||||
* can be used to send custom protocol data.
|
||||
*/
|
||||
|
||||
NXSCOPE_TYPE_USER = 20,
|
||||
#endif
|
||||
|
||||
/* 5 bits reserved for data type */
|
||||
|
||||
NXSCOPE_TYPE_LAST = 31,
|
||||
};
|
||||
|
||||
/* Forward declaration */
|
||||
|
||||
struct nxscope_s;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Puttypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_chan_init
|
||||
*
|
||||
* Description:
|
||||
* Initialize nxscope channel
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
* ch - a channel id
|
||||
* name - a channel name
|
||||
* type - a channel data type (union nxscope_chinfo_type_u)
|
||||
* vdim - a vector data dimension (vdim=1 for a point)
|
||||
* mlen - a length of metadata
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_chan_init(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR char *name, uint8_t type, uint8_t vdim,
|
||||
uint8_t mlen);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_chan_en
|
||||
*
|
||||
* Description:
|
||||
* Enable/disable a given channel
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
* ch - a channel id
|
||||
* en - enable/disable
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_chan_en(FAR struct nxscope_s *s, uint8_t chan, bool en);
|
||||
|
||||
#ifdef CONFIG_LOGGING_NXSCOPE_DIVIDER
|
||||
/****************************************************************************
|
||||
* Name: nxscope_chan_div
|
||||
*
|
||||
* Description:
|
||||
* Configure divider for a given channel
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
* ch - a channel id
|
||||
* div - divider value - starts from 0
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_chan_div(FAR struct nxscope_s *s, uint8_t chan, uint8_t div);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_chan_all_en
|
||||
*
|
||||
* Description:
|
||||
* Enable/disable all channels
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
* en - enable/disable
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_chan_all_en(FAR struct nxscope_s *s, bool en);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_put_vXXXX_m
|
||||
*
|
||||
* Description:
|
||||
* Put a vector with metadata on the stream buffer
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
* ch - a channel id
|
||||
* val - a pointer to a sample data vector
|
||||
* d - a dimmention of sample data vector
|
||||
* meta - a pointer to metadata
|
||||
* mlen - a length of metadata
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_put_vuint8_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR uint8_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vint8_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR int8_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vuint16_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR uint16_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vint16_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR int16_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vuint32_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR uint32_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vint32_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR int32_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vuint64_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR uint64_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vint64_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR int64_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vfloat_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR float *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vdouble_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR double *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vub8_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR ub8_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vb8_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR b8_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vub16_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR ub16_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vb16_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR b16_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vub32_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR ub32_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_vb32_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR b32_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_put_vchar_m
|
||||
*
|
||||
* NOTE: if a given string is shorten than initialized channel vdim,
|
||||
* we put only string bytes + '\0'
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_put_vchar_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR char *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_put_vXXXX
|
||||
*
|
||||
* Description:
|
||||
* Put a vector on the stream buffer
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
* ch - a channel id
|
||||
* val - a pointer to a sample data vector
|
||||
* d - a dimmention of sample data vector
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_put_vuint8(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR uint8_t *val, uint8_t d);
|
||||
int nxscope_put_vint8(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR int8_t *val, uint8_t d);
|
||||
int nxscope_put_vuint16(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR uint16_t *val, uint8_t d);
|
||||
int nxscope_put_vint16(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR int16_t *val, uint8_t d);
|
||||
int nxscope_put_vuint32(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR uint32_t *val, uint8_t d);
|
||||
int nxscope_put_vint32(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR int32_t *val, uint8_t d);
|
||||
int nxscope_put_vuint64(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR uint64_t *val, uint8_t d);
|
||||
int nxscope_put_vint64(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR int64_t *val, uint8_t d);
|
||||
int nxscope_put_vfloat(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR float *val, uint8_t d);
|
||||
int nxscope_put_vdouble(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR double *val, uint8_t d);
|
||||
int nxscope_put_vub8(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR ub8_t *val, uint8_t d);
|
||||
int nxscope_put_vb8(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR b8_t *val, uint8_t d);
|
||||
int nxscope_put_vub16(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR ub16_t *val, uint8_t d);
|
||||
int nxscope_put_vb16(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR b16_t *val, uint8_t d);
|
||||
int nxscope_put_vub32(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR ub32_t *val, uint8_t d);
|
||||
int nxscope_put_vb32(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR b32_t *val, uint8_t d);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_put_vchar
|
||||
*
|
||||
* NOTE: if a given string is shorten than initialized channel vdim,
|
||||
* we put only string bytes + '\0'
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_put_vchar(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR char *val, uint8_t d);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_put_XXXX_m
|
||||
*
|
||||
* Description:
|
||||
* Put a point with metadata on the stream buffer
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
* ch - a channel id
|
||||
* val - sample data
|
||||
* meta - a pointer to metadata
|
||||
* mlen - a length of metadata
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_put_uint8_m(FAR struct nxscope_s *s, uint8_t ch, uint8_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_int8_m(FAR struct nxscope_s *s, uint8_t ch, int8_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_uint16_m(FAR struct nxscope_s *s, uint8_t ch, uint16_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_int16_m(FAR struct nxscope_s *s, uint8_t ch, int16_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_uint32_m(FAR struct nxscope_s *s, uint8_t ch, uint32_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_int32_m(FAR struct nxscope_s *s, uint8_t ch, int32_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_uint64_m(FAR struct nxscope_s *s, uint8_t ch, uint64_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_int64_m(FAR struct nxscope_s *s, uint8_t ch, int64_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_float_m(FAR struct nxscope_s *s, uint8_t ch, float val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_double_m(FAR struct nxscope_s *s, uint8_t ch, double val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_ub8_m(FAR struct nxscope_s *s, uint8_t ch, ub8_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_b8_m(FAR struct nxscope_s *s, uint8_t ch, b8_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_ub16_m(FAR struct nxscope_s *s, uint8_t ch, ub16_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_b16_m(FAR struct nxscope_s *s, uint8_t ch, b16_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_ub32_m(FAR struct nxscope_s *s, uint8_t ch, ub32_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_b32_m(FAR struct nxscope_s *s, uint8_t ch, b32_t val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
int nxscope_put_char_m(FAR struct nxscope_s *s, uint8_t ch, char val,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_put_none_m
|
||||
*
|
||||
* Description:
|
||||
* Put metadata only on the stream buffer
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
* ch - a channel id
|
||||
* meta - a pointer to metadata
|
||||
* mlen - a length of metadata
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_put_none_m(FAR struct nxscope_s *s, uint8_t ch,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
|
||||
#ifdef CONFIG_LOGGING_NXSCOPE_USERTYPES
|
||||
/****************************************************************************
|
||||
* Name: nxscope_put_user_m
|
||||
*
|
||||
* Description:
|
||||
* Put a user specific data on the stream buffer
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
* type - a channel type (starts from NXSCOPE_TYPE_USER)
|
||||
* ch - a channel id
|
||||
* val - a pointer to a sample data vector
|
||||
* d - a dimmention of sample data vector
|
||||
* meta - a pointer to metadata
|
||||
* mlen - a length of metadata
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_put_user_m(FAR struct nxscope_s *s, uint8_t ch, uint8_t type,
|
||||
FAR uint8_t *val, uint8_t d,
|
||||
FAR uint8_t *meta, uint8_t mlen);
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_put_user_m
|
||||
*
|
||||
* Description:
|
||||
* Put a point on the stream buffer
|
||||
*
|
||||
* Input Parameters:
|
||||
* s - a pointer to a nxscope instance
|
||||
* ch - a channel id
|
||||
* val - sample data
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_put_uint8(FAR struct nxscope_s *s, uint8_t ch, uint8_t val);
|
||||
int nxscope_put_int8(FAR struct nxscope_s *s, uint8_t ch, int8_t val);
|
||||
int nxscope_put_uint16(FAR struct nxscope_s *s, uint8_t ch, uint16_t val);
|
||||
int nxscope_put_int16(FAR struct nxscope_s *s, uint8_t ch, int16_t val);
|
||||
int nxscope_put_uint32(FAR struct nxscope_s *s, uint8_t ch, uint32_t val);
|
||||
int nxscope_put_int32(FAR struct nxscope_s *s, uint8_t ch, int32_t val);
|
||||
int nxscope_put_uint64(FAR struct nxscope_s *s, uint8_t ch, uint64_t val);
|
||||
int nxscope_put_int64(FAR struct nxscope_s *s, uint8_t ch, int64_t val);
|
||||
int nxscope_put_float(FAR struct nxscope_s *s, uint8_t ch, float val);
|
||||
int nxscope_put_double(FAR struct nxscope_s *s, uint8_t ch, double val);
|
||||
int nxscope_put_ub8(FAR struct nxscope_s *s, uint8_t ch, ub8_t val);
|
||||
int nxscope_put_b8(FAR struct nxscope_s *s, uint8_t ch, b8_t val);
|
||||
int nxscope_put_ub16(FAR struct nxscope_s *s, uint8_t ch, ub16_t val);
|
||||
int nxscope_put_b16(FAR struct nxscope_s *s, uint8_t ch, b16_t val);
|
||||
int nxscope_put_ub32(FAR struct nxscope_s *s, uint8_t ch, ub32_t val);
|
||||
int nxscope_put_b32(FAR struct nxscope_s *s, uint8_t ch, b32_t val);
|
||||
int nxscope_put_char(FAR struct nxscope_s *s, uint8_t ch, char val);
|
||||
|
||||
#endif /* __APPS_INCLUDE_LOGGING_NXSCOPE_NXSCOPE_CHAN_H */
|
||||
126
include/logging/nxscope/nxscope_intf.h
Normal file
126
include/logging/nxscope/nxscope_intf.h
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/****************************************************************************
|
||||
* apps/include/logging/nxscope/nxscope_intf.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __APPS_INCLUDE_LOGGING_NXSCOPE_NXSCOPE_INTF_H
|
||||
#define __APPS_INCLUDE_LOGGING_NXSCOPE_NXSCOPE_INTF_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#ifdef CONFIG_LOGGING_NXSCOPE_INTF_SERIAL
|
||||
# include <termios.h>
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/* Forward declaration */
|
||||
|
||||
struct nxscope_intf_s;
|
||||
|
||||
/* Nxscope interface ops */
|
||||
|
||||
struct nxscope_intf_ops_s
|
||||
{
|
||||
/* Send data */
|
||||
|
||||
CODE int (*send)(FAR struct nxscope_intf_s *s, FAR uint8_t *buff, int len);
|
||||
|
||||
/* Receive data */
|
||||
|
||||
CODE int (*recv)(FAR struct nxscope_intf_s *s, FAR uint8_t *buff, int len);
|
||||
};
|
||||
|
||||
/* Nxscope interface */
|
||||
|
||||
struct nxscope_intf_s
|
||||
{
|
||||
/* Initialized flag */
|
||||
|
||||
bool initialized;
|
||||
|
||||
/* Nxscope interface private data */
|
||||
|
||||
FAR void *priv;
|
||||
|
||||
/* Nxscope interface ops */
|
||||
|
||||
FAR struct nxscope_intf_ops_s *ops;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_LOGGING_NXSCOPE_INTF_DUMMY
|
||||
/* Nxscope dummy interface configuration */
|
||||
|
||||
struct nxscope_dummy_cfg_s
|
||||
{
|
||||
int res; /* Reserved */
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LOGGING_NXSCOPE_INTF_SERIAL
|
||||
/* Nxscope serial interface configuration */
|
||||
|
||||
struct nxscope_ser_cfg_s
|
||||
{
|
||||
FAR char *path; /* Device path */
|
||||
bool nonblock; /* Nonblocking operation */
|
||||
speed_t baud; /* Baud rate */
|
||||
};
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LOGGING_NXSCOPE_INTF_DUMMY
|
||||
/****************************************************************************
|
||||
* Name: nxscope_dummy_init
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_dummy_init(FAR struct nxscope_intf_s *intf,
|
||||
FAR struct nxscope_dummy_cfg_s *cfg);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_dummy_deinit
|
||||
****************************************************************************/
|
||||
|
||||
void nxscope_dummy_deinit(FAR struct nxscope_intf_s *intf);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_LOGGING_NXSCOPE_INTF_SERIAL
|
||||
/****************************************************************************
|
||||
* Name: nxscope_ser_init
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_ser_init(FAR struct nxscope_intf_s *intf,
|
||||
FAR struct nxscope_ser_cfg_s *cfg);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_ser_deinit
|
||||
****************************************************************************/
|
||||
|
||||
void nxscope_ser_deinit(FAR struct nxscope_intf_s *intf);
|
||||
#endif
|
||||
|
||||
#endif /* __APPS_INCLUDE_LOGGING_NXSCOPE_NXSCOPE_INTF_H */
|
||||
105
include/logging/nxscope/nxscope_proto.h
Normal file
105
include/logging/nxscope/nxscope_proto.h
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
/****************************************************************************
|
||||
* apps/include/logging/nxscope/nxscope_proto.h
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership. The
|
||||
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef __APPS_INCLUDE_LOGGING_NXSCOPE_NXSCOPE_PROTO_H
|
||||
#define __APPS_INCLUDE_LOGGING_NXSCOPE_NXSCOPE_PROTO_H
|
||||
|
||||
/****************************************************************************
|
||||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
****************************************************************************/
|
||||
|
||||
/* Nxscope frame handler */
|
||||
|
||||
struct nxscope_frame_s
|
||||
{
|
||||
uint8_t id; /* Frame id */
|
||||
size_t drop; /* Data to be droped from recv buffer */
|
||||
size_t dlen; /* Data len (without header and footer) */
|
||||
FAR uint8_t *data; /* A pointer to a frame data */
|
||||
};
|
||||
|
||||
/* Forward declaration */
|
||||
|
||||
struct nxscope_proto_s;
|
||||
|
||||
/* Nxscope protocol ops */
|
||||
|
||||
struct nxscope_proto_ops_s
|
||||
{
|
||||
/* Get a frame from a buffer */
|
||||
|
||||
CODE int (*frame_get)(FAR struct nxscope_proto_s *p,
|
||||
FAR uint8_t *buff, size_t len,
|
||||
FAR struct nxscope_frame_s *frame);
|
||||
|
||||
/* Finalize a frame in a given buffer */
|
||||
|
||||
CODE int (*frame_final)(FAR struct nxscope_proto_s *p,
|
||||
uint8_t id,
|
||||
FAR uint8_t *buff, FAR size_t *len);
|
||||
};
|
||||
|
||||
/* Nxscope protocol handler */
|
||||
|
||||
struct nxscope_proto_s
|
||||
{
|
||||
/* Initialized flag */
|
||||
|
||||
bool initialized;
|
||||
|
||||
/* Nxscope protocol private data */
|
||||
|
||||
FAR void *priv;
|
||||
|
||||
/* Nxscope protocol ops */
|
||||
|
||||
FAR struct nxscope_proto_ops_s *ops;
|
||||
|
||||
/* Header and foot size */
|
||||
|
||||
size_t hdrlen;
|
||||
size_t footlen;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Public Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_LOGGING_NXSCOPE_PROTO_SER
|
||||
/****************************************************************************
|
||||
* Name: nxscope_proto_ser_init
|
||||
****************************************************************************/
|
||||
|
||||
int nxscope_proto_ser_init(FAR struct nxscope_proto_s *proto, FAR void *cfg);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: nxscope_proto_ser_deinit
|
||||
****************************************************************************/
|
||||
|
||||
void nxscope_proto_ser_deinit(FAR struct nxscope_proto_s *proto);
|
||||
#endif
|
||||
|
||||
#endif /* __APPS_INCLUDE_LOGGING_NXSCOPE_NXSCOPE_PROTO_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue