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/05/10 02:51:20 UTC
[GitHub] [incubator-nuttx] CV-Bowen opened a new pull request, #6225: arm/tlsr82: pwm driver optimize and add pulse count support.
CV-Bowen opened a new pull request, #6225:
URL: https://github.com/apache/incubator-nuttx/pull/6225
## Summary
1. add pulse count support for pwm0;
2. add more detailed config for pwm;
3. pwm configuration and start process optimize;
## Impact
arm tlsr82xx chip pwm
## Testing
local test with pwm example
1. pwm max/min duty test;
2. pwm max/min frequency test;
3. pwm0 pulse count test;
--
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] pkarashchenko commented on a diff in pull request #6225: arm/tlsr82: pwm driver optimize and add pulse count support.
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6225:
URL: https://github.com/apache/incubator-nuttx/pull/6225#discussion_r869075834
##########
arch/arm/src/tlsr82/Kconfig:
##########
@@ -250,6 +250,53 @@ menuconfig TLSR82_USB
menuconfig TLSR82_PWM
bool "PWM Configuration"
default n
+ select PWM
+
+if TLSR82_PWM
+
+# PWM0 configuration
+
+ config TLSR82_PWM0
Review Comment:
I think other paces do not have such alignment. Maybe we can remove TAB suffix in this case as well?
--
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] pkarashchenko merged pull request #6225: arm/tlsr82: pwm driver optimize and add pulse count support.
Posted by GitBox <gi...@apache.org>.
pkarashchenko merged PR #6225:
URL: https://github.com/apache/incubator-nuttx/pull/6225
--
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] CV-Bowen commented on a diff in pull request #6225: arm/tlsr82: pwm driver optimize and add pulse count support.
Posted by GitBox <gi...@apache.org>.
CV-Bowen commented on code in PR #6225:
URL: https://github.com/apache/incubator-nuttx/pull/6225#discussion_r870000890
##########
arch/arm/src/tlsr82/tlsr82_pwm.c:
##########
@@ -589,16 +507,13 @@ static int pwm_cfg_check(struct tlsr82_pwmtimer_s *priv)
* Returned Value:
* Zero on success; a negated errno value on failure
*
- * Assumptions:
- * APB1 or 2 clocking for the GPIOs has already been configured by the RCC
- * logic at power up.
- *
****************************************************************************/
static int pwm_setup(struct pwm_lowerhalf_s *dev)
{
struct tlsr82_pwmtimer_s *priv = (struct tlsr82_pwmtimer_s *)dev;
uint32_t pincfg;
+ int ret = OK;
Review Comment:
Done
--
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] pkarashchenko commented on a diff in pull request #6225: arm/tlsr82: pwm driver optimize and add pulse count support.
Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #6225:
URL: https://github.com/apache/incubator-nuttx/pull/6225#discussion_r869888772
##########
arch/arm/src/tlsr82/tlsr82_pwm.c:
##########
@@ -589,16 +507,13 @@ static int pwm_cfg_check(struct tlsr82_pwmtimer_s *priv)
* Returned Value:
* Zero on success; a negated errno value on failure
*
- * Assumptions:
- * APB1 or 2 clocking for the GPIOs has already been configured by the RCC
- * logic at power up.
- *
****************************************************************************/
static int pwm_setup(struct pwm_lowerhalf_s *dev)
{
struct tlsr82_pwmtimer_s *priv = (struct tlsr82_pwmtimer_s *)dev;
uint32_t pincfg;
+ int ret = OK;
Review Comment:
seems like init value is not needed. Let's remove `= OK;` or change `return OK;` to `return ret;`
--
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] CV-Bowen commented on a diff in pull request #6225: arm/tlsr82: pwm driver optimize and add pulse count support.
Posted by GitBox <gi...@apache.org>.
CV-Bowen commented on code in PR #6225:
URL: https://github.com/apache/incubator-nuttx/pull/6225#discussion_r869096447
##########
arch/arm/src/tlsr82/Kconfig:
##########
@@ -250,6 +250,53 @@ menuconfig TLSR82_USB
menuconfig TLSR82_PWM
bool "PWM Configuration"
default n
+ select PWM
+
+if TLSR82_PWM
+
+# PWM0 configuration
+
+ config TLSR82_PWM0
Review Comment:
Ack and Done.
--
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