?? am_timers.h
字號(hào):
/* (c) Copyright Motorola 1996-2002, All rights reserved. Motorola Confidential Proprietary Contains confidential proprietary information of Motorola, Inc. Reverse engineering is prohibited. The copyright notice does not imply publication. DESCRIPTION: This function contains the AM Application Layer main driver routines. These functions build up information for the hardware layer, and then all at once, pass it to the hardware layer. *************** REVISION HISTORY ********************************************* Date Author Reference ======== ======== ========================== 01-12-24 byr003 LIBbb15632 - LCA catchup for R1.2.1 01-04-30 brd007 CR - LIBbb09128 put neptune changes in #if (NEPTUNE == TRUE) 01-04-30 baf044 CR - CSGce94381 catchup for LCA (p2k baseline: PHX4US-G_P_3000.0E.07_IG7.11) 00-08-09 mtaraba CR - CSGce55882 Eliminate file gsm.h from audio manager 99-11-10 bchoi CR - CSGce39480 Modify Audio Manager timer functionality to use SUAPI compliant timers.******************************************************************************/#ifndef __AM_TIMER_CLASS_H#define __AM_TIMER_CLASS_H#include <SUAPI/suapi.h>#include <ENGINE_AUDIO/td_aud_tone_req_tone_type.h>#include <ENGINE_AUDIO/td_aud_tone_req_type.h>#include <ENGINE_AUDIO/audio_conditional_compile_def.h>#define MS_2_TICKS 100#if (MAKE_FIX_P2K_ERRORS == TRUE)/* P2K use another version of suapi */typedef INT64 SU_TICKS;#endif#if (AUDIO_RAINBOW == TRUE)#include <SUAPI/su_pal.h>#endif//==============================================================================// Class AM_Timer_BAse// used to manage timers for an application task. // A AM_Timer_Container manages many AM_Timer_Base objects // Since Saumil doesn't want to give us unlimited number of timers, this is // the only way to manage it. Upon each timer event at some predetermined time // interval, we will decrement the current time left(Delay) and determine if some// action is necessary. If it is we will run the Sequence designed for that object//// We have made this a double linked list for time considerations. (May not be needed but// we are an embedded system, So I have given up 2 pointers for speed. Ram for cycles)// If you don't like this then change is so we search each time we want to remove an item.////==================================================================================class AM_Timer_Base{public: inline void * operator new(size_t) { return(NULL); } inline void operator delete(void *, size_t) {} // why I have no idea...ASK DIAB#if (MAKE_FIX_P2K_ERRORS == TRUE)/* moved from protected for LCA */ AM_Timer_Base *Next; // Pointer to Next Timer in the list AM_Timer_Base *Prev; // Pointer to Previous Timer in the list#endifprotected:#if (MAKE_FIX_P2K_ERRORS == FALSE) AM_Timer_Base *Next; // Pointer to Next Timer in the list AM_Timer_Base *Prev; // Pointer to Previous Timer in the list#endif SU_TIME Delay; // Delay count down for the timer handler SU_TIME InitialDelay; // Initial Value of the Delay Countdown when a sequence starts UINT8 SeqIndex; // Current state of the Timer Sequence BOOL Active; // Is the timer Active or Not..... public: AM_Timer_Base(); // Constructor ~AM_Timer_Base(); // Destructor#if (AUDIO_RAINBOW == TRUE) void ResetTimer(SU_PAL_TICKS ticks); // Resets Delay to the InitialDelay BOOL Expired (SU_PAL_TICKS ticks); // Determines if we need to RunSequence when timer expires#else void ResetTimer(SU_TICKS ticks); // Resets Delay to the InitialDelay BOOL Expired (SU_TICKS ticks); // Determines if we need to RunSequence when timer expires#endif BOOL StartSequence(); // Initialize the timer object when we are about to Start a new Sequence virtual void RunSequence() = 0; // Runs the Sequence of this specific timer... VIRTUAL....... BOOL IsActive(); void SetActive(BOOL); void GenerateTone(UINT16 tone_type, UINT16 request); // Easy way to get to the am_event_handler.....Sorry... Encapsulation};#endif
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -