raiden00pl commented on a change in pull request #1636:
URL: https://github.com/apache/incubator-nuttx/pull/1636#discussion_r475736115



##########
File path: arch/arm/src/nrf52/nrf52_ppi.c
##########
@@ -0,0 +1,134 @@
+/****************************************************************************
+ * arch/arm/src/chip/nrf52_ppi.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 "arm_arch.h"
+#include "chip.h"
+#include "nrf52_ppi.h"
+#include "hardware/nrf52_ppi.h"
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Types
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Function Prototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: nrf52_ppi_channel_enable
+ ****************************************************************************/
+
+void nrf52_ppi_channel_enable(uint8_t ch, bool enable)
+{
+  DEBUGASSERT(ch < NRF52_PPI_NUM_CHANNELS);
+
+  if (enable)
+    {
+      putreg32(PPI_CHEN_CH(ch), NRF52_PPI_CHENSET);
+    }
+  else
+    {
+      putreg32(PPI_CHEN_CH(ch), NRF52_PPI_CHENCLR);
+    }
+}
+
+/****************************************************************************
+ * Name: nrf52_ppi_set_event_ep
+ ****************************************************************************/
+
+void nrf52_ppi_set_event_ep(uint8_t ch, volatile uint32_t *event_reg)

Review comment:
       This is done in the putreg32 macro itself, so the arguments can be just 
uint32_t.
   From arch/arm/src/common/arm_arch.h:
   `# define putreg32(v,a)        (*(volatile uint32_t *)(a) = (v))`
   




----------------------------------------------------------------
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:
[email protected]


Reply via email to