Private
Public Access
2
0

pwm: add period limits, warn over syslog

Added minimum, maximum and default period settings to board definitions
PWM will now have a default period as defined in the board defintion.
When using pwm_write() writing 1.0f or above will default to 100%.

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
This commit is contained in:
Thomas Ingleby
2014-10-30 12:03:24 +00:00
parent 29b0425c9b
commit 3b01af1da1
6 changed files with 28 additions and 0 deletions

View File

@@ -183,6 +183,9 @@ typedef struct {
unsigned int def_uart_dev; /**< Position in array of defult uart */
unsigned int uart_dev_count; /**< Usable spi Count */
mraa_uart_dev_t uart_dev[6]; /**< Array of UARTs */
int pwm_default_period; /**< The default PWM period is US */
int pwm_max_period; /**< Maximum period in us */
int pwm_min_period; /**< Minimum period in us */
mraa_pininfo_t* pins; /**< Pointer to pin array */
/*@}*/
} mraa_board_t;