Merged in raiden00/nuttx_pe (pull request #734)

stm32_pwm: break and lock configuration and some cosmetics

Approved-by: GregoryN <gnutt@nuttx.org>
This commit is contained in:
Mateusz Szafoni
2018-10-15 17:18:38 +00:00
committed by GregoryN
parent 632bba3af8
commit 6e18a32b3f
4 changed files with 304 additions and 120 deletions
+1 -1
View File
@@ -3158,7 +3158,7 @@ config STM32_ONESHOT_MAXTIMERS
timers that you can use.
config STM32_PWM_LL_OPS
bool "PWM low-lewel operations"
bool "PWM low-level operations"
default n
---help---
Enable low-level PWM ops.
+2 -2
View File
@@ -1073,7 +1073,7 @@
#define GTIM_EGR_CC2G (1 << 2) /* Bit 2: Capture/compare 2 generation (TIM2-5,9,12,&15 only) */
#define GTIM_EGR_CC3G (1 << 3) /* Bit 3: Capture/compare 3 generation (TIM2-5 only) */
#define GTIM_EGR_CC4G (1 << 4) /* Bit 4: Capture/compare 4 generation (TIM2-5 only) */
#define GTIM_EGR_COMIG (1 << 5) /* Bit 5: Capture/Compare control update generation (TIM15-17 only) */
#define GTIM_EGR_COMG (1 << 5) /* Bit 5: Capture/Compare control update generation (TIM15-17 only) */
#define GTIM_EGR_TG (1 << 6) /* Bit 6: Trigger generation (TIM2-5,9,12&16-17 only) */
#define GTIM_EGR_BG (1 << 7) /* Bit 7: Break generation (TIM15-17 only) */
@@ -1245,7 +1245,7 @@
#define GTIM_RCR_REP_MAX 128
/* Break and dead-time register (TIM15-17 only */
/* Break and dead-time register (TIM15-17 only) */
#define GTIM_BDTR_DTG_SHIFT (0) /* Bits 7:0 [7:0]: Dead-Time Generator set-up */
#define GTIM_BDTR_DTG_MASK (0xff << GTIM_BDTR_DTG_SHIFT)
File diff suppressed because it is too large Load Diff
+10 -1
View File
@@ -928,7 +928,6 @@ enum stm32_chan_e
struct pwm_lowerhalf_s;
struct stm32_pwm_ops_s
{
/* Update CCR register */
int (*ccr_update)(FAR struct pwm_lowerhalf_s *dev, uint8_t index, uint32_t ccr);
@@ -956,6 +955,16 @@ struct stm32_pwm_ops_s
/* PWM configure */
int (*configure)(FAR struct pwm_lowerhalf_s *dev);
/* Software break */
int (*soft_break)(FAR struct pwm_lowerhalf_s *dev, bool state);
#ifdef HAVE_COMPLEMENTARY
/* Deadtime update */
int (*dt_update)(FAR struct pwm_lowerhalf_s *dev, uint8_t dt);
#endif
};
#endif