xiaoxiang781216 commented on code in PR #7472:
URL: https://github.com/apache/incubator-nuttx/pull/7472#discussion_r1011969646


##########
arch/arm/src/sama5/sam_tc.c:
##########
@@ -411,15 +399,33 @@ static const struct sam_tcconfig_s g_tc678config =
 /* Timer/counter state */
 
 #ifdef CONFIG_SAMA5_TC0
-static struct sam_tc_s g_tc012;
+static struct sam_tc_s g_tc012 =
+{
+  .lock = NXMUTEX_INITIALIZER,
+  .base = SAM_TC012_VBASE,
+  .pid  = SAM_PID_TC0,
+  .tc   = 0,
+};
 #endif
 
 #ifdef CONFIG_SAMA5_TC1
-static struct sam_tc_s g_tc345;
+static struct sam_tc_s g_tc345 =
+{
+  .lock = NXMUTEX_INITIALIZER,
+  .base = SAM_TC345_VBASE,
+  .pid  = SAM_PID_TC1,
+  .tc   = 1,
+};
 #endif
 
 #ifdef CONFIG_SAMA5_TC2
-static struct sam_tc_s g_tc678;
+static struct sam_tc_s g_tc678 =
+{
+  .lock = NXMUTEX_INITIALIZER,
+  .base = SAM_TC678_VBASE,
+  .pid  = SAM_PID_TC2,
+  .tc   = 2,
+};

Review Comment:
   yes



##########
arch/arm/src/sama5/sam_tc.c:
##########
@@ -411,15 +399,33 @@ static const struct sam_tcconfig_s g_tc678config =
 /* Timer/counter state */
 
 #ifdef CONFIG_SAMA5_TC0
-static struct sam_tc_s g_tc012;
+static struct sam_tc_s g_tc012 =
+{
+  .lock = NXMUTEX_INITIALIZER,
+  .base = SAM_TC012_VBASE,
+  .pid  = SAM_PID_TC0,
+  .tc   = 0,
+};
 #endif
 
 #ifdef CONFIG_SAMA5_TC1
-static struct sam_tc_s g_tc345;
+static struct sam_tc_s g_tc345 =
+{
+  .lock = NXMUTEX_INITIALIZER,
+  .base = SAM_TC345_VBASE,
+  .pid  = SAM_PID_TC1,
+  .tc   = 1,
+};

Review Comment:
   yes



##########
arch/arm/src/sama5/sam_tc.c:
##########
@@ -411,15 +399,33 @@ static const struct sam_tcconfig_s g_tc678config =
 /* Timer/counter state */
 
 #ifdef CONFIG_SAMA5_TC0
-static struct sam_tc_s g_tc012;
+static struct sam_tc_s g_tc012 =
+{
+  .lock = NXMUTEX_INITIALIZER,
+  .base = SAM_TC012_VBASE,
+  .pid  = SAM_PID_TC0,
+  .tc   = 0,
+};

Review Comment:
   yes



-- 
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