Photo Rating Website
Home Maximum R The Cambr 0877 Ch09 Niewolnica

[ Pobierz całość w formacie PDF ]

2.3.8 _lwevent_wait_for
Used by a task to wait for the number of ticks (in tick time).
Source :
Prototype :_mqx_uint _lwevent_wait_for(LWEVENT_STRUCT_PTR event_ptr, _mqx_uint bit_mask,
boolean all, MQX_TICK_STRUCT_PTR tick_ptr);
Freescale MQX"! Lite RTOS, Rev. Version 1.1
40 Freescale Semiconductor, Inc.
Chapter 2 MQX Lite Functions
Table 2-28. _lwevent_wait_for arguments
Name Type Direction Description
LWEVENT_STRUCT_P event_ptr input Pointer to the lightweight event.
TR
_mqx_uint bit_mask input Bit mask. Each set bit represents an event bit to wait for.
boolean all input TRUE (wait for all bits in bit_mask to be set), FALSE (wait for
any bit in bit_mask to be set).
MQX_TICK_STRUCT_ tick_ptr input Pointer to the maximum number of ticks to wait for the events
PTR to be set. If the value is NULL, then the timeout will be infinite.
Returns :
" MQX_OK
" LWEVENT_WAIT_TIMEOUT (The time elapsed before an event signalled.)
" MQX_LWEVENT_INVALID (Lightweight event is no longer valid or was never
valid.)
" MQX_CANNOT_CALL_FUNCTION_FROM_ISR (Function cannot be called from
an ISR.)
See also :
" _lwevent_create
" _lwevent_destroy
" _lwevent_set
" _lwevent_set_auto_clear
" _lwevent_clear
" _lwevent_wait_ticks
" _lwevent_wait_until
" _lwevent_get_signalled
" LWEVENT_STRUCT
" MQX_TICK_STRUCT
CAUTION
Blocks until the event combination is set or until the timeout
expires. Cannot be called from an ISR.
2.3.9 _lwevent_wait_ticks
Used by a task to wait for the number of ticks.
Source :
Prototype :_mqx_uint _lwevent_wait_ticks(LWEVENT_STRUCT_PTR event_ptr, _mqx_uint bit_mask,
boolean all, _mqx_uint timeout_in_ticks);
Freescale MQX"! Lite RTOS, Rev. Version 1.1
Freescale Semiconductor, Inc. 41
Lightweight events
Table 2-29. _lwevent_wait_ticks arguments
Name Type Direction Description
LWEVENT_STRUCT_P event_ptr input Pointer to the lightweight event.
TR
_mqx_uint bit_mask input Bit mask. Each set bit represents an event bit to wait for.
boolean all input TRUE (wait for all bits in bit_mask to be set), FALSE (wait for
any bit in bit_mask to be set).
_mqx_uint timeout_in_ticks input The maximum number of ticks to wait for the events to be set.
If the value is NULL, then the timeout will be infinite.
Returns :
" MQX_OK
" LWEVENT_WAIT_TIMEOUT (The time elapsed before an event signalled.)
" MQX_LWEVENT_INVALID (Lightweight event is no longer valid or was never
valid.)
" MQX_CANNOT_CALL_FUNCTION_FROM_ISR (Function cannot be called from
an ISR.)
See also :
" _lwevent_create
" _lwevent_destroy
" _lwevent_set
" _lwevent_set_auto_clear
" _lwevent_clear
" _lwevent_wait_for
" _lwevent_wait_until
" _lwevent_get_signalled
" LWEVENT_STRUCT
CAUTION
Blocks until the event combination is set or until the timeout
expires. Cannot be called from an ISR.
2.3.10 _lwevent_wait_until
Used by a task to wait until the specified time (in tick time).
Source :
Prototype :_mqx_uint _lwevent_wait_until(LWEVENT_STRUCT_PTR event_ptr, _mqx_uint bit_mask,
boolean all, MQX_TICK_STRUCT_PTR tick_ptr);
Freescale MQX"! Lite RTOS, Rev. Version 1.1
42 Freescale Semiconductor, Inc.
Chapter 2 MQX Lite Functions
Table 2-30. _lwevent_wait_until arguments
Name Type Direction Description
LWEVENT_STRUCT_P event_ptr input Pointer to the lightweight event.
TR
_mqx_uint bit_mask input Bit mask. Each set bit represents an event bit to wait for.
boolean all input TRUE (wait for all bits in bit_mask to be set), FALSE (wait for
any bit in bit_mask to be set).
MQX_TICK_STRUCT_ tick_ptr input Pointer to the maximum number of ticks to wait for the events
PTR to be set. If the value is NULL, then the timeout will be infinite.
Returns :
" MQX_OK
" LWEVENT_WAIT_TIMEOUT (The time elapsed before an event signalled.)
" MQX_LWEVENT_INVALID (Lightweight event is no longer valid or was never
valid.)
" MQX_CANNOT_CALL_FUNCTION_FROM_ISR (Function cannot be called from
an ISR.)
See also :
" _lwevent_create
" _lwevent_destroy
" _lwevent_set
" _lwevent_set_auto_clear
" _lwevent_clear
" _lwevent_wait_for
" _lwevent_wait_ticks
" _lwevent_get_signalled
" LWEVENT_STRUCT
" MQX_TICK_STRUCT
CAUTION
Blocks until the event combination is set or until the timeout
expires. Cannot be called from an ISR.
2.4 Lightweight logs
2.5 Lightweight message queue
Freescale MQX"! Lite RTOS, Rev. Version 1.1
Freescale Semiconductor, Inc. 43
Lightweight message queue
2.5.1 _lwmsgq_init
Creates a lightweight message queue.
Source :
Prototype :_mqx_uint _lwmsgq_init(pointer location, _mqx_uint num_messages, _mqx_uint
msg_size);
Table 2-31. _lwmsgq_init arguments
Name Type Direction Description
pointer location input Pointer to memory to create a message queue.
_mqx_uint num_messages input Number of messages in the queue.
_mqx_uint msg_size input Specifies message size as a multiplier factor of
_mqx_max_type items.
Returns :
" MQX_OK
" MQX_EINVAL (The location already points to a valid lightweight message queue.)
See also :
" _lwmsgq_receive
" _lwmsgq_send
Description :
The function creates a message queue at location. There must be sufficient memory
allocated to hold num_messages of msg_size * sizeof(_mqx_max_type) plus the size of
LWMSGQ_STRUCT.
CAUTION
Disables and enables interrupts.
2.5.2 _lwmsgq_receive
Gets a message from a lightweight message queue.
Source :
Prototype :_mqx_uint _lwmsgq_receive(pointer handle, _mqx_max_type_ptr message, _mqx_uint [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • spartaparszowice.keep.pl
  • Naprawdę poczułam, że znalazłam swoje miejsce na ziemi.

    Designed By Royalty-Free.Org