找回密码
 注册
搜索
查看: 1287|回复: 8

[资料] 以超低价格出售6226/6226B全套源代码,开发资料,文档等

[复制链接]
发表于 2007-3-28 13:42:54 | 显示全部楼层 |阅读模式
MTK手机软件,最全的源代码,6226/6226B,最新版本,所提供的最完整的源代码,
价格便宜量又足,走过路过不要错过;
邮件:37214@163.com,misoso@gmail.com
 楼主| 发表于 2007-3-30 02:39:48 | 显示全部楼层
自己顶一下! 呵呵
点评回复

使用道具 举报

 楼主| 发表于 2007-3-30 18:21:32 | 显示全部楼层
/*****************************************************************************
*  Copyright Statement:
*  --------------------
*  This software is protected by Copyright and the information contained
*  herein is confidential. The software may not be copied and the information
*  contained herein may not be used or disclosed except with the written
*  permission of MediaTek Inc. (C) 2005
*
*  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
*  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
*  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
*  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
*  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
*  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
*  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
*  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
*  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
*  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
*  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
*  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
*  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
*  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
*  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
*  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
*  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
*  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
*  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
*  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
*  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/

/*****************************************************************************
*
* Filename:
* ---------
*    adcsche.c
*
* Project:
* --------
*   Maui_Software
*
* Description:
* ------------
*   This Module defines ADC scheduler.
*
* Author:
* -------
* -------
*
*============================================================================
*             HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
#include    "drv_comm.h"
#include         "stack_common.h"  
#include         "stack_msgs.h"
#include         "app_ltlcom.h"       /* Task message communiction */
#include    "stacklib.h"         /* Basic type for dll, evshed, stacktimer */
#include    "event_shed.h"       /* Event scheduler */
#include    "stack_timer.h"     /*Timer*/
#include    "reg_base.h"
#include    "adc.h"
#include    "adcsche.h"
#include    "bmt.h"
#include    "pmic6318_sw.h"
/*TY adds it 0929*/
#if defined(MT6318)        
/*This variable is used to count # of swtich pmic measure*/
/*If pmic_mux_count==0, I will close switch*/      
kal_uint8 pmic_mux_count=0;
#endif
static kal_uint8 adc_sche_id_no;
static kal_uint32 adc_reg_status;
/*compute from adc_sche_sum and adc_sche_count*/
double ADC_RESULT[MAX_CHANNEL];
kal_int32 VOL_RESULT[MAX_CHANNEL];
kal_uint8 adc_sche_vbat_id;   /*special*/
MeasParameter adc_parameters[MAX_CHANNEL];
kal_uint32 adc_sche_sum[MAX_CHANNEL];       
kal_uint32 adc_sche_count[MAX_CHANNEL];

kal_uint32 adc_sche_rw_status;

#ifdef MT6205
   kal_bool adc_sche_start_measure;
   kal_uint8 adc_sche_channel;   /*just for debug*/
   extern kal_bool l1_adc_start_measure;  /*for L1 Measure*/
#endif   /*MT6205*/

extern void adc_pwrdown_enable(void);
extern void adc_pwrdown_disable(void);
extern void adc_sche_timer_init(void);
extern event_scheduler     *adc_sche_event_scheduler_ptr;
extern kal_int32 adc_adc2vol(kal_uint8 chann,double adcVoltage);
//extern const kal_uint16 adc_volt_factor[ADC_MAX_CHANNEL];
extern void adc_sche_stop_timer(kal_uint8 adc_sche_id);
extern void adc_sche_set_timer(kal_uint8 adc_sche_id, kal_uint32 tick, kal_timer_func_ptr call_func);
extern MeasParameter adc_parameters[MAX_CHANNEL];

