blob: d3c31a53fba68b2951695faa1c3d5ad768c011ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* PWM control module for IT83xx. */
#ifndef __CROS_EC_IT83XX_PWM_H
#define __CROS_EC_IT83XX_PWM_H
/* Data structure to define PWM channel control registers. */
struct pwm_ctrl_t {
/* PWM channel output duty register. */
volatile uint8_t *pwm_duty;
/* PWM channel clock source selection register. */
volatile uint8_t *pwm_clock_source;
/* PWM channel pin control register. */
volatile uint8_t *pwm_pin;
};
/* Data structure to define PWM channel control registers part 2. */
struct pwm_ctrl_t2 {
/* PWM cycle time register. */
volatile uint8_t *pwm_cycle_time;
/* PWM channel clock prescaler register (LSB). */
volatile uint8_t *pwm_cpr_lsb;
/* PWM channel clock prescaler register (MSB). */
volatile uint8_t *pwm_cpr_msb;
/* PWM prescaler clock frequency select register. */
volatile uint8_t *pwm_pcfsr_reg;
/* PWM prescaler clock frequency select register setting. */
uint8_t pwm_pcfsr_ctrl;
};
/* Data structure to define PWM channels. */
struct pwm_t {
/* PWM channel ID */
int channel;
/* PWM channel flags. See include/pwm.h */
uint32_t flags;
};
extern const struct pwm_t pwm_channels[];
#endif /* __CROS_EC_IT83XX_PWM_H */
|