mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/sam0_common: move PWM to common code
This commit is contained in:
parent
cb11b2d33f
commit
824f7aa82b
@ -212,6 +212,24 @@ typedef struct {
|
||||
uint8_t gclk_src; /**< GCLK source which supplys SERCOM */
|
||||
} uart_conf_t;
|
||||
|
||||
/**
|
||||
* @brief PWM channel configuration data structure
|
||||
*/
|
||||
typedef struct {
|
||||
gpio_t pin; /**< GPIO pin */
|
||||
gpio_mux_t mux; /**< pin function multiplex value */
|
||||
uint8_t chan; /**< TCC channel to use */
|
||||
} pwm_conf_chan_t;
|
||||
|
||||
/**
|
||||
* @brief PWM device configuration data structure
|
||||
*/
|
||||
typedef struct {
|
||||
Tcc *dev; /**< TCC device to use */
|
||||
const pwm_conf_chan_t *chan;/**< channel configuration */
|
||||
const uint8_t chan_numof; /**< number of channels */
|
||||
} pwm_conf_t;
|
||||
|
||||
/**
|
||||
* @brief Available values for SERCOM SPI MISO pad selection
|
||||
*/
|
||||
|
@ -70,24 +70,6 @@ enum {
|
||||
*/
|
||||
#define SPI_HWCS(x) (UINT_MAX - 1)
|
||||
|
||||
/**
|
||||
* @brief PWM channel configuration data structure
|
||||
*/
|
||||
typedef struct {
|
||||
gpio_t pin; /**< GPIO pin */
|
||||
gpio_mux_t mux; /**< pin function multiplex value */
|
||||
uint8_t chan; /**< TCC channel to use */
|
||||
} pwm_conf_chan_t;
|
||||
|
||||
/**
|
||||
* @brief PWM device configuration data structure
|
||||
*/
|
||||
typedef struct {
|
||||
Tcc *dev; /**< TCC device to use */
|
||||
const pwm_conf_chan_t *chan;/**< channel configuration */
|
||||
const uint8_t chan_numof; /**< number of channels */
|
||||
} pwm_conf_t;
|
||||
|
||||
/**
|
||||
* @brief Return the numeric id of a SERCOM device derived from its address
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user