/*
* FUNCTION
*           adc_sche_measure
*
* DESCRIPTION                                                           
*           This function is to measure ADC channel.
*
* CALLS  
*
* PARAMETERS
*           adc_sche_id: logical channel id
*       
* RETURNS
*           None
*
* GLOBALS AFFECTED
*     None
*/
void adc_sche_measure(void* msg_ptr)
{
   MeasParameter *adc_param = (MeasParameter *)msg_ptr;

#if ( (defined(MT6205B))||defined(MT6226M) || (defined(MT6218))|| (defined(MT6218B))|| (defined(MT6219))|| (defined(MT6217))|| (defined(MT6228))|| (defined(MT6229))|| (defined(MT6226))|| (defined(MT6227)))
   #ifdef BMT_DEBUG
   //dbg_printWithTime("mea,%d..\r\n",adc_param->adc_logic_id);
   #endif
   #if 0
/* under construction !*/
/* under construction !*/
   #endif
   adc_parameters[adc_param->adc_logic_id].adc_sche_event_id = NULL;
   
   if (adc_parameters[adc_param->adc_logic_id].conti_measure)
   {
      adc_pwrdown_disable();
      /*TY adds it 0929*/   
      #if defined(MT6318)   
      if(adc_param->adc_phy_id==custom_adc_get_channel(vbat_adc_channel))            
      {
         kal_uint8 i;
         pmic_adc_measure_sel(PMIC_ADC_VBAT);  
         for(i=0;i<100;i++){}                  
         pmic_mux_count++;
      }   
      #endif
      #if !defined(__CHARGER_WITH_IMMEDIMATE_ADC__)   
      DRV_Reg(AUXADC_SYNC) |= (1<<adc_param->adc_phy_id);
      #endif
      adc_sche_rw_status |= (1 << adc_param->adc_logic_id);
      adc_sche_set_timer(adc_param->adc_logic_id,1,adc_sche_readback);
   }
#endif      /*MT6205B,MT6218, MT6218B*/
}
/*Specific measure function for BMT*/
void bmt_adc_sche_measure(void* msg_ptr)
{
   MeasParameter *adc_param = (MeasParameter *)msg_ptr;
   static kal_uint8 bmt_measure_count=0;
   static kal_uint8 bmt_measure_channels=0;
   kal_uint8 index=0;
#if ( (defined(MT6205B))||defined(MT6226M) || (defined(MT6218))|| (defined(MT6218B))|| (defined(MT6219))|| (defined(MT6217))|| (defined(MT6228))|| (defined(MT6229))|| (defined(MT6226))|| (defined(MT6227)))

   adc_parameters[adc_param->adc_logic_id].adc_sche_event_id = NULL;
      
   if (adc_parameters[adc_param->adc_logic_id].conti_measure)
   {
      bmt_measure_count++;
      adc_sche_rw_status |= (1 << adc_param->adc_logic_id);
      bmt_measure_channels|= (1<<adc_param->adc_phy_id);
      if(bmt_measure_count>=BMT_MAX_CHANNEL)
      {
         /*TY adds it 0929*/                     
         #if defined(MT6318)  
         kal_uint8 i;
         pmic_adc_measure_sel(PMIC_ADC_VBAT);  
         pmic_mux_count++;      
         for(i=0;i<100;i++)
         {}
         #endif
         adc_pwrdown_disable();
         #if !defined(__CHARGER_WITH_IMMEDIMATE_ADC__)   
         DRV_Reg(AUXADC_SYNC) |= bmt_measure_channels;      
         #endif
         for(index=0;index<BMT_MAX_CHANNEL;index++)
              {  
                 adc_sche_set_timer(bmt_bmtid_adcscheid[index],1,bmt_adc_sche_readback);
         }
         bmt_measure_count=0;
         bmt_measure_channels=0;
      }   
   }
#endif      /*MT6205B,MT6218,MT6218B*/
}



