diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-19 19:35:52 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-19 19:35:52 +0000 |
commit | ef92b45bc404a1aaf0ab43a1603712f9bfc72311 (patch) | |
tree | 562a3dcd397e30f4fce128e2fc09dcaaeda4dbac | |
parent | c5ba205781809f0a9124a1bd04d78c411f536ebf (diff) | |
download | nuttx-ef92b45bc404a1aaf0ab43a1603712f9bfc72311.tar.gz nuttx-ef92b45bc404a1aaf0ab43a1603712f9bfc72311.tar.bz2 nuttx-ef92b45bc404a1aaf0ab43a1603712f9bfc72311.zip |
Remove the PWM pulse count method. It can't be support on current hardware
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4201 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_pwm.c | 23 | ||||
-rw-r--r-- | nuttx/drivers/pwm.c | 13 | ||||
-rw-r--r-- | nuttx/include/nuttx/pwm.h | 23 |
3 files changed, 0 insertions, 59 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_pwm.c b/nuttx/arch/arm/src/stm32/stm32_pwm.c index 141b7bb43..3162d31d1 100644 --- a/nuttx/arch/arm/src/stm32/stm32_pwm.c +++ b/nuttx/arch/arm/src/stm32/stm32_pwm.c @@ -115,7 +115,6 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev); static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev); static int pwm_start(FAR struct pwm_lowerhalf_s *dev, FAR const struct pwm_info_s *info); static int pwm_stop(FAR struct pwm_lowerhalf_s *dev); -static int pwm_pulsecount(FAR struct pwm_lowerhalf_s *dev, FAR pwm_count_t *count); static int pwm_ioctl(FAR struct pwm_lowerhalf_s *dev, int cmd, unsigned long arg); /**************************************************************************** @@ -129,7 +128,6 @@ static const struct pwm_ops_s g_pwmops = .shutdown = pwm_shutdown, .start = pwm_start, .stop = pwm_stop, - .pulsecount = pwm_pulsecount, .ioctl = pwm_ioctl, }; @@ -798,27 +796,6 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev) } /**************************************************************************** - * Name: pwm_pulsecount - * - * Description: - * Get the number of pulses generated - * - * Input parameters: - * dev - A reference to the lower half PWM driver state structure - * count - A pointer to the location to return the pulse count - * - * Returned Value: - * Zero on success; a negated errno value on failure - * - ****************************************************************************/ - -static int pwm_pulsecount(FAR struct pwm_lowerhalf_s *dev, FAR pwm_count_t *count) -{ -#warning "Missing logic" - return -ENOSYS; -} - -/**************************************************************************** * Name: * * Description: diff --git a/nuttx/drivers/pwm.c b/nuttx/drivers/pwm.c index c870adfe4..15447e9be 100644 --- a/nuttx/drivers/pwm.c +++ b/nuttx/drivers/pwm.c @@ -343,19 +343,6 @@ static int pwm_ioctl(FAR struct file *filep, int cmd, unsigned long arg) } break; - /* PWMIOC_GETPULSECOUNT - Return the number of pulses generated. - * - * ioctl argument: A pointer to a pwm_count_t variable that will be used to - * receive the pulse count - */ - - case PWMIOC_GETPULSECOUNT: - { - FAR pwm_count_t *count = (FAR pwm_count_t *)((uintptr_t)arg); - ret = lower->ops->pulsecount(lower, count); - } - break; - /* Any unrecognized IOCTL commands might be platform-specific ioctl commands */ default: diff --git a/nuttx/include/nuttx/pwm.h b/nuttx/include/nuttx/pwm.h index 4cf695b1d..eca721d85 100644 --- a/nuttx/include/nuttx/pwm.h +++ b/nuttx/include/nuttx/pwm.h @@ -94,18 +94,12 @@ * PWMIOC_STOP - Stop the pulsed output. * * ioctl argument: None - * - * PWMIOC_GETPULSECOUNT - Return the number of pulses generated. - * - * ioctl argument: A pointer to a pwm_count_t variable that will be used to - * receive the pulse count */ #define PWMIOC_SETCHARACTERISTICS _PWMIOC(1) #define PWMIOC_GETCHARACTERISTICS _PWMIOC(2) #define PWMIOC_START _PWMIOC(3) #define PWMIOC_STOP _PWMIOC(4) -#define PWMIOC_GETPULSECOUNT _PWMIOC(5) /**************************************************************************** * Public Types @@ -118,19 +112,6 @@ struct pwm_info_s ub16_t duty; /* Duty of the pulse train, "1" to "0" duration */ }; -/* This type is used to return pulse counts */ - -#ifdef CONFIG_HAVE_LONG_LONG -typedef uint16_t pwm_count_t; -#else -struct pwm_count_s -{ - uint32_t ms; /* Most significant 32-bits of the 64-count */ - uint32_t ls; /* Least significant 32-bits of the 64-count */ -}; -typedef struct pwm_count_s pwm_count_t; -#endif - /* This structure is a set a callback functions used to call from the upper- * half, generic PWM driver into lower-half, platform-specific logic that * supports the low-level timer outputs. @@ -161,10 +142,6 @@ struct pwm_ops_s CODE int (*stop)(FAR struct pwm_lowerhalf_s *dev); - /* Get the number of pulses generated */ - - CODE int (*pulsecount)(FAR struct pwm_lowerhalf_s *dev, FAR pwm_count_t *count); - /* Lower-half logic may support platform-specific ioctl commands */ CODE int (*ioctl)(FAR struct pwm_lowerhalf_s *dev, int cmd, unsigned long arg); |