You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/06/22 15:20:50 UTC
[GitHub] [incubator-nuttx] curuvar opened a new pull request, #6498: Added PWM support for Raspberry Pi Pico
curuvar opened a new pull request, #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498
## Summary
Added code to the Raspberry Pi Pico to support the PWM driver code.
## Impact
This should have no impact on existing functionality.
## Testing
Have tested the ability to generate wave forms using existing PWM demo application.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] curuvar commented on a diff in pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
curuvar commented on code in PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#discussion_r904071624
##########
.gitignore:
##########
@@ -30,6 +30,7 @@
.depend
/.config
/.config.old
+/.config\ *
Review Comment:
I meant to delete this (and the ".context *" one). I had a conflict on my end with iCloud and had just added these to clean up the git change list.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] curuvar commented on a diff in pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
curuvar commented on code in PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#discussion_r904079896
##########
boards/arm/rp2040/common/src/rp2040_pwmdev.c:
##########
@@ -0,0 +1,103 @@
+/****************************************************************************
+ * boards/arm/rp2040/common/src/rp2040_pwm.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 <stdio.h>
+#include <debug.h>
+#include <errno.h>
+
+#include "rp2040_pwm.h"
+
+// #include <stdint.h>
+// #include <stdbool.h>
+// #include <debug.h>
+// #include <assert.h>
+
+// #include <nuttx/board.h>
+// #include <arch/board/board.h>
+// #include <nuttx/arch.h>
+// #include <nuttx/irq.h>
+// #include <arch/irq.h>
+// #include <nuttx/signal.h>
+
Review Comment:
Thanks, I meant to delete these but missed them.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] hartmannathan commented on a diff in pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
hartmannathan commented on code in PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#discussion_r904000796
##########
boards/arm/rp2040/common/src/rp2040_pwmdev.c:
##########
@@ -0,0 +1,103 @@
+/****************************************************************************
+ * boards/arm/rp2040/common/src/rp2040_pwm.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 <stdio.h>
+#include <debug.h>
+#include <errno.h>
+
+#include "rp2040_pwm.h"
+
+// #include <stdint.h>
+// #include <stdbool.h>
+// #include <debug.h>
+// #include <assert.h>
+
+// #include <nuttx/board.h>
+// #include <arch/board/board.h>
+// #include <nuttx/arch.h>
+// #include <nuttx/irq.h>
+// #include <arch/irq.h>
+// #include <nuttx/signal.h>
+
Review Comment:
Shouldn't use C++ comments here; recommend to remove unneeded `#include` directives instead.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
acassis commented on PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#issuecomment-1163776821
Sure, thank you @curuvar
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on a diff in pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
acassis commented on code in PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#discussion_r903960230
##########
arch/arm/src/rp2040/Kconfig:
##########
@@ -141,6 +141,51 @@ config RP2040_I2C_DRIVER
endif
+config RP2040_PWM
+ bool "PWM"
+ select PWM
+ select ARCH_HAVE_PWM_MULTICHAN
+
+if RP2040_PWM
+
+config PWM_MULTICHAN
+ bool "support muli-channel PWM"
+ default y
+
+ if PWM_MULTICHAN
+
+ config PWM_NCHANNELS
+ int "number of channels"
Review Comment:
Hi @curuvar nice work! Thank you very much!!!
You need this run the command to check the coding style issue:
```
$ ./tools/checkpatch.sh -f arch/arm/src/rp2040/rp2040_pwm.c
$ ./tools/checkpatch.sh -f arch/arm/src/rp2040/name_of_other_file.c
...
$ ./tools/checkpatch.sh -f boards/arm/rp2040/.../name_of_other_file.c
```
##########
arch/arm/src/rp2040/Kconfig:
##########
@@ -141,6 +141,51 @@ config RP2040_I2C_DRIVER
endif
+config RP2040_PWM
+ bool "PWM"
+ select PWM
+ select ARCH_HAVE_PWM_MULTICHAN
+
+if RP2040_PWM
+
+config PWM_MULTICHAN
+ bool "support muli-channel PWM"
+ default y
+
+ if PWM_MULTICHAN
+
+ config PWM_NCHANNELS
+ int "number of channels"
Review Comment:
Hi @curuvar nice work! Thank you very much!!!
You need to run this command to check the coding style issue:
```
$ ./tools/checkpatch.sh -f arch/arm/src/rp2040/rp2040_pwm.c
$ ./tools/checkpatch.sh -f arch/arm/src/rp2040/name_of_other_file.c
...
$ ./tools/checkpatch.sh -f boards/arm/rp2040/.../name_of_other_file.c
```
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#discussion_r903968365
##########
.gitignore:
##########
@@ -30,6 +30,7 @@
.depend
/.config
/.config.old
+/.config\ *
Review Comment:
why need this?
##########
.gitignore:
##########
@@ -50,5 +51,8 @@ uImage
/external
# $(TOPDIR)/Makefile.[unix|win]::$(CONTEXTDIRS_DEPS)
.context
+.context\ *
# $(TOPDIR)/Makefile.[unix|win]::$(DIRLINKS_EXTERNAL_DIRS)
.dirlinks
+.vscode
+.DS_Store
Review Comment:
ditto
##########
.gitignore:
##########
@@ -50,5 +51,8 @@ uImage
/external
# $(TOPDIR)/Makefile.[unix|win]::$(CONTEXTDIRS_DEPS)
.context
+.context\ *
Review Comment:
ditto
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on a diff in pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
acassis commented on code in PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#discussion_r903960230
##########
arch/arm/src/rp2040/Kconfig:
##########
@@ -141,6 +141,51 @@ config RP2040_I2C_DRIVER
endif
+config RP2040_PWM
+ bool "PWM"
+ select PWM
+ select ARCH_HAVE_PWM_MULTICHAN
+
+if RP2040_PWM
+
+config PWM_MULTICHAN
+ bool "support muli-channel PWM"
+ default y
+
+ if PWM_MULTICHAN
+
+ config PWM_NCHANNELS
+ int "number of channels"
Review Comment:
Hi @curuvar nice work! Thank you very much!!!
You need to run this command to check the coding style issues:
```
$ ./tools/checkpatch.sh -f arch/arm/src/rp2040/rp2040_pwm.c
$ ./tools/checkpatch.sh -f arch/arm/src/rp2040/name_of_other_file.c
...
$ ./tools/checkpatch.sh -f boards/arm/rp2040/.../name_of_other_file.c
```
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] curuvar commented on a diff in pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
curuvar commented on code in PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#discussion_r904078393
##########
.gitignore:
##########
@@ -50,5 +51,8 @@ uImage
/external
# $(TOPDIR)/Makefile.[unix|win]::$(CONTEXTDIRS_DEPS)
.context
+.context\ *
# $(TOPDIR)/Makefile.[unix|win]::$(DIRLINKS_EXTERNAL_DIRS)
.dirlinks
+.vscode
+.DS_Store
Review Comment:
".DS_Store" is something MacOS tends to add and its unneeded repository.
".vscode" is added by VSCode.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
acassis commented on PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#issuecomment-1163635749
Thank you @curuvar now the CI will pass!!!
But I think you just forgot to do the rebase. It is important to keep our git branch linear (if you run gitk or other visualizer inside NuttX you will see history line is unique)
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
acassis commented on PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#issuecomment-1163509389
Hi @curuvar thank you very much for this PR, please check and fix the coding styles in all C files, i.e.:
```
$ ./tools/checkpatch.sh -f arch/arm/src/rp2040/rp2040_pwm.c
```
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#issuecomment-1163328109
@curuvar please remove the merge patch from the PR.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] curuvar closed pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
curuvar closed pull request #6498: Added PWM support for Raspberry Pi Pico
URL: https://github.com/apache/incubator-nuttx/pull/6498
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] curuvar commented on pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
curuvar commented on PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#issuecomment-1163649509
I'm trying to figure out the rebase. I (probably foolishly) made the changes in the master branch. I still don't really have the zen of git. Should I delete my clone of the repository and build a new one from scratch or is there some other easy way to recover?
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on a diff in pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
acassis commented on code in PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#discussion_r903935645
##########
arch/arm/src/rp2040/Kconfig:
##########
@@ -141,6 +141,51 @@ config RP2040_I2C_DRIVER
endif
+config RP2040_PWM
+ bool "PWM"
+ select PWM
+ select ARCH_HAVE_PWM_MULTICHAN
+
+if RP2040_PWM
+
+config PWM_MULTICHAN
+ bool "support muli-channel PWM"
Review Comment:
```suggestion
bool "Support Multi-Channel PWM"
##########
arch/arm/src/rp2040/rp2040_pwm.c:
##########
@@ -0,0 +1,484 @@
+/****************************************************************************
+ * arch/arm/src/rp2040/rp2040_pwm.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 <sys/types.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <debug.h>
+
+#include <nuttx/irq.h>
+#include <nuttx/timers/pwm.h>
+#include <arch/board/board.h>
+#include "rp2040_pwm.h"
+#include "rp2040_gpio.h"
+
+
+/****************************************************************************
+ * Local Function Prototypes
+ ****************************************************************************/
+
+static int pwm_setup ( struct pwm_lowerhalf_s * dev );
Review Comment:
```suggestion
static int pwm_setup(struct pwm_lowerhalf_s *dev);
##########
arch/arm/src/rp2040/rp2040_pwm.c:
##########
@@ -0,0 +1,484 @@
+/****************************************************************************
+ * arch/arm/src/rp2040/rp2040_pwm.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 <sys/types.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <debug.h>
+
+#include <nuttx/irq.h>
+#include <nuttx/timers/pwm.h>
+#include <arch/board/board.h>
+#include "rp2040_pwm.h"
+#include "rp2040_gpio.h"
+
+
+/****************************************************************************
+ * Local Function Prototypes
+ ****************************************************************************/
+
+static int pwm_setup ( struct pwm_lowerhalf_s * dev );
+
+static int pwm_shutdown ( struct pwm_lowerhalf_s * dev );
+
+static int pwm_start ( struct pwm_lowerhalf_s * dev,
+ const struct pwm_info_s * info );
Review Comment:
```suggestion
static int pwm_start(struct pwm_lowerhalf_s *dev,
const struct pwm_info_s *info);
##########
arch/arm/src/rp2040/rp2040_pwm.c:
##########
@@ -0,0 +1,484 @@
+/****************************************************************************
+ * arch/arm/src/rp2040/rp2040_pwm.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 <sys/types.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <debug.h>
+
+#include <nuttx/irq.h>
+#include <nuttx/timers/pwm.h>
+#include <arch/board/board.h>
+#include "rp2040_pwm.h"
+#include "rp2040_gpio.h"
+
+
+/****************************************************************************
+ * Local Function Prototypes
+ ****************************************************************************/
+
+static int pwm_setup ( struct pwm_lowerhalf_s * dev );
+
+static int pwm_shutdown ( struct pwm_lowerhalf_s * dev );
+
+static int pwm_start ( struct pwm_lowerhalf_s * dev,
+ const struct pwm_info_s * info );
+
+static int pwm_stop ( struct pwm_lowerhalf_s * dev );
Review Comment:
```suggestion
static int pwm_stop(struct pwm_lowerhalf_s *dev);
##########
arch/arm/src/rp2040/rp2040_pwm.c:
##########
@@ -0,0 +1,484 @@
+/****************************************************************************
+ * arch/arm/src/rp2040/rp2040_pwm.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 <sys/types.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <debug.h>
+
+#include <nuttx/irq.h>
+#include <nuttx/timers/pwm.h>
+#include <arch/board/board.h>
+#include "rp2040_pwm.h"
+#include "rp2040_gpio.h"
+
+
+/****************************************************************************
+ * Local Function Prototypes
+ ****************************************************************************/
+
+static int pwm_setup ( struct pwm_lowerhalf_s * dev );
+
+static int pwm_shutdown ( struct pwm_lowerhalf_s * dev );
Review Comment:
```suggestion
static int pwm_shutdown(struct pwm_lowerhalf_s *dev);
##########
arch/arm/src/rp2040/Kconfig:
##########
@@ -141,6 +141,51 @@ config RP2040_I2C_DRIVER
endif
+config RP2040_PWM
+ bool "PWM"
+ select PWM
+ select ARCH_HAVE_PWM_MULTICHAN
+
+if RP2040_PWM
+
+config PWM_MULTICHAN
+ bool "support muli-channel PWM"
+ default y
+
+ if PWM_MULTICHAN
+
+ config PWM_NCHANNELS
+ int "number of channels"
Review Comment:
```suggestion
int "Number of channels"
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
acassis commented on PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#issuecomment-1163512990
@curuvar in order to fix the merge issue reported by @xiaoxiang781216 you can do it:
```
leave your branch and move to master branch (or upstream branch if you followed our documentation: https://nuttx.apache.org/docs/latest/contributing/making-changes.html )
$ git checkout upstream
$ git pull
$ git checkout your_branch_name
$ git rebase upstream
$ git push -f
```
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] curuvar commented on pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
curuvar commented on PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#issuecomment-1163761087
I'm going to close and re-open the pull request to try to get this done right.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-nuttx] acassis commented on a diff in pull request #6498: Added PWM support for Raspberry Pi Pico
Posted by GitBox <gi...@apache.org>.
acassis commented on code in PR #6498:
URL: https://github.com/apache/incubator-nuttx/pull/6498#discussion_r903946616
##########
arch/arm/src/rp2040/rp2040_pwm.c:
##########
@@ -0,0 +1,484 @@
+/****************************************************************************
+ * arch/arm/src/rp2040/rp2040_pwm.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 <sys/types.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <debug.h>
+
+#include <nuttx/irq.h>
+#include <nuttx/timers/pwm.h>
+#include <arch/board/board.h>
+#include "rp2040_pwm.h"
+#include "rp2040_gpio.h"
+
+
+/****************************************************************************
+ * Local Function Prototypes
+ ****************************************************************************/
+
+static int pwm_setup ( struct pwm_lowerhalf_s * dev );
+
+static int pwm_shutdown ( struct pwm_lowerhalf_s * dev );
+
+static int pwm_start ( struct pwm_lowerhalf_s * dev,
+ const struct pwm_info_s * info );
+
+static int pwm_stop ( struct pwm_lowerhalf_s * dev );
Review Comment:
```suggestion
static int pwm_stop(struct pwm_lowerhalf_s *dev);
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org