/*
* FUNCTION
*           adc_sche_readback
*
* DESCRIPTION                                                           
*           This function is to readback the value from ADC channel.
*
* CALLS  
*
* PARAMETERS
*           adc_sche_id: logical channel id
*       
* RETURNS
*           None
*
* GLOBALS AFFECTED
*     None
*/
#if defined(__CHARGER_WITH_IMMEDIMATE_ADC__)
static kal_int32 Pre_VOL_RESULT[ADC_MAX_CHANNEL]={0};
static kal_uint16 adc_filter_count=0;
#define ADC_FILTER_RANGE 300000
#define ADC_FILTER_COUNT 10
#endif
void adc_sche_readback(void* msg_ptr)
{
   kal_uint32 savedMask;
   MeasParameter *adc_param = (MeasParameter *)msg_ptr;
   kal_uint16 data;
   #if defined(__CHARGER_WITH_IMMEDIMATE_ADC__)
   kal_int32 volt, diff;
   #endif

#if ( (defined(MT6205B))||defined(MT6226M) || (defined(MT6218))|| (defined(MT6218B))|| (defined(MT6219))|| (defined(MT6217))|| (defined(MT6228))|| (defined(MT6229))|| (defined(MT6226))|| (defined(MT6227)))

   adc_parameters[adc_param->adc_logic_id].adc_sche_event_id = NULL;
   #if defined(__CHARGER_WITH_IMMEDIMATE_ADC__)   
   adc_pwrdown_disable();
   data = ADC_GetData(adc_param->adc_phy_id);       
        volt = (kal_int32)((adc_adc2vol(adc_param->adc_phy_id, (double)data)/100)*bmt_charing_para->adc_volt_factor[adc_param->adc_phy_id]);
   
        if(Pre_VOL_RESULT[adc_param->adc_phy_id]==0)
        {
                Pre_VOL_RESULT[adc_param->adc_phy_id]=volt;
        }
        else
        {
                diff=Pre_VOL_RESULT[adc_param->adc_phy_id]-volt;
                if(diff>ADC_FILTER_RANGE||diff<-ADC_FILTER_RANGE)
                {
                        adc_filter_count++;                                               
                        kal_prompt_trace(MOD_BMT,"phy id: %d", adc_param->adc_phy_id);
                        kal_prompt_trace(MOD_BMT,"volt: %d", Pre_VOL_RESULT[adc_param->adc_phy_id]);
                        kal_prompt_trace(MOD_BMT,"curr volt: %d", volt);                       
                        if(adc_filter_count>=ADC_FILTER_COUNT)
                                Pre_VOL_RESULT[adc_param->adc_phy_id]=0;
                        adc_sche_set_timer(adc_param->adc_logic_id,1,adc_sche_readback);                               
                        return;
                }
                adc_filter_count=0;                                                               
                Pre_VOL_RESULT[adc_param->adc_phy_id]=volt;
        }               
   #else
   while(DRV_Reg(AUXADC_SYNC)&(1<<adc_param->adc_phy_id));
   data = DRV_Reg(AUXADC_DAT(adc_param->adc_phy_id));
   #endif
   /*TY adds it 0929*/   
   #if defined(MT6318)   
   if(adc_param->adc_phy_id==custom_adc_get_channel(vbat_adc_channel))            
   {      
      pmic_mux_count--;
      if(pmic_mux_count==0)
         pmic_adc_measure_sel(PMIC_ADC_OFF);  
   }
   #endif
   adc_sche_rw_status &= ~(1 << adc_param->adc_logic_id);

   savedMask = SaveAndSetIRQMask();
   if ((DRV_Reg(AUXADC_SYNC)==0) &&
       ((DRV_Reg(AUXADC_SYN) & AUXADC_SYN_BIT)==0)
      )
      adc_pwrdown_enable();
        RestoreIRQMask(savedMask);

        if (adc_parameters[adc_param->adc_logic_id].conti_measure)
        {
           adc_sche_sum[adc_param->adc_logic_id] += data;
           adc_sche_count[adc_param->adc_logic_id]++;
           adc_sche_set_timer(adc_param->adc_logic_id,adc_parameters[adc_param->adc_logic_id].period,adc_sche_measure);
        }
#endif      /*MT6205B,MT6218,MT6218B*/
   
        if (adc_sche_count[adc_param->adc_logic_id] >= adc_parameters[adc_param->adc_logic_id].evaluate_count)
        {
           ADC_RESULT[adc_param->adc_logic_id] = (double)((double)adc_sche_sum[adc_param->adc_logic_id]/(double)adc_sche_count[adc_param->adc_logic_id] );
           VOL_RESULT[adc_param->adc_logic_id] = (kal_int32)((adc_adc2vol(adc_param->adc_phy_id,ADC_RESULT[adc_param->adc_logic_id])/100)*bmt_charing_para->adc_volt_factor[adc_param->adc_phy_id]);

           adc_sche_count[adc_param->adc_logic_id] = 0;
           adc_sche_sum[adc_param->adc_logic_id] = 0;
           if ((adc_parameters[adc_param->adc_logic_id].complete != NULL) && (adc_parameters[adc_param->adc_logic_id].conti_measure == KAL_TRUE))
              adc_parameters[adc_param->adc_logic_id].complete(adc_param->adc_logic_id);
              /* VOL_RESULT[adc_sche_id],ADC_RESULT[adc_sche_id] */
        }
}
/*BMT readback function*/
void bmt_adc_sche_readback(void* msg_ptr)
{
   kal_uint32 savedMask;
   MeasParameter *adc_param = (MeasParameter *)msg_ptr;
   kal_uint16 data;
   #if defined(__CHARGER_WITH_IMMEDIMATE_ADC__)
   kal_int32 volt, diff;
   #endif

#if ( (defined(MT6205B))||defined(MT6226M) || (defined(MT6218))|| (defined(MT6218B))|| (defined(MT6219))|| (defined(MT6217))|| (defined(MT6228))|| (defined(MT6229))|| (defined(MT6226))|| (defined(MT6227)))

   adc_parameters[adc_param->adc_logic_id].adc_sche_event_id = NULL;   
   #if defined(__CHARGER_WITH_IMMEDIMATE_ADC__)   
   adc_pwrdown_disable();
   data = ADC_GetData(adc_param->adc_phy_id);       
        volt = (kal_int32)((adc_adc2vol(adc_param->adc_phy_id, (double)data)/100)*bmt_charing_para->adc_volt_factor[adc_param->adc_phy_id]);
   
        if(Pre_VOL_RESULT[adc_param->adc_phy_id]==0)
        {
                Pre_VOL_RESULT[adc_param->adc_phy_id]=volt;
        }
        else
        {
                diff=Pre_VOL_RESULT[adc_param->adc_phy_id]-volt;
                if(diff>ADC_FILTER_RANGE||diff<-ADC_FILTER_RANGE)
                {
                        adc_filter_count++;
                        if(adc_filter_count>=ADC_FILTER_COUNT)
                                Pre_VOL_RESULT[adc_param->adc_phy_id]=0;
                        kal_prompt_trace(MOD_BMT,"phy id: %d", adc_param->adc_phy_id);
                        kal_prompt_trace(MOD_BMT,"pre volt: %d", Pre_VOL_RESULT[adc_param->adc_phy_id]);
                        kal_prompt_trace(MOD_BMT,"curr volt: %d", volt);
                        adc_sche_set_timer(adc_param->adc_logic_id,1,bmt_adc_sche_readback);                               
                        return;
                }                       
                adc_filter_count=0;               
                Pre_VOL_RESULT[adc_param->adc_phy_id]=volt;
        }                                  
   #else
   while(DRV_Reg(AUXADC_SYNC)&(1<<adc_param->adc_phy_id));
      data = DRV_Reg(AUXADC_DAT(adc_param->adc_phy_id));
   #endif   
   /*TY adds it 0929*/   
   #if defined(MT6318)   
   if(adc_param->adc_phy_id==custom_adc_get_channel(vbat_adc_channel))            
   {      
      pmic_mux_count--;
      if(pmic_mux_count==0)
         pmic_adc_measure_sel(PMIC_ADC_OFF);  
   }   
   #endif
      
   adc_sche_rw_status &= ~(1 << adc_param->adc_logic_id);

   savedMask = SaveAndSetIRQMask();
   if ((DRV_Reg(AUXADC_SYNC)==0) &&
       ((DRV_Reg(AUXADC_SYN) & AUXADC_SYN_BIT)==0)
      )
      adc_pwrdown_enable();
        RestoreIRQMask(savedMask);

        if (adc_parameters[adc_param->adc_logic_id].conti_measure)
        {
           adc_sche_sum[adc_param->adc_logic_id] += data;
           adc_sche_count[adc_param->adc_logic_id]++;
           adc_sche_set_timer(adc_param->adc_logic_id,adc_parameters[adc_param->adc_logic_id].period,bmt_adc_sche_measure);
        }
#endif      /*MT6205B,MT6218,MT6218B*/
   
        if (adc_sche_count[adc_param->adc_logic_id] >= adc_parameters[adc_param->adc_logic_id].evaluate_count)
        {
           ADC_RESULT[adc_param->adc_logic_id] = (double)((double)adc_sche_sum[adc_param->adc_logic_id]/(double)adc_sche_count[adc_param->adc_logic_id] );
           VOL_RESULT[adc_param->adc_logic_id] = (kal_int32)((adc_adc2vol(adc_param->adc_phy_id,ADC_RESULT[adc_param->adc_logic_id])/100)*bmt_charing_para->adc_volt_factor[adc_param->adc_phy_id]);

           adc_sche_count[adc_param->adc_logic_id] = 0;
           adc_sche_sum[adc_param->adc_logic_id] = 0;
           if ((adc_parameters[adc_param->adc_logic_id].complete != NULL) && (adc_parameters[adc_param->adc_logic_id].conti_measure == KAL_TRUE))
              adc_parameters[adc_param->adc_logic_id].complete(adc_param->adc_logic_id);
              /* VOL_RESULT[adc_sche_id],ADC_RESULT[adc_sche_id] */
        }
}
/*
* FUNCTION
*           adc_sche_create_object
*
* DESCRIPTION                                                           
*           This function is to create a measure object and
*  return a logical channel id.
*
* CALLS  
*
* PARAMETERS
*           msgid: owner id;
*           adc_channel: ADC channel no.
*           period: The period of ADC measure.
*           evaluate_count: Evaluate Count;
*           send_primitive: Decide whether send primitive
*           (MSG_ID_BMT_ADC_MEASURE_DONE_CONF) to owner task.
*       
* RETURNS
*           logical channel id.
*
* GLOBALS AFFECTED
*     None
*/
/*return the adc_sche_id*/
kal_uint8 adc_sche_create_object(module_type ownerid, kal_uint8 adc_channel,kal_uint32 period, kal_uint8 evaluate_count, kal_bool send_primitive)
{
   kal_uint8 adc_id;
   
   
   adc_id = adc_sche_id_no++;
   
   ASSERT(adc_id < MAX_CHANNEL);
   
   if (adc_channel == ADC_VBAT)
      adc_sche_vbat_id = adc_id;
      
   adc_parameters[adc_id].adc_phy_id = adc_channel;
   adc_parameters[adc_id].adc_logic_id = adc_id;
   adc_parameters[adc_id].ownerid = ownerid;
   adc_parameters[adc_id].period = period;
   adc_parameters[adc_id].evaluate_count = evaluate_count;
   adc_parameters[adc_id].send_primitive = send_primitive;
   adc_parameters[adc_id].complete = NULL;
   adc_parameters[adc_id].adc_sche_event_id = 0;
   
   adc_sche_sum[adc_id] = 0;
   adc_sche_count[adc_id] = 0;
   return adc_id;
}

