vrahane commented on a change in pull request #1927: Add Dialog OTP driver and 
associated scripts
URL: https://github.com/apache/mynewt-core/pull/1927#discussion_r314520119
 
 

 ##########
 File path: test/spiflash_stress_test/src/spiflash_stress_test.c
 ##########
 @@ -0,0 +1,179 @@
+/*
+ * 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.
+ */
+
+#include <inttypes.h>
+#include "os/mynewt.h"
+#include <console/console.h>
+#include <hal/hal_bsp.h>
+#include <hal/hal_flash.h>
+#include <hal/hal_flash_int.h>
+#include <shell/shell.h>
+#include <stdio.h>
+#include <string.h>
+
+#define SPIFLASH_STRESS_TEST_TASK_COUNT 3
+
+struct runtest_task {
+    struct os_task task;
+    char name[sizeof "taskX"];
+    OS_TASK_STACK_DEFINE_NOSTATIC(stack, 
MYNEWT_VAL(SPIFLASH_STRESS_TEST_STACK_SIZE));
+};
+
+static struct runtest_task runtest_tasks[SPIFLASH_STRESS_TEST_TASK_COUNT];
+
+static int runtest_next_task_idx;
+
+struct task_cfg {
+    uint8_t flash_area_id;
+    uint32_t flash_area_offset;
+    uint32_t flash_area_size;
+    int increment;
+    int pin;
+} task_args[] = {
+    { MYNEWT_VAL(SPIFLASH_STRESS_TEST_FLASH_AREA_ID), 0x00000, 0x01000, 1, 11 
},
+    { MYNEWT_VAL(SPIFLASH_STRESS_TEST_FLASH_AREA_ID), 0x02000, 0x06000, 7, 12 
},
+    { MYNEWT_VAL(SPIFLASH_STRESS_TEST_FLASH_AREA_ID), 0x08000, 0x08000, 13, 13 
},
+};
+
+
+struct os_task *
+runtest_init_task(os_task_func_t task_func, uint8_t prio)
+{
+    struct os_task *task = NULL;
+#if 1
 
 Review comment:
   Are you planning on removing this later ? Doesn't really serve a purpose if 
it's 1 :-)

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to