Documente Academic
Documente Profesional
Documente Cultură
Returning :RG
Error parameters- Returning :RG OS_NO_ERR= true, when resumption after delay succeeds OS_TASK_NOT_EXIST=true,if the task was not Created earlier. OS_TIME_NOT_DLY=true,if the task was not delayed OS_PRIO_INVALID, when task priority is the priority of that task . That is , to delay before resumption
3.Delaying by defining a time delay in units of hours, minutes, seconds and milliseconds
Function void OSTimeDlyHMSM(unsigned short hr, unsigned shortmm, unsigned short sec, unsigned short mils)delay upto 65535 ticks a task with delay time in terms of hr for hours, sec for seconds and mils for milliseconds
Returning RH
Returning RH The function OSTimeDlyHMSM() returns an error code as following OS_NO_ERR,when four arguments are valid and resumption after delay succeeds OS_TIME_INVALID_ HOURS, OS_TIME_INVALID_ MINUTES, OS_TIME_INVALID_ SECONDS, OS_TIME_INVALID_ MILLI if the argument are greater than 55,59,59,999 OS_TIME_ZERO_DLY, if all the arguments passed are 0.
Returning RI Function *OSMemCreate () returns a pointer to a control block for a created memory partitions Task Parameters passing PI MEMTYPE is the data type according to memory , whether 16-bit or 32 bit CPU memory addresses are there, for example, 16 bit in 68HCII and 8051
*memAddr- pointer for memory starting address of the blocks numBlocks- Number of blocks into which the memory must be partitioned Block size- memory size in bytes in each block *memErr- pointer of the address to hold the error codes
example
Typedef unsigned short MEMTYPE . . .memAddr= 0x8000 num blocks=4 Block size= 1024 *OSMemCreate(*memAddr,numblock,*memAddr):
example
{
Returning RK The function OSMemQuery() returns an error code which is an unsigned byte Task Parameter passing PK The Function OSMemQuery()passes a) pointer mempointer of the memory created earlier. b).pointer of the data_structure, OS_MEM_DATA.
Returning RL
The function OS MemPut() returns error codes for one of the following OS_NO_ERR- When memory block returned to the memory partition OS_MEM_FULL- When memory block cannot be put into the memory partition as it is full