/*
* FUNCTION
*           adc_sche_modify_parameters
*
* DESCRIPTION                                                           
*           This function is to modify the parameter of the measure object.
*
* CALLS  
*
* PARAMETERS
*           adc_sche_id: logical channel id
*           period: measure period.
*           evaluate_count: Evaluate Count;
*       
* RETURNS
*           None
*
* GLOBALS AFFECTED
*     None
*/
void adc_sche_modify_parameters(kal_uint8 adc_sche_id, kal_uint32 period, kal_uint8 evaluate_count)
{
   ASSERT(adc_sche_id < adc_sche_id_no);
   adc_parameters[adc_sche_id].period = period;
   adc_parameters[adc_sche_id].evaluate_count = evaluate_count;
}

/*
* FUNCTION
*           adc_sche_add_item
*
* DESCRIPTION                                                           
*           This function is to add a measure object to adc scheduler.
*
* CALLS  
*
* PARAMETERS
*           adc_sche_id: logical channel id
*           mea_complete: callback when measure complete.
*       
* RETURNS
*           None
*
* GLOBALS AFFECTED
*     None
*/
void adc_sche_add_item(kal_uint8 adc_sche_id, void (*mea_complete)(kal_uint8 adc_sche_id), kal_timer_func_ptr mea_Callback)
{
   ASSERT(adc_sche_id < adc_sche_id_no);
      
        if (adc_reg_status & (1<<adc_sche_id))
           return;

        adc_reg_status |= (1<<adc_sche_id);
        adc_parameters[adc_sche_id].conti_measure = KAL_TRUE;
        adc_parameters[adc_sche_id].complete = mea_complete;
        adc_sche_sum[adc_sche_id] = 0;
   adc_sche_count[adc_sche_id] = 0;
   adc_sche_set_timer(adc_sche_id,1,mea_Callback);
}

