Skip to content

Commit 96b48bc

Browse files
committed
PWM: add defined behavior
1 parent b8d225e commit 96b48bc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

hal/pwmout_api.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,36 @@ typedef struct pwmout_s pwmout_t;
3535

3636
/**
3737
* \defgroup hal_pwmout Pwmout hal functions
38+
*
39+
* # Defined behavior
40+
* * ::pwmout_init initializes the pwm out peripheral and configures the pin
41+
* * ::pwmout_free deinitializes the pwmout object
42+
* * ::pwmout_write sets the output duty-cycle in range <0.0f, 1.0f>
43+
* * ::pwmout_read returns the current float-point output duty-cycle in range <0.0f, 1.0f>
44+
* * ::pwmout_period sets the PWM period specified in seconds, keeping the duty cycle the same
45+
* * ::pwmout_period_ms sets the PWM period specified in miliseconds, keeping the duty cycle the same
46+
* * ::pwmout_period_us sets the PWM period specified in microseconds, keeping the duty cycle the same
47+
* * ::pwmout_pulsewidth sets the PWM pulsewidth specified in seconds, keeping the period the same
48+
* * ::pwmout_pulsewidth_ms sets the PWM pulsewidth specified in miliseconds, keeping the period the same
49+
* * ::pwmout_pulsewidth_us sets the PWM pulsewidth specified in microseconds, keeping the period the same
50+
*
51+
* # Undefined behavior
52+
* * Calling other function before ::pwmout_init
53+
* * Calling ::pwmout_init with NC as pwmout pin
54+
*
3855
* @{
3956
*/
4057

58+
/**
59+
* \defgroup hal_pwmout_tests GPIO IRQ HAL tests
60+
* The Pwmout HAL tests ensure driver conformance to defined behaviour.
61+
*
62+
* To run the Pwmout hal tests use the command:
63+
*
64+
* mbed test -t <toolchain> -m <target> -n tests-mbed_hal_fpga_ci_test_shield-pwm
65+
*
66+
*/
67+
4168
/** Initialize the pwm out peripheral and configure the pin
4269
*
4370
* @param obj The pwmout object to initialize

0 commit comments

Comments
 (0)