⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 upsd_pwm.h

📁 uPSD Device Driver Files
💻 H
字号:
/*--------------------------------------------------------------------------
uPSD_PWM.H

Header file for uPSD 3200 Timer0 Device Driver
06/2002 Ver 0.1 - Initial Version

Copyright (c) 2002 ST Microelectronics
This example demo code is provided as is and has no warranty,
implied or otherwise.  You are free to use/modify any of the provided
code at your own risk in your applications with the expressed limitation
of liability (see below) so long as your product using the code contains
at least one uPSD products (device).

LIMITATION OF LIABILITY:   NEITHER STMicroelectronics NOR ITS VENDORS OR 
AGENTS SHALL BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA,
INTERRUPTION OF BUSINESS, NOR FOR INDIRECT, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER THIS AGREEMENT OR
OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
--------------------------------------------------------------------------*/

#ifndef _UPSD_PWM_H_
#define _UPSD_PWM_H_

// uPSD_PWM_Channel(Channel, Duty) - Modifies the duty cycle of PWM channel
// Channel = PWM Channel 0 to 3
// Note: PMW_Init must be called first
void uPSD_PWM_Channel_8bit(unsigned char PWM_channel_no, unsigned char Duty_Cyl);
void uPSD_PWM_Variable_8bit(unsigned char PWM_Period, unsigned char PWM_PulseWidth);
// uPSD_PWM_Init_8bit(Channel, Req_Freq, PWMCON) - Enables I/O for PWM channel and set Freq
// Channel = PWM channel 0 to 3
// Req_Freq = is the requested freq to run the PWM channel at (Time period)
// Note: Freq must be the same for all PWM operations (same prescaler)
// PWMCON = Controls the PWM output type and polarity (see uPSD datasheet)
void uPSD_PWM_Init_8bit(unsigned char PWM_channel_no, unsigned int Req_Freq, unsigned char PWMCON_value);

// uPSD_PWM_Disable - Global disable PWM output
void uPSD_PWM_Disable(void);


#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -