raiden00pl commented on code in PR #1460:
URL: https://github.com/apache/nuttx-apps/pull/1460#discussion_r1051649113


##########
logging/nxscope/nxscope_chan.c:
##########
@@ -0,0 +1,1564 @@
+/****************************************************************************
+ * apps/logging/nxscope/nxscope_chan.c
+ *
+ * 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.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <assert.h>
+#include <debug.h>
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+
+#include <logging/nxscope/nxscope.h>
+
+#include "nxscope_internals.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#ifdef CONFIG_ENDIAN_BIG
+#  error Big endian not tested
+#endif
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+int g_type_size[] =
+{
+  0,                            /* NXSCOPE_TYPE_UNDEF */
+  0,                            /* NXSCOPE_TYPE_NONE */
+  sizeof(uint8_t),              /* NXSCOPE_TYPE_UINT8 */
+  sizeof(int8_t),               /* NXSCOPE_TYPE_INT8 */
+  sizeof(uint16_t),             /* NXSCOPE_TYPE_UINT16 */
+  sizeof(int16_t),              /* NXSCOPE_TYPE_INT16 */
+  sizeof(uint32_t),             /* NXSCOPE_TYPE_UINT32 */
+  sizeof(int32_t),              /* NXSCOPE_TYPE_INT32 */
+  sizeof(uint64_t),             /* NXSCOPE_TYPE_UINT64 */
+  sizeof(int64_t),              /* NXSCOPE_TYPE_INT64 */
+  sizeof(float),                /* NXSCOPE_TYPE_FLOAT */
+  sizeof(double),               /* NXSCOPE_TYPE_DOUBLE */

Review Comment:
   `long double` is quite problematic, as its size is not well specified. It's 
not even handled by standard Python `struct` module. So for now I'm not 
interested in it. But I think we can use `enum nxscope_info_flags_e` to signal 
`long double` implementation details.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to