2012-2-1
B9 code:
1. void APM_Task(void *unused_parameter)
1.0 what is a complete process of implementing one task? for example ipod?
1.1 APM_Get_App_Configuration(&APM_Config);?
1.2 *APM_Config where assigned value?
1.3 when array traverse?
1.4 where SBX_Radio_Apps apply?
APM_Get_App_Configuration(&APM_Config);
/**
* Configuration for app man provided by the containing process. To allow
* app man to be used in multiple processes, all of the configuration is
* done dynamically.
*/
static APM_Configuration_T const *APM_Config;
/**
* This structure defines all the applications for a process.
*/
typedef struct APM_Configuration_Tag
{
/** Number of applications (# entries in "apps") */
size_t num_apps;
/** List of application definitions (num_apps entries) */
APM_Application_Definition_T const *apps;
}
APM_Configuration_T;
/**
* This structure defines the interface to an application.
*/
typedef struct APM_Application_Definition_Tag
{
/** Name of application (for debugging) */
char const *app_name;
/** Function that activates the application (NULL is allowed) */
APM_Activation_Function_Ptr_T activate;
/** Function that terminates the application (NULL is allowed) */
APM_Termination_Function_Ptr_T terminate;
/** Minimum ready level for which this application is used. */
APM_AP_Ready_Status_T ready_level;
/** List of other applications that this one depends upon */
uint16_t dependencies[APM_NUMBER_OF_DEPENDENCIES];
}
APM_Application_Definition_T;
static APM_Application_Definition_T const SBX_Radio_Apps[] =
{
{"SBX_CORE_NO_APP", NULL, NULL, APM_AP_NOTHING_READY,\
{SBX_CORE_NO_APP, SBX_CORE_NO_APP, SBX_CORE_NO_APP, SBX_CORE_NO_APP, SBX_CORE_NO_APP}}
SBX_RADIO_APPLICATION_INFORMATION
};
2 . SAL_Create_Queue(APM_Message_Queue_Size,...
2. SAL_Run();
3. HSI