📄 timer0_pwm.h
字号:
/*
**
****************************************************************************
**
**
** Copyright (c) 2007 - Atmel Corporation
** Proprietaty Information
**
** Project : ATMEGA88 + ATA6824 High Temperature H-bridge System
** Module : Timer0_PWM.h
** Description : High temperature DC motor control
** PWM output compare OC0B pluged on ATA6824 PWM input command
**
** Version : Date: Author: Comment:
** 1.0 26.01.2007 F.G. Creation
**
** LICENSE -
**
** ATMEL - 2007
** All software programs are provided 'as is' without warranty of any kind:
** Atmel does not state the suitability of the provided materials for any
** purpose. Atmel hereby disclaim all warranties and conditions with regard
** to the provided software, including all implied warranties, fitness for
** a particular purpose, title and non-infringement.In no event will Atmel
** be liable for any indirect or consequential damages or any damages
** whatsoever resulting from the usage of the software program.
****************************************************************************
**
*/
#ifndef _TIMER0_PWM_H
#define _TIMER0_PWM_H
/*_____ I N C L U D E S ____________________________________________________*/
/*_____ M A C R O S ________________________________________________________*/
#define TIMER0_SET_OC0B_PWM(val) (OCR0B = val)
/*_____ D E F I N I T I O N S ______________________________________________*/
//! SoftTimer_t Used as a time based for general purpose non-critical use (like LED toggle)
typedef struct{
U16 count :15; //!< 15 bit counter
U16 ovf :1; //!< 1 overflow flag
}SoftTimer_t;
#define WD_TIME_TRIG 320 // 320 * 32祍 --> 10.24ms, half of the WD refresh period.
// A 51 Kohms resistor is pluged to the ATA6824 Rwd pin
// Which lead to a typical 25ms Twd (see ATA6824 datasheet
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -