![]() |
ISF
2.1
Intelligent Sensing Framework for Kinetis with Processor Expert
|
The isf_init.h file contains the task initialization attributes required for initialization of the following ISF tasks:
.
More...
Go to the source code of this file.
Macros | |
#define | ISF_SYSTEM_READY_EVENT (1<<1) |
Definition of the system ready event. More... | |
#define | ISF_TASK_PRIORITY (9) |
Definition of the base task priority for ISF tasks. Note: Task priority of all ISF tasks must be set higher than user task priorities. Note: Lower numbers represent higher task priorities and higher numbers represent lower priorities. More... | |
#define | ISF_TASK_LOWEST_PRIORITY (20) |
Definition of the task priority used by the lowest priority ISF task. Note: User tasks must be set to a higher priority level than the task priority used by the lowest priority ISF task. Note: Lower numbers represent higher task priorities and higher numbers represent lower priorities. More... | |
#define | ISF_TASK_INDEX_START (50) |
Definition of the starting task index for ISF tasks. Note: User task indexes must have a LOWER value than the value defined here. More... | |
#define | ISF_TASK_INIT_INDEX (ISF_TASK_INDEX_START + 0) |
The following macros define the individual attributes for ISF Initialization Task startup. Note: These macro definitions must not be changed by the user. More... | |
#define | ISF_TASK_INIT_STACK_SIZE (384) |
#define | ISF_TASK_INIT_PRIORITY (ISF_TASK_PRIORITY-1) |
#define | ISF_TASK_INIT_NAME ("ii") |
#define | ISF_TASK_INIT_PARAM (0) |
#define | ISF_TASK_INIT_TIMESLICE (0) |
#define | ISF_TASK_ATTRIBUTE_INIT |
Definition of the task-startup attributes macro for the ISF Initialization Task. This task initialization macro is used to initialize and launch the ISF initialization task. More... | |
#define | ISF_TASK_ATTRIBUTE_SM |
#define | ISF_APP_CALLBACK_DEV_INFO (isf_app_callback_dev_info) |
#define | ISF_APP_CALLBACK_MBOX (isf_app_callback_mbox), |
#define | ISF_TASK_CI_INDEX (ISF_TASK_INDEX_START + 2) |
The following macros define the individual attributes for ISF Command Interpreter task task-startup. Note: These macro definitions must not be changed by the user. More... | |
#define | ISF_TASK_CI_STACK_SIZE (1024) |
#define | ISF_TASK_CI_PRIORITY (ISF_TASK_PRIORITY + 2) |
#define | ISF_TASK_CI_NAME ("ci") |
#define | ISF_TASK_CI_PARAM (0) |
#define | ISF_TASK_CI_TIMESLICE (0) |
#define | ISF_TASK_ATTRIBUTE_CI |
Definition of the ISF Command Interpreter task task-startup attributes macro. This task initialization macro is used to initialize and launch the Command Interpreter task. More... | |
#define | ISF_TASK_BM_INDEX (ISF_TASK_INDEX_START + 3) |
The following macros define the individual attributes for the ISF Bus Manager task task-startup. Note: These macro definitions must not be changed by the user. More... | |
#define | ISF_TASK_BM_STACK_SIZE (512) |
#define | ISF_TASK_BM_PRIORITY (ISF_TASK_PRIORITY + 1) |
#define | ISF_TASK_BM_NAME ("bm") |
#define | ISF_TASK_BM_PARAM (0) |
#define | ISF_TASK_BM_TIMESLICE (0) |
#define | ISF_TASK_ATTRIBUTE_BM |
Definition of the ISF Bus Manager task task-startup attributes macro. This task initialization macro is used during the initial task-startup process to initialize and launch the Bus Manager task. More... | |
#define | ISF_TASK_PM_INDEX (ISF_TASK_INDEX_START + 4) |
Power Manager component task and attributes. Care should be taken in changing these attributes. More... | |
#define | ISF_TASK_PM_STACK_SIZE (128) |
#define | ISF_TASK_PM_PRIORITY (ISF_TASK_LOWEST_PRIORITY) |
#define | ISF_TASK_PM_NAME ("pm") |
#define | ISF_TASK_PM_PARAM (0) |
#define | ISF_TASK_PM_TIMESLICE (0) |
#define | ISF_TASK_ATTRIBUTE_PM |
#define | ISF_TASKS_ATTRIBUTES |
ISF tasks attributes. The user puts these tasks in the MQX_template_list[] array. More... | |
#define | ISF_APP_CALLBACKS |
This macro defines the ISF application Command Interpreter callback(s). Note: The user must put these callbacks at the beginning of the ci_callback[] array. More... | |
Functions | |
isf_status_t | isf_lib_init (void *pOptions) |
This function initializes the ISF library. More... | |
void | isf_init_task (uint32 initial_data) |
This function initializes the ISF components for operation. More... | |
void | isf_system_sync (void) |
This function synchronizes the user tasks and the system initialization. More... | |
void | task_ci (uint32) |
Command Interpreter Task - main task to handle communication via mailboxes with the host. More... | |
isf_status_t | ci_init (void) |
This API initializes the Command Interpreter. More... | |
void | task_bm (uint32) |
Bus Manager Task - main task to handle communication via mailboxes with the host. More... | |
isf_status_t | bm_init (void) |
Bus management initialization . More... | |
void | task_idle (uint32 initial_data) |
isf_status_t | pm_init (void) |
Variables | |
LWEVENT_STRUCT | isfSysEventHandler |
Definition of the event handle to the system ready event. More... | |
The isf_init.h file contains the task initialization attributes required for initialization of the following ISF tasks:
.
Definition in file isf_init.h.
#define ISF_APP_CALLBACK_DEV_INFO (isf_app_callback_dev_info) |
Definition at line 211 of file isf_init.h.
#define ISF_APP_CALLBACK_MBOX (isf_app_callback_mbox), |
Definition at line 212 of file isf_init.h.
#define ISF_APP_CALLBACKS |
This macro defines the ISF application Command Interpreter callback(s).
Note: The user must put these callbacks at the beginning of the ci_callback[] array.
Definition at line 343 of file isf_init.h.
#define ISF_SYSTEM_READY_EVENT (1<<1) |
Definition of the system ready event.
Definition at line 24 of file isf_init.h.
Referenced by isf_lib_init(), and isf_system_sync().
#define ISF_TASK_ATTRIBUTE_BM |
Definition of the ISF Bus Manager task task-startup attributes macro. This task initialization macro is used during the initial task-startup process to initialize and launch the Bus Manager task.
Definition at line 274 of file isf_init.h.
#define ISF_TASK_ATTRIBUTE_CI |
Definition of the ISF Command Interpreter task task-startup attributes macro. This task initialization macro is used to initialize and launch the Command Interpreter task.
Definition at line 230 of file isf_init.h.
#define ISF_TASK_ATTRIBUTE_INIT |
Definition of the task-startup attributes macro for the ISF Initialization Task. This task initialization macro is used to initialize and launch the ISF initialization task.
Definition at line 139 of file isf_init.h.
#define ISF_TASK_ATTRIBUTE_PM |
Definition at line 311 of file isf_init.h.
#define ISF_TASK_ATTRIBUTE_SM |
Definition at line 196 of file isf_init.h.
#define ISF_TASK_BM_INDEX (ISF_TASK_INDEX_START + 3) |
The following macros define the individual attributes for the ISF Bus Manager task task-startup.
Note: These macro definitions must not be changed by the user.
Definition at line 262 of file isf_init.h.
#define ISF_TASK_BM_NAME ("bm") |
Definition at line 265 of file isf_init.h.
#define ISF_TASK_BM_PARAM (0) |
Definition at line 266 of file isf_init.h.
#define ISF_TASK_BM_PRIORITY (ISF_TASK_PRIORITY + 1) |
Definition at line 264 of file isf_init.h.
#define ISF_TASK_BM_STACK_SIZE (512) |
Definition at line 263 of file isf_init.h.
#define ISF_TASK_BM_TIMESLICE (0) |
Definition at line 267 of file isf_init.h.
#define ISF_TASK_CI_INDEX (ISF_TASK_INDEX_START + 2) |
The following macros define the individual attributes for ISF Command Interpreter task task-startup.
Note: These macro definitions must not be changed by the user.
Definition at line 219 of file isf_init.h.
#define ISF_TASK_CI_NAME ("ci") |
Definition at line 222 of file isf_init.h.
#define ISF_TASK_CI_PARAM (0) |
Definition at line 223 of file isf_init.h.
#define ISF_TASK_CI_PRIORITY (ISF_TASK_PRIORITY + 2) |
Definition at line 221 of file isf_init.h.
#define ISF_TASK_CI_STACK_SIZE (1024) |
Definition at line 220 of file isf_init.h.
#define ISF_TASK_CI_TIMESLICE (0) |
Definition at line 224 of file isf_init.h.
#define ISF_TASK_INDEX_START (50) |
Definition of the starting task index for ISF tasks.
Note: User task indexes must have a LOWER value than the value defined here.
Definition at line 52 of file isf_init.h.
#define ISF_TASK_INIT_INDEX (ISF_TASK_INDEX_START + 0) |
The following macros define the individual attributes for ISF Initialization Task startup.
Note: These macro definitions must not be changed by the user.
Definition at line 128 of file isf_init.h.
#define ISF_TASK_INIT_NAME ("ii") |
Definition at line 131 of file isf_init.h.
#define ISF_TASK_INIT_PARAM (0) |
Definition at line 132 of file isf_init.h.
#define ISF_TASK_INIT_PRIORITY (ISF_TASK_PRIORITY-1) |
Definition at line 130 of file isf_init.h.
#define ISF_TASK_INIT_STACK_SIZE (384) |
Definition at line 129 of file isf_init.h.
#define ISF_TASK_INIT_TIMESLICE (0) |
Definition at line 133 of file isf_init.h.
#define ISF_TASK_LOWEST_PRIORITY (20) |
Definition of the task priority used by the lowest priority ISF task.
Note: User tasks must be set to a higher priority level than the task priority used by the lowest priority ISF task.
Note: Lower numbers represent higher task priorities and higher numbers represent lower priorities.
Definition at line 46 of file isf_init.h.
#define ISF_TASK_PM_INDEX (ISF_TASK_INDEX_START + 4) |
Power Manager component task and attributes.
Care should be taken in changing these attributes.
Definition at line 304 of file isf_init.h.
#define ISF_TASK_PM_NAME ("pm") |
Definition at line 307 of file isf_init.h.
#define ISF_TASK_PM_PARAM (0) |
Definition at line 308 of file isf_init.h.
#define ISF_TASK_PM_PRIORITY (ISF_TASK_LOWEST_PRIORITY) |
Definition at line 306 of file isf_init.h.
#define ISF_TASK_PM_STACK_SIZE (128) |
Definition at line 305 of file isf_init.h.
#define ISF_TASK_PM_TIMESLICE (0) |
Definition at line 309 of file isf_init.h.
#define ISF_TASK_PRIORITY (9) |
Definition of the base task priority for ISF tasks.
Note: Task priority of all ISF tasks must be set higher than user task priorities.
Note: Lower numbers represent higher task priorities and higher numbers represent lower priorities.
Definition at line 36 of file isf_init.h.
#define ISF_TASKS_ATTRIBUTES |
ISF tasks attributes. The user puts these tasks
in the MQX_template_list[] array.
Definition at line 332 of file isf_init.h.
isf_status_t bm_init | ( | void | ) |
Bus management initialization
.
This API initializes the Bus Manager.
Definition at line 409 of file bus_management.c.
References BM_PIPELINE_STAGES, bm_timer_init(), bm_t::cb_events, bm_t::cb_list_cur_cnt, bm_t::cb_token_active_mask, bm_t::cb_token_registered_mask, event_bm_callback, FALSE, gpBm_cb_list, ISF_SUCCESS, bm_t::pipeline_index, sema_bm_access, and TIMER_TPM_INIT.
Referenced by isf_lib_init().
isf_status_t ci_init | ( | void | ) |
This API initializes the Command Interpreter.
The Command Interpreter requires a one time initialization at system startup performed by this API call. It creates and initializes internal variables. In addition, it installs an interrupt service routine for the slave-port interrupt.
ISF_SUCCESS | The initialization completed successfully. |
ISF_ERR_LIB_INIT | The interrupt service routine for the uart channel used by the Command Interpereter could not installed. |
Definition at line 584 of file task_ci.c.
References CI_ALLOC_MEM_ZERO, CI_MAX_PROTOCOL, ci_protocol_initptr_table, COMM_STATE_OK, dm_channel_desc, dm_channel_get_state(), dm_channel_init(), dm_channel_start(), dm_device_open(), get_ci_comm(), isf_ci_get_recv_size(), ISF_ERR_LIB_INIT, ISF_SUCCESS, ci_protocol_t::protcolID, and ci_rx_packet_t::pRxbuf.
Referenced by isf_lib_init().
void isf_init_task | ( | uint32 | initial_data | ) |
This function initializes the ISF components for operation.
[in] | initial_data | This is required by MQX and any UINT32 value can be used. |
isf_status_t isf_lib_init | ( | void * | pOptions | ) |
This function initializes the ISF library.
[in] | pOptions | This must be a NULL pointer. |
ISF_SUCCESS | is returned when the library initializes successfully. |
ISF_ERR_LIB_INIT | is returned when the library does not initialize successfully. |
This function initializes the ISF library.
API ISF library get information.
Definition at line 18 of file isf_init.c.
References bm_init(), ci_init(), ISF_ERR_LIB_INIT, ISF_SUCCESS, ISF_SYSTEM_READY_EVENT, isfSysEventHandler, and pm_init().
void isf_system_sync | ( | void | ) |
This function synchronizes the user tasks and the system initialization.
Definition at line 50 of file isf_init.c.
References FALSE, ISF_SYSTEM_READY_EVENT, isfSysEventHandler, and synchCreate.
Referenced by CI_task(), PM_task(), TaskApp1_task(), TaskBusManager_task(), and TaskRLI1_task().
isf_status_t pm_init | ( | void | ) |
Definition at line 44 of file pm.c.
Referenced by isf_lib_init().
void task_bm | ( | uint32 | initial_data | ) |
Bus Manager Task - main task to handle communication
via mailboxes with the host.
initial_data | - value passed in when task is created, not used. |
Definition at line 643 of file bus_management.c.
References bm_t::cb_token_active_mask, event_bm_callback, FALSE, gpBm_cb_list, bm_cb_config_t::pCallback, and TIMER_TPM_GET_CNT.
Referenced by TaskBusManager_task().
void task_ci | ( | uint32 | initial_data | ) |
Command Interpreter Task - main task to handle communication
via mailboxes with the host.
initial_data | - value passed in when task is created, not used. |
Definition at line 499 of file task_ci.c.
References ci_get_protocol_id, CI_PACKET_RECV_STATUS_YES, CI_PROTOCOL_DATA_OFFSET, CI_PROTOCOL_ID_MAX, CI_PROTOCOL_ID_NULL, CI_PROTOCOL_ID_SIZE, dm_device_read(), ISF_CI_FAILURE, ISF_SUCCESS, ci_rx_packet_t::mbIndex, process_recv_byte(), and ci_rx_packet_t::pRxbuf.
void task_idle | ( | uint32 | initial_data | ) |
Definition at line 156 of file pm.c.
References ISF_POWER_LOW, ISF_POWER_NORMAL, and ISF_POWER_SLEEP.
Referenced by PM_task().
LWEVENT_STRUCT isfSysEventHandler |
Definition of the event handle to the system ready event.
Definition at line 15 of file isf_init.c.
Referenced by isf_lib_init(), and isf_system_sync().