blob: 73a38dc1a4934844eefba2722d88416be2d06316 [file] [log] [blame]
/*****************************************************************************
* 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:
* ---------
* custom_ostd_utility.h
*
* Project:
* --------
* MT6885
*
* Description:
* ------------
* This file contains ostd customized configuration.
*
* Author:
* -------
* -------
*
*******************************************************************************/
#include "kal_general_types.h"
#include "ostd_public.h"
#ifdef __NVRAM_LID_CACHE__
#include "nvram_cache_interface.h"
#endif
#include "string.h"
/*
void example_callback(kal_uint32 ap_status)
{
//use ap_status to determine your code flow;
return;
}
*/
#ifdef __NVRAM_LID_CACHE__
/*****************************************************************************
* FUNCTION
* send_event_to_nvcache_callback
* DESCRIPTION
* ostd send event to NVRAM cache for update AP status
* PARAMETERS
* ap_status [IN]
* RETURNS
* void
*****************************************************************************/
void send_event_to_nvcache_callback(kal_uint32 ap_status)
{
send_event_to_nvram_cache();
}
#endif
ostd_urc_src_module_info_struct src_module_info[] =
{
/*
{"Name", "module_id expecting receive ilm"(if no need to receive, fill MOD_NIL), "callback funtion"(if no need, fill NULL), "pending data flag"(default = KAL_FALSE)}
example:
{"OSTD", MOD_NIL, example_callback, KAL_FALE}
*/
{"L4C", MOD_L4C, NULL, KAL_FALSE},
{"L4", MOD_L4BPWR, NULL, KAL_FALSE},
#ifdef __NVRAM_LID_CACHE__
{"NVRAM", MOD_NIL, send_event_to_nvcache_callback, KAL_FALSE},
#endif
};
ostd_urc_src_module_info_struct *custom_get_urc_src_mod()
{
return src_module_info;
}
kal_uint8 custom_get_num_of_urc_src_mod()
{
return sizeof(src_module_info)/sizeof(src_module_info[0]);
}
void set_pending_data_flag(char* module_name, kal_bool flag)
{
kal_uint8 i, total_mod;
total_mod = sizeof(src_module_info)/sizeof(src_module_info[0]);
for(i=0; i<total_mod; i++)
{
if(strcmp(src_module_info[i].module_name, module_name) == 0)
{
src_module_info[i].pending_urc = flag;
break;
}
}
}
kal_bool unmask_ap2md_apmcu_active_wkup_event()
{
kal_uint8 i, total_mod;
total_mod = sizeof(src_module_info)/sizeof(src_module_info[0]);
for(i=0; i<total_mod; i++)
{
if(src_module_info[i].pending_urc == KAL_TRUE)
{
return KAL_TRUE;
}
}
return KAL_FALSE;
}