mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
include/nuttx/timers/pwm.h: Correct some typos. arch/arm/src/stm32f0l0g0: Add PWM support.
This commit is contained in:
committed by
Gregory Nutt
parent
2a271a5d62
commit
ca52e33ba9
File diff suppressed because it is too large
Load Diff
@@ -91,27 +91,39 @@
|
||||
#define GPIO_TIM1_BKIN2_1 (GPIO_ALT | GPIO_AF5 | GPIO_PORTA | GPIO_PIN11)
|
||||
#define GPIO_TIM1_BKIN2_2 (GPIO_ALT | GPIO_AF2 | GPIO_PORTC | GPIO_PIN14)
|
||||
#define GPIO_TIM1_BKIN2_3 (GPIO_ALT | GPIO_AF2 | GPIO_PORTD | GPIO_PIN9)
|
||||
#define GPIO_TIM1_CH1_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTA | GPIO_PIN8)
|
||||
#define GPIO_TIM1_CH1_2 (GPIO_ALT | GPIO_AF2 | GPIO_PORTC | GPIO_PIN8)
|
||||
#define GPIO_TIM1_CH1N_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTA | GPIO_PIN7)
|
||||
#define GPIO_TIM1_CH1N_2 (GPIO_ALT | GPIO_AF2 | GPIO_PORTB | GPIO_PIN13)
|
||||
#define GPIO_TIM1_CH1N_3 (GPIO_ALT | GPIO_AF2 | GPIO_PORTD | GPIO_PIN2)
|
||||
#define GPIO_TIM1_CH2_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTA | GPIO_PIN9)
|
||||
#define GPIO_TIM1_CH2_2 (GPIO_ALT | GPIO_AF1 | GPIO_PORTB | GPIO_PIN3)
|
||||
#define GPIO_TIM1_CH2_3 (GPIO_ALT | GPIO_AF2 | GPIO_PORTC | GPIO_PIN9)
|
||||
#define GPIO_TIM1_CH2N_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTB | GPIO_PIN0)
|
||||
#define GPIO_TIM1_CH2N_2 (GPIO_ALT | GPIO_AF2 | GPIO_PORTB | GPIO_PIN14)
|
||||
#define GPIO_TIM1_CH2N_3 (GPIO_ALT | GPIO_AF2 | GPIO_PORTD | GPIO_PIN3)
|
||||
#define GPIO_TIM1_CH3_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTA | GPIO_PIN10)
|
||||
#define GPIO_TIM1_CH3_2 (GPIO_ALT | GPIO_AF1 | GPIO_PORTB | GPIO_PIN6)
|
||||
#define GPIO_TIM1_CH3_3 (GPIO_ALT | GPIO_AF2 | GPIO_PORTC | GPIO_PIN10)
|
||||
#define GPIO_TIM1_CH3N_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTB | GPIO_PIN1)
|
||||
#define GPIO_TIM1_CH3N_2 (GPIO_ALT | GPIO_AF2 | GPIO_PORTB | GPIO_PIN15)
|
||||
#define GPIO_TIM1_CH3N_3 (GPIO_ALT | GPIO_AF2 | GPIO_PORTD | GPIO_PIN4)
|
||||
#define GPIO_TIM1_CH4_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTA | GPIO_PIN11)
|
||||
#define GPIO_TIM1_CH4_2 (GPIO_ALT | GPIO_AF2 | GPIO_PORTC | GPIO_PIN11)
|
||||
#define GPIO_TIM1_CH1OUT_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTA | GPIO_PIN8)
|
||||
#define GPIO_TIM1_CH1OUT_2 (GPIO_ALT | GPIO_AF2 | GPIO_PORTC | GPIO_PIN8)
|
||||
#define GPIO_TIM1_CH1NOUT_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTA | GPIO_PIN7)
|
||||
#define GPIO_TIM1_CH1NOUT_2 (GPIO_ALT | GPIO_AF2 | GPIO_PORTB | GPIO_PIN13)
|
||||
#define GPIO_TIM1_CH1NOUT_3 (GPIO_ALT | GPIO_AF2 | GPIO_PORTD | GPIO_PIN2)
|
||||
#define GPIO_TIM1_CH2OUT_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTA | GPIO_PIN9)
|
||||
#define GPIO_TIM1_CH2OUT_2 (GPIO_ALT | GPIO_AF1 | GPIO_PORTB | GPIO_PIN3)
|
||||
#define GPIO_TIM1_CH2OUT_3 (GPIO_ALT | GPIO_AF2 | GPIO_PORTC | GPIO_PIN9)
|
||||
#define GPIO_TIM1_CH2NOUT_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTB | GPIO_PIN0)
|
||||
#define GPIO_TIM1_CH2NOUT_2 (GPIO_ALT | GPIO_AF2 | GPIO_PORTB | GPIO_PIN14)
|
||||
#define GPIO_TIM1_CH2NOUT_3 (GPIO_ALT | GPIO_AF2 | GPIO_PORTD | GPIO_PIN3)
|
||||
#define GPIO_TIM1_CH3OUT_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTA | GPIO_PIN10)
|
||||
#define GPIO_TIM1_CH3OUT_2 (GPIO_ALT | GPIO_AF1 | GPIO_PORTB | GPIO_PIN6)
|
||||
#define GPIO_TIM1_CH3OUT_3 (GPIO_ALT | GPIO_AF2 | GPIO_PORTC | GPIO_PIN10)
|
||||
#define GPIO_TIM1_CH3NOUT_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTB | GPIO_PIN1)
|
||||
#define GPIO_TIM1_CH3NOUT_2 (GPIO_ALT | GPIO_AF2 | GPIO_PORTB | GPIO_PIN15)
|
||||
#define GPIO_TIM1_CH3NOUT_3 (GPIO_ALT | GPIO_AF2 | GPIO_PORTD | GPIO_PIN4)
|
||||
#define GPIO_TIM1_CH4OUT_1 (GPIO_ALT | GPIO_AF2 | GPIO_PORTA | GPIO_PIN11)
|
||||
#define GPIO_TIM1_CH4OUT_2 (GPIO_ALT | GPIO_AF2 | GPIO_PORTC | GPIO_PIN11)
|
||||
#define GPIO_TIM1_ETR (GPIO_ALT | GPIO_AF2 | GPIO_PORTA | GPIO_PIN12)
|
||||
|
||||
#define GPIO_TIM3_CH1OUT_1 (GPIO_ALT | GPIO_AF1 | GPIO_PORTA | GPIO_PIN6)
|
||||
#define GPIO_TIM3_CH1OUT_2 (GPIO_ALT | GPIO_AF1 | GPIO_PORTB | GPIO_PIN4)
|
||||
#define GPIO_TIM3_CH1OUT_3 (GPIO_ALT | GPIO_AF1 | GPIO_PORTC | GPIO_PIN6)
|
||||
#define GPIO_TIM3_CH2OUT_1 (GPIO_ALT | GPIO_AF1 | GPIO_PORTA | GPIO_PIN7)
|
||||
#define GPIO_TIM3_CH2OUT_2 (GPIO_ALT | GPIO_AF1 | GPIO_PORTB | GPIO_PIN5)
|
||||
#define GPIO_TIM3_CH2OUT_3 (GPIO_ALT | GPIO_AF1 | GPIO_PORTC | GPIO_PIN7)
|
||||
#define GPIO_TIM3_CH3OUT_1 (GPIO_ALT | GPIO_AF1 | GPIO_PORTB | GPIO_PIN0)
|
||||
#define GPIO_TIM3_CH3OUT_2 (GPIO_ALT | GPIO_AF1 | GPIO_PORTC | GPIO_PIN8)
|
||||
#define GPIO_TIM3_CH4OUT_1 (GPIO_ALT | GPIO_AF1 | GPIO_PORTB | GPIO_PIN1)
|
||||
#define GPIO_TIM3_CH4OUT_2 (GPIO_ALT | GPIO_AF1 | GPIO_PORTC | GPIO_PIN9)
|
||||
#define GPIO_TIM3_ETR (GPIO_ALT | GPIO_AF1 | GPIO_PORTD | GPIO_PIN2)
|
||||
|
||||
/* TODO: USART */
|
||||
|
||||
#define GPIO_USART1_CTS_1 (GPIO_ALT | GPIO_AF1 | GPIO_PORTA | GPIO_PIN11)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -44,7 +44,7 @@
|
||||
*
|
||||
* The PWM driver is split into two parts:
|
||||
*
|
||||
* 1) An "upper half", generic driver that provides the comman PWM interface
|
||||
* 1) An "upper half", generic driver that provides the common PWM interface
|
||||
* to application level code, and
|
||||
* 2) A "lower half", platform-specific driver that implements the low-level
|
||||
* timer controls to implement the PWM functionality.
|
||||
@@ -66,6 +66,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* CONFIG_PWM - Enables because PWM driver support
|
||||
* CONFIG_PWM_PULSECOUNT - Some hardware will support generation of a fixed
|
||||
* number of pulses. This might be used, for example to support a stepper
|
||||
@@ -79,10 +80,11 @@
|
||||
*/
|
||||
|
||||
/* IOCTL Commands ***********************************************************/
|
||||
|
||||
/* The PWM module uses a standard character driver framework. However, since
|
||||
* the PWM driver is a device control interface and not a data transfer
|
||||
* interface, the majority of the functionality is implemented in driver
|
||||
* ioctl calls. The PWM ioctl commands are lised below:
|
||||
* ioctl calls. The PWM ioctl commands are listed below:
|
||||
*
|
||||
* PWMIOC_SETCHARACTERISTICS - Set the characteristics of the next pulsed
|
||||
* output. This command will neither start nor stop the pulsed output.
|
||||
@@ -97,7 +99,7 @@
|
||||
* PWMIOC_GETCHARACTERISTICS - Get the currently selected characteristics of
|
||||
* the pulsed output (independent of whether the output is start or stopped).
|
||||
*
|
||||
* ioctl argument: A reference to struct pwm_info_s to recevie the
|
||||
* ioctl argument: A reference to struct pwm_info_s to receive the
|
||||
* characteristics of the pulsed output.
|
||||
*
|
||||
* PWMIOC_START - Start the pulsed output. The PWMIOC_SETCHARACTERISTICS
|
||||
@@ -285,7 +287,7 @@ int pwm_register(FAR const char *path, FAR struct pwm_lowerhalf_s *dev);
|
||||
* 1. The upper half driver calls the start method, providing the lower
|
||||
* half driver with the pulse train characteristics. If a fixed
|
||||
* number of pulses is required, the 'count' value will be nonzero.
|
||||
* 2. The lower half driver's start() methoc must verify that it can
|
||||
* 2. The lower half driver's start() method must verify that it can
|
||||
* support the request pulse train (frequency, duty, AND pulse count).
|
||||
* It it cannot, it should return an error. If the pulse count is
|
||||
* non-zero, it should set up the hardware for that number of pulses
|
||||
|
||||
Reference in New Issue
Block a user