4.27
来源:互联网 发布:网络中继 编辑:程序博客网 时间:2024/06/05 02:11
#include "S3C2451_Timer.h"
#include "S3C2451_vector.h"
//#include "SAMSUNG2440_it.h"
#include "S3C2451_irq.h"
TIM_MemMapPtr const TIMER_BASE_PTR = TIM_BASE_PTR;
void TIM_TimeBaseInit(TIM_TypeDef timx ,TIM_TimeBaseInitTypeDef tim_timbaseinit_structure)
{
if(timx == Timer_Ch0)
{
TIMER_BASE_PTR->TCFG0 &= ~(0xff);
TIMER_BASE_PTR->TCFG0 |= tim_timbaseinit_structure.TIM_Prescale;
TIMER_BASE_PTR->TCFG1 &= ~(0xf);
TIMER_BASE_PTR->TCFG1 |= tim_timbaseinit_structure.TIM_Scale;
TIMER_BASE_PTR->TCNTB0 = tim_timbaseinit_structure.TIM_CountVal;
TIMER_BASE_PTR->TCMPB0 = tim_timbaseinit_structure.TIM_CompareVal;
TIMER_BASE_PTR->TCON |= (1<<1);
TIMER_BASE_PTR->TCON = 0x09;
}
}
void TIM_Interrupt_IRQInit(TIM_TypeDef timx,U32 addr)
{
if(timx == Timer_Ch0)
{
pISR_TIMER0 = addr ;
}
}
#include "S3C2451_vector.h"
//#include "SAMSUNG2440_it.h"
#include "S3C2451_irq.h"
TIM_MemMapPtr const TIMER_BASE_PTR = TIM_BASE_PTR;
void TIM_TimeBaseInit(TIM_TypeDef timx ,TIM_TimeBaseInitTypeDef tim_timbaseinit_structure)
{
if(timx == Timer_Ch0)
{
TIMER_BASE_PTR->TCFG0 &= ~(0xff);
TIMER_BASE_PTR->TCFG0 |= tim_timbaseinit_structure.TIM_Prescale;
TIMER_BASE_PTR->TCFG1 &= ~(0xf);
TIMER_BASE_PTR->TCFG1 |= tim_timbaseinit_structure.TIM_Scale;
TIMER_BASE_PTR->TCNTB0 = tim_timbaseinit_structure.TIM_CountVal;
TIMER_BASE_PTR->TCMPB0 = tim_timbaseinit_structure.TIM_CompareVal;
TIMER_BASE_PTR->TCON |= (1<<1);
TIMER_BASE_PTR->TCON = 0x09;
}
}
void TIM_Interrupt_IRQInit(TIM_TypeDef timx,U32 addr)
{
if(timx == Timer_Ch0)
{
pISR_TIMER0 = addr ;
}
}
0 0
- 4.27
- 4.27
- 4.27
- 4.27
- 4.27笔记
- 2011/4.27
- 4.27C#学习
- 4.27c#学习总结
- 传智播客学习笔记4.27
- 4.27最近的总结
- JQuery日记 2014-4.27
- 4.27日清华培训
- day47(4.27)面向对象
- 工作日志 4.27
- 4.27NDK相关
- 微软MVP2006.4.27北京聚会
- 微软MVP2006.4.27北京聚会
- 微软MVP2006.4.27北京聚会
- 剑指offer(java代码)——青蛙跳台阶
- 系统拦截器
- 山东省第二届ACM省赛 Binomial Coeffcients(组合数学)
- 自增算法
- 在一个有序数组中插入一个元素
- 4.27
- log4j
- 170427 汇编-内中断的指令和设置
- 树状数组
- LeedCode 之 Remove Duplicates from Sorted Array
- ES6中的继承
- Dagger2使用详解
- 简单实现 Android listview 滑动过程中不加载图片,停止时加载图片
- Gym