| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2004-2009, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: bastmlib_presentation_task.h $ |
|---|
| 11 | * $brcm_Revision: Hydra_Software_Devel/1 $ |
|---|
| 12 | * $brcm_Date: 7/17/09 6:56p $ |
|---|
| 13 | * |
|---|
| 14 | * Revision History: |
|---|
| 15 | * |
|---|
| 16 | * $brcm_Log: /magnum/syslib/astmlib/noarch/bastmlib_presentation_task.h $ |
|---|
| 17 | * |
|---|
| 18 | * Hydra_Software_Devel/1 7/17/09 6:56p bandrews |
|---|
| 19 | * PR49215: playback support |
|---|
| 20 | ***************************************************************************/ |
|---|
| 21 | |
|---|
| 22 | #include "bstd.h" |
|---|
| 23 | #include "bastmlib.h" |
|---|
| 24 | #include "bsyslib.h" |
|---|
| 25 | #include "bsyslib_list.h" |
|---|
| 26 | |
|---|
| 27 | #ifndef BASTMLIB_PRESENTATION_TASK_H__ |
|---|
| 28 | #define BASTMLIB_PRESENTATION_TASK_H__ |
|---|
| 29 | |
|---|
| 30 | #define BASTMLIB_PRESENTATION_DEFAULT_INITIAL_ACQUISITION_TIME 1000 |
|---|
| 31 | #define BASTMLIB_PRESENTATION_DEFAULT_PROCESSING_FREQUENCY 5000 |
|---|
| 32 | #define BASTMLIB_PRESENTATION_DEFAULT_SETTLING_TIME 3000 |
|---|
| 33 | #define BASTMLIB_PRESENTATION_DEFAULT_TSM_DISABLED_WATCHDOG_TIMEOUT 120000 |
|---|
| 34 | |
|---|
| 35 | typedef enum |
|---|
| 36 | { |
|---|
| 37 | BASTMlib_Presentation_StateMachineSignal_eReset, |
|---|
| 38 | BASTMlib_Presentation_StateMachineSignal_ePresenterPass, |
|---|
| 39 | BASTMlib_Presentation_StateMachineSignal_ePresenterFailure, |
|---|
| 40 | BASTMlib_Presentation_StateMachineSignal_eClockReferencePass, |
|---|
| 41 | BASTMlib_Presentation_StateMachineSignal_eClockReferenceFailure, |
|---|
| 42 | BASTMlib_Presentation_StateMachineSignal_eMax |
|---|
| 43 | } BASTMlib_Presentation_StateMachineSignal; |
|---|
| 44 | |
|---|
| 45 | typedef struct |
|---|
| 46 | { |
|---|
| 47 | bool bAcquire; |
|---|
| 48 | BSYSlib_Timer_Handle hTimer; |
|---|
| 49 | BSYSlib_Timer_Handle hWatchdogTimer; |
|---|
| 50 | uint32_t uiPresenterCount; |
|---|
| 51 | BSYSlib_List_Handle hPresenters; |
|---|
| 52 | } BASTMlib_PresentationTaskState; |
|---|
| 53 | |
|---|
| 54 | void BASTMlib_P_Presentation_GetDefaultConfig( |
|---|
| 55 | BASTMlib_Config * psConfig |
|---|
| 56 | ); |
|---|
| 57 | |
|---|
| 58 | BERR_Code BASTMlib_P_Presentation_TimerExpired( |
|---|
| 59 | void * pvParm1, /* first user context parameter [in] */ |
|---|
| 60 | int iParm2, /* second user context parameter [in] */ |
|---|
| 61 | BSYSlib_Timer_Handle hTimer /* the handle of the timer that expired [in] */ |
|---|
| 62 | ); |
|---|
| 63 | |
|---|
| 64 | BERR_Code BASTMlib_P_Presentation_Process( |
|---|
| 65 | BASTMlib_Handle hAstm |
|---|
| 66 | ); |
|---|
| 67 | |
|---|
| 68 | void BASTMlib_P_Presentation_RateControlStateMachine_SendSignal( |
|---|
| 69 | BASTMlib_Handle hAstm, |
|---|
| 70 | BASTMlib_Presentation_StateMachineSignal eSignal |
|---|
| 71 | ); |
|---|
| 72 | |
|---|
| 73 | void BASTMlib_P_Presentation_StcSourceStateMachine_SendSignal( |
|---|
| 74 | BASTMlib_Handle hAstm, |
|---|
| 75 | BASTMlib_Presentation_StateMachineSignal eSignal |
|---|
| 76 | ); |
|---|
| 77 | |
|---|
| 78 | BERR_Code BASTMlib_P_Presentation_StateChangeHandler( |
|---|
| 79 | BASTMlib_Handle hAstm, |
|---|
| 80 | bool bRateControlChanged |
|---|
| 81 | ); |
|---|
| 82 | |
|---|
| 83 | void BASTMlib_P_Presentation_GetMaxAcquisitionTime( |
|---|
| 84 | BASTMlib_Handle hAstm, |
|---|
| 85 | unsigned int * puiMaxAcquisitionTime |
|---|
| 86 | ); |
|---|
| 87 | |
|---|
| 88 | #endif /* BASTMLIB_PRESENTATION_TASK_H__ */ |
|---|
| 89 | |
|---|