找回密码
 注册
搜索
查看: 810|回复: 0

[综合资料] [free]Nucleus PLUS Internals

[复制链接]
发表于 2006-9-2 12:56:00 | 显示全部楼层 |阅读模式
Chapter 1 - Introduction..................................................................................1
Purpose of Manual..............................................................................................................2
About Nucleus PLUS .........................................................................................................2
Nucleus PLUS Construction...............................................................................................2
Chapter 2 ? Implementation Conventions ......................................................3
Components.......................................................................................................................4
Component Composition....................................................................................................4
Format ............................................................................................................................5
Prologue.........................................................................................................................5
After the Prologue ..........................................................................................................6
Remainder of File ...........................................................................................................6
Naming Conventions ..........................................................................................................7
Component Names .........................................................................................................7
#define Names ................................................................................................................7
Structure Names .............................................................................................................7
Typedef Names...............................................................................................................8
Structure Member Names...............................................................................................8
Global Variable Names ..................................................................................................8
Local Variable Names ....................................................................................................9
Function Names..............................................................................................................9
Indentation.........................................................................................................................9
Comments........................................................................................................................10
Chapter 3 ? Software Overview ..................................................................11
Basic Usage ......................................................................................................................12
Operation Mode............................................................................................................12
Application Initialization..............................................................................................12
Include File...................................................................................................................12
Data Types........................................................................................................................12
Service Call Mapping .......................................................................................................13
Error Checking .............................................................................................................13
No Error Checking .......................................................................................................17
Conditional Compilation ..............................................................................................19
Library Conditional Flags.............................................................................................
Environment Dependencies ..............................................................................................22
Initialization.................................................................................................................22
Thread Control..............................................................................................................22
Timer Management.......................................................................................................22
Nucleus PLUS Include File ..........................................................................................22
Version Control ................................................................................................................23
Chapter 4 ? Component Descriptions ...........................................................26
Common Services Component (CS).................................................................................26
Common Services Files ................................................................................................26
Common Services Control Block .................................................................................26
Common Services Functions ........................................................................................27
CSC_Place_On_List .................................................................................................27
CSC_Priority_Place_On_List...................................................................................27
CSC_Remove_From_List.........................................................................................28
Initialization Component (IN) ..........................................................................................28
Initialization Files .........................................................................................................28
Initialization Functions .................................................................................................28
INC_Initialize ...........................................................................................................29
INT_Initialize ...........................................................................................................29
INT_Vectors_Loaded ...............................................................................................30
INT_Setup_Vector....................................................................................................30
Thread Control Component (TC) .....................................................................................30
Thread Control Files.....................................................................................................31
Thread Control Data Structures ....................................................................................31
Thread Control Functions .............................................................................................44
TCC_Create_Task ....................................................................................................44
TCC_Delete_Task ....................................................................................................45
TCC_Create_HISR...................................................................................................45
TCC_Delete_HISR...................................................................................................46
TCC_Reset_Task......................................................................................................46
TCC_Terminate_Task ..............................................................................................47
TCC_Resume_Task..................................................................................................47
TCC_Resume_Service..............................................................................................48
TCC_Suspend_Task .................................................................................................48
TCC_Suspend_Service .............................................................................................49
TCC_Task_Timeout .................................................................................................49
TCC_Task_Sleep......................................................................................................50
TCC_Relinquish .......................................................................................................50
TCC_Time_Slice ......................................................................................................51
TCC_Current_Task_Pointer .....................................................................................51
TCC_Current_HISR_Pointer....................................................................................52
TCC_Task_Shell ......................................................................................................52
TCC_Signal_Shell ....................................................................................................53
TCC_Dispatch_LISR................................................................................................53
TCC_Register_LISR.................................................................................................54
TCCE_Delete_HISR ..................................................................................................55
TCCE_Delete_Task....................................................................................................56
TCCE_Reset_Task .....................................................................................................56
TCCE_Terminate_Task..............................................................................................56
TCCE_Resume_Service .............................................................................................57
TCCE_Suspend_Service ............................................................................................57
TCCE_Relinquish.......................................................................................................57
TCCE_Task_Sleep .....................................................................................................58
TCCE_Suspend_Error ................................................................................................58
TCCE_Activate_HISR ...............................................................................................58
TCCE_Validate_Resume............................................................................................59
TCF_Established_Tasks .............................................................................................59
TCF_Established_HISRs............................................................................................59
TCF_Task_Pointers....................................................................................................60
TCF_HISR_Pointers...................................................................................................60
TCF_Task_Information ..............................................................................................61
TCF_HISR_Information.............................................................................................61
TCI_Initialize .............................................................................................................62
TCS_Change_Priority ................................................................................................62
TCS_Change_Preemption ..........................................................................................63
TCS_Change_Time_Slice ..........................................................................................63
TCS_Control_Signals.................................................................................................64
TCS_Receive_Signals ................................................................................................64
TCS_Register_Signal_Handler...................................................................................65
TCS_Send_Signals .....................................................................................................65
TCSE_Change_Priority ..............................................................................................66
TCSE_Change_Preemption........................................................................................66
TCSE_Change_Time_Slice........................................................................................66
TCSE_Control_Signals ..............................................................................................67
TCSE_Receive_Signals..............................................................................................67
TCSE_Register_Signal_Handler ................................................................................67
TCSE_Send_Signals...................................................................................................68
TCT_Control_Interrupts.............................................................................................68
TCT_Local_Control_Interrupts..................................................................................68
TCT_Restore_Interrupts.............................................................................................69
TCT_Build_Task_Stack .............................................................................................69
TCT_Build_HISR_Stack............................................................................................69
TCT_Build_Signal_Frame .........................................................................................70
TCT_Check_Stack .....................................................................................................70
TCT_Schedule............................................................................................................70
TCT_Control_To_Thread...........................................................................................71
TCT_Control_To_System..........................................................................................71
TCT_Signal_Exit........................................................................................................72
TCT_Current_Thread .................................................................................................72
TCT_Set_Execute_Task.............................................................................................72
TCT_Protect ...............................................................................................................73
TCT_Unprotect...........................................................................................................73
TCT_Unprotect_Specific............................................................................................
TCT_Protect_Switch ................................................................................................74
TCT_Schedule_Protected .........................................................................................75
TCT_Interrupt_Context_Save ..................................................................................75
TCT_Interrupt_Context_Restore ..............................................................................75
TCT_Activate_HISR................................................................................................76
TCT_HISR_Shell .....................................................................................................76
TCT_Check_For_Preemption...................................................................................76
Timer Component (TM) ...................................................................................................77
Timer Files....................................................................................................................77
Timer Data Structures...................................................................................................78
Active Timers List ............................................................................................................79
Timer Functions............................................................................................................83
TMC_Init_Task_Timer.............................................................................................83
TMC_Start_Task_Timer...........................................................................................83
TMC_Stop_Task_Timer...........................................................................................84
TMC_Start_Timer ....................................................................................................84
TMC_Stop_Timer.....................................................................................................85
TMC_Timer_HISR...................................................................................................85
TMC_Timer_Expiration ...........................................................................................86
TMF_Established_Timers ........................................................................................86
TMF_Get_Remaining_Time ....................................................................................86
TMF_Timer_Pointers ...............................................................................................87
TMF_Timer_Information .........................................................................................87
TMI_Initialize...........................................................................................................88
TMS_Create_Timer..................................................................................................88
TMS_Delete_Timer..................................................................................................89
TMS_Reset_Timer ...................................................................................................89
TMS_Control_Timer ................................................................................................90
TMSE_Create_Timer ...............................................................................................90
TMSE_Delete_Timer ...............................................................................................91
TMSE_Reset_Timer .................................................................................................91
TMSE_Control_Timer..............................................................................................91
TMT_Set_Clock .......................................................................................................92
TMT_Retrieve_Clock...............................................................................................92
TMT_Read_Timer....................................................................................................93
TMT_Enable_Timer .................................................................................................93
TMT_Adjust_Timer .................................................................................................93
TMT_Disable_Timer................................................................................................94
TMT_Retrieve_TS_Task..........................................................................................94
TMT_Timer_Interrupt ..............................................................................................94
Mailbox Component (MB) ...............................................................................................95
Mailbox Files................................................................................................................95
Mailbox Data Structures ...............................................................................................96
Mailbox Functions........................................................................................................99
MBC_Create_Mailbox .............................................................................................99
MBC_Delete_Mailbox .............................................................................................99
MBC_Send_To_Mailbox .......................................................................................100
MBC_Receive_From_Mailbox ..............................................................................
MBC_Cleanup........................................................................................................101
MBCE_Create_Mailbox.........................................................................................101
MBCE_Delete_Mailbox.........................................................................................101
MBCE_Send_To_Mailbox.....................................................................................102
MBCE_Receive_From_Mailbox............................................................................102
MBF_Established_Mailboxes.................................................................................103
MBF_Mailbox_Pointers .........................................................................................103
MBF_Mailbox_Information ...................................................................................104
MBI_Initialize ........................................................................................................104
MBS_Reset_Mailbox .............................................................................................105
MBS_Broadcast_To_Mailbox................................................................................105
MBSE_Reset_Mailbox...........................................................................................106
MBSE_Broadcast_To_ Mailbox ............................................................................106
Queue Component (QU).................................................................................................106
Queue Files.................................................................................................................107
Queue Data Structures ................................................................................................107
Queue Control Block......................................................................................................108
Queue Suspension Structure...........................................................................................110
Queue Functions.........................................................................................................111
QUC_Create_Queue...............................................................................................111
QUC_Delete_Queue...............................................................................................111
QUC_Send_To_Queue...........................................................................................112
QUC_Receive_From_Queue..................................................................................112
QUC_Cleanup ........................................................................................................113
QUCE_Create_Queue ............................................................................................113
QUCE_Delete_Queue ............................................................................................113
QUCE_Send_To_Queue ........................................................................................114
QUCE_Receive_From_Queue ...............................................................................114
QUF_Established_Queues......................................................................................114
QUF_Queue_Information.......................................................................................115
QUF_Queue_Pointers.............................................................................................115
QUI_Initialize.........................................................................................................116
QUS_Reset_Queue.................................................................................................116
QUS_Send_To_Front_Of_Queue...........................................................................117
QUS_Broadcast_To_Queue ...................................................................................117
QUSE_Reset_Queue ..............................................................................................117
QUSE_Send_To_Front_Of_Queue ........................................................................118
QUSE_Broadcast_To_Queue .................................................................................118
Pipe Component (PI) ......................................................................................................119
Pipe Files ....................................................................................................................119
Pipe Data Structures ...................................................................................................120
Pipe Functions ............................................................................................................123
PIC_Create_Pipe ....................................................................................................124
PIC_Delete_Pipe ....................................................................................................124
PIC_Send_To_Pipe ................................................................................................125
PIC_Receive_From_Pipe .......................................................................................125
PIC_Cleanup...........................................................................................................126
PICE_Create_Pipe..................................................................................................126
PICE_Delete_Pipe..................................................................................................
PICE_Receive_From_Pipe .....................................................................................128
PIF_Established_Pipes ...........................................................................................128
PIF_Pipe_Information ............................................................................................129
PIF_Pipe_Pointers ..................................................................................................129
PII_Initialize ...........................................................................................................130
PIS_Reset_Pipe ......................................................................................................130
PIS_Send_To_Front_Of_Pipe ................................................................................131
PIS_Broadcast_To_Pipe .........................................................................................131
PISE_Reset_Pipe ....................................................................................................132
PISE_Send_To_Front_Of_Pipe..............................................................................132
PISE_Broadcast_To_Pipe.......................................................................................132
Semaphore Component (SM) .........................................................................................133
Semaphore Files .........................................................................................................133
Semaphore Data Structures.........................................................................................134
Semaphore Functions .................................................................................................137
SMC_Create_Semaphore .......................................................................................137
SMC_Delete_Semaphore .......................................................................................137
SMC_Obtain_Semaphore .......................................................................................138
SMC_Release_Semaphore......................................................................................138
SMC_Cleanup ........................................................................................................139
SMCE_Create_Semaphore .....................................................................................139
SMCE_Delete_Semaphore .....................................................................................139
SMCE_Obtain_Semaphore.....................................................................................140
SMCE_Release_Semaphore ...................................................................................140
SMF_Established_Semaphores ..............................................................................140
SMF_Semaphore_Pointers .....................................................................................141
SMF_Semaphore_Information ...............................................................................141
SMI_Initialize .........................................................................................................142
SMS_Reset_Semaphore .........................................................................................142
SMSE_Reset_Semaphore .......................................................................................142
Event Group Component (EV) .......................................................................................143
Event Group Files.......................................................................................................143
Event Group Data Structures ......................................................................................144
Created Event Group List ...........................................................................................144
Created Event Group List Protection..........................................................................144
Total Event Groups.....................................................................................................145
Event Group Control Block ........................................................................................145
Event Group Suspension Structure .............................................................................146
Event Group Functions ...............................................................................................147
EVC_Create_Event_Group ....................................................................................147
EVC_Delete_Event_Group ....................................................................................148
EVC_Set_Events ....................................................................................................148
EVC_Retrieve_Events............................................................................................149
EVC_Cleanup.........................................................................................................149
EVCE_Create_Event_Group ..................................................................................150
EVCE_Delete_Event_Group ..................................................................................150
EVCE_Set_Events..................................................................................................150
EVCE_Retrieve_Events .........................................................................................151
xix
EVF_Established_Event_Groups ...........................................................................151
EVF_Event_Group_Pointers ..................................................................................151
EVF_Event_Group_Information ............................................................................152
EVI_Initialize .........................................................................................................152
Partition Memory Component (PM)...............................................................................153
Partition Memory Files...............................................................................................153
Partition Memory Data Structures ..............................................................................154
Partition Memory Functions.......................................................................................160
PMC_Create_Partition_Pool ..................................................................................160
PMC_Delete_Partition_Pool ..................................................................................161
PMC_Allocate_Partition ........................................................................................161
PMC_Deallocate_Partition.....................................................................................162
PMC_Cleanup ........................................................................................................162
PMCE_Create_Partition_Pool................................................................................163
PMCE_Delete_Partition_Pool................................................................................163
PMCE_Allocate_Partition ......................................................................................164
PMCE_Deallocate_Partition ..................................................................................164
PMF_Established_Partition_Pools .........................................................................164
PMF_Partition_Pool_Pointers ................................................................................165
PMF_Partition_Pool_Information ..........................................................................165
PMI_Initialize.........................................................................................................165
Dynamic Memory Component (DM) .............................................................................166
Dynamic Memory Files ..............................................................................................166
Dynamic Memory Data Structures .............................................................................167
Dynamic Memory Functions ......................................................................................173
DMC_Create_Memory_Pool..................................................................................173
DMC_Delete_Memory_Pool..................................................................................173
DMC_Allocate_Memory........................................................................................174
DMC_Deallocate_Memory ....................................................................................174
DMC_Cleanup........................................................................................................175
DMCE_Create_Memory_Pool ...............................................................................175
DMCE_Delete_Memory_Pool ...............................................................................175
DMC_Allocate_Memory........................................................................................176
DMC_Deallocate_Memory ....................................................................................176
DMC_Cleanup........................................................................................................177
DMCE_Create_Memory_Pool ...............................................................................177
DMCE_Delete_Memory_Pool ...............................................................................177
DMCE_Allocate_Memory .....................................................................................178
DMCE_Deallocate_Memory..................................................................................178
DMF_Established_Memory_Pools.........................................................................178
DMF_Memory_Pool_Pointers ...............................................................................179
DMF_Memory_Pool_Information .........................................................................179
DMI_Initialize ........................................................................................................179
Input/Output Driver Component (IO)............................................................................180
Input/Output Driver Files ...........................................................................................180
Input/Output Data Structures......................................................................................181
Total Input/Output Drivers .............................................................................................183
Input/Output Driver Functions ...................................................................................187
IOC_Create_Driver ................................................................................................187
IOC_Delete_Driver.................................................................................................188
IOC_Request_Driver ..............................................................................................188
IOC_Resume_Driver ..............................................................................................188
IOC_Suspend_Driver .............................................................................................189
IOCE_Create_Driver ..............................................................................................189
IOCE_Delete_Driver ..............................................................................................189
IOCE_Request_Driver............................................................................................190
IOCE_Resume_Driver............................................................................................190
IOCE_Suspend_Driver ...........................................................................................190
IOF_Established_Drivers .......................................................................................191
IOF_Driver_Pointers ..............................................................................................191
IOI_Initialize ..........................................................................................................191
History Component (HI).................................................................................................192
History Files ...............................................................................................................192
History Data Structures...............................................................................................192
History Functions .......................................................................................................194
HIC_Disable_History_Saving ................................................................................194
HIC_Enable_History_Saving .................................................................................194
HIC_Make_History_Entry_Service........................................................................195
HIC_Make_History_Entry......................................................................................195
HIC_Retrieve_History_Entry .................................................................................196
HII_Initialize ..........................................................................................................196
Error Component (ER) ...................................................................................................196
Error Files...................................................................................................................196
Error Data Structures ..................................................................................................197
Error Functions .......................................................................................................197
ERC_System_Error ............................................................................................197
ERI_Initialize......................................................................................................198
License Component (LI).............................................................................................198
License Files ...........................................................................................................198
License Data Structures ..........................................................................................198
License Functions ...................................................................................................198
LIC_License_Information ..................................................................................199
Release Component (RL) ...........................................................................................199
Release Files ...........................................................................................................199
Release Data Structures ..........................................................................................199
Release Functions ...................................................................................................200
RLC_Release_Information .................................................................................200
Appendix A ? Nucleus PLUS Constants .................................................201
Appendix B ? Fatal System Errors ..........................................................209
Appendix C ? I/O Driver Structure Requests ..........................................211
【文件名】:0692@52RD_PLUS_Internals.pdf
【格 式】:pdf
【大 小】:3096K
【简 介】:
【目 录】:


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
高级模式
B Color Image Link Quote Code Smilies

本版积分规则

Archiver|手机版|小黑屋|52RD我爱研发网 ( 沪ICP备2022007804号-2 )

GMT+8, 2024-11-27 14:31 , Processed in 0.058081 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表