日期:2014-05-20 浏览次数:21064 次
#define TIMER_START_BIT HW_BIT(23)
typedef hw_u32_t hw_timer_t;
static volatile hw_timer_t *timers = (volatile hw_timer_t *)MK_TIMER_REG_BASE;
hw_err_t hw_timer_init(hw_timerid_t timerid,
hw_timerbase_t base, hw_u16_t count, hw_bool_t cntdown,
hw_bool_t start, hw_bool_t reload, hw_bool_t irqemit)
{
#define START_OR_NOT (start ? TIMER_START_BIT : 0)
#define IRQEN_OR_NOT (irqemit ? HW_BIT(22) : 0)
#define BASE (((hw_u32_t)base & 0x3) << 16)
#define COUNT (count/* & 0xFFFF*/)
if (timerid >= HW_TIMER_N
------解决方案--------------------
base >= HW_TIMER_BASE_N)
return HW_ERR;
/* setup timer auto reload and count mode */
if (reload)
HW_BIT_CLR(MK_REG_TIMER_CTRL, HW_BIT(timerid));
else
HW_BIT_SET(MK_REG_TIMER_CTRL, HW_BIT(timerid));
if (cntdown)
HW_BIT_SET(MK_REG_TIMER_CTRL, HW_BIT(timerid + 5));
else
HW_BIT_CLR(MK_REG_TIMER_CTRL, HW_BIT(timerid + 5));
timers[timerid] = START_OR_NOT
------解决方案--------------------
IRQEN_OR_NOT
------解决方案--------------------
BASE
------解决方案--------------------
COUNT;
return HW_OK;
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using AsiaStar.Core.Text;
using System.Data;
using AsiaStar.Galaxy.CMS.Front.Entity;
namespace AsiaStar.Galaxy.CMS.Front.View.Model
{
public class LinkDropdownListInfo : IViewInfo
{
#region 链接下拉列表视图属性
/// <summary>
/// 标题
/// </summary>
private string _title;
public string Title
{
get { return _title; }
set { _title = value; }
}
/// <summary>
/// 显示字段
/// </summary>
private List<ViewField> _showField;
public List<ViewField> ShowField
{
get { return _showField; }
set { _showField = value; }