summaryrefslogtreecommitdiff
path: root/chip/npcx/pwm_chip.h
blob: 77d6991c7b55b09d22fd5575e7156baab729f71b (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
/* 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.
 */

/* NPCX-specific PWM module for Chrome EC */

#ifndef __CROS_EC_NPCX_PWM_H
#define __CROS_EC_NPCX_PWM_H

/* Data structure to define PWM channels. */
struct pwm_t {
	/* PWM channel ID */
	int channel;
	/* PWM channel flags. See include/pwm.h */
	uint32_t flags;
	/* PWM freq. */
	uint32_t freq;
	/* PWM pulses each cycle. */
	uint32_t cycle_pulses;
};

extern const struct pwm_t pwm_channels[];
void pwm_config(enum pwm_channel ch);

#endif /* __CROS_EC_NPCX_PWM_H */