/*
* FUNCTION
*           adc_sche_remove_item
*
* DESCRIPTION                                                           
*           This function is to remove a measure object from adc scheduler.
*
* CALLS  
*
* PARAMETERS
*           adc_sche_id: logical channel id
*       
* RETURNS
*           None
*
* GLOBALS AFFECTED
*     None
*/
void adc_sche_remove_item(kal_uint8 adc_sche_id)
{
   ASSERT(adc_sche_id < adc_sche_id_no);
   if (adc_reg_status & (1<<adc_sche_id))
   {
      adc_parameters[adc_sche_id].conti_measure = KAL_FALSE;
      adc_reg_status &= ~(1<<adc_sche_id);
      adc_sche_sum[adc_sche_id] = 0;
      adc_sche_count[adc_sche_id] = 0;
      adc_sche_rw_status &= ~(1 << adc_parameters[adc_sche_id].adc_logic_id);
      adc_sche_stop_timer(adc_sche_id);
        }
}

/*
* FUNCTION
*           adc_sche_init
*
* DESCRIPTION                                                           
*           This function is to initialize the adc scheduler.
*
* CALLS  
*
* PARAMETERS
*           adc_sche_id: logical channel id
*       
* RETURNS
*           None
*
* GLOBALS AFFECTED
*     None
*/
void adc_sche_init(void)
{
        kal_uint8 index;
       
        adc_sche_timer_init();
        for(index=0;index<MAX_CHANNEL;index++)
        {
           VOL_RESULT[index] = 0xffffffff;
                adc_sche_sum[index] = 0;
                adc_sche_count[index] = 0;
        }
        adc_sche_rw_status  = 0;
}


.............................
点评回复

使用道具 举报

 楼主| 发表于 2007-3-31 20:36:30 | 显示全部楼层
除MTK 622x方案之外, 还有多款商业软件低价出售, 比如 ant/enrich 的browser, radvision的 sip/h323协议栈, voip相关 软硬件资源等等, 欢迎咨询!
点评回复

使用道具 举报

 楼主| 发表于 2007-4-7 13:13:21 | 显示全部楼层
顶一下!!!
点评回复

使用道具 举报

发表于 2007-4-27 16:49:07 | 显示全部楼层
怎么卖呀,标个价阿
点评回复

使用道具 举报

发表于 2007-5-19 11:55:08 | 显示全部楼层
价格?
点评回复

使用道具 举报

发表于 2007-5-19 14:32:40 | 显示全部楼层
2w
wo jiu 卖
点评回复

使用道具 举报

发表于 2007-5-20 03:10:08 | 显示全部楼层
我公司上次买了一套才花了10K,可惜我是搞硬件的有了源代码不会用![em03]
点评回复

使用道具 举报

高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-11-20 14:16 , Processed in 0.048819 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表