Study Notes
for
redesigned
2012-10-7
versions : V-0.1
#include
#define
#define
OS_STK
OS_STK
OS_STK
char
//char
char
char
char
char
void
//To create a message queue, you first need to define a pointer array (for storing message mailboxes), and then store the first address of each message data buffer into this array
//Finally call the function OSQCreate() to create a message queue
INT8U
INT8U
OS_EVENT
void
void
void
void
{
Str_Q=OSQCreate(&MsgGrp[0],N_MESSAGES);
//The first parameter of the function &MsgGrp[0] is void
//It can be represented by the address of the first element of the pointer array
//N_MESSAGES is the size of the array
//The return value is the pointer to the message queue.
}
void
{
#if
#endif
if(OSTimeGet()>1000&&OSTimeGet()<1500)
}
void
{
#if
#endif
}
void
{
#if
#endif
}
//The running phenomenon shows that the above analysis is correct, because when the clock beat number is greater than 100 and less than 500, the two strings s100 and s100 in the first if statement will be sent.
//The task that runs below receives and displays it. When the clock beat number is greater than 1000 and less than 1500, the string in the second if statement is sent. The task that runs below
//Receive and display. When the clock beat number is greater than 1500, no more messages are sent. The following tasks will wait indefinitely if they cannot get any messages, so they will not be displayed.
//It is not difficult to see from the running phenomenon that sometimes MyTask or YouTask runs, but no message is received and it is in a waiting state
//Using the above method, we can clearly see the relationship between task scheduling and running.
Previous article:ucos-ii study notes - the principle and use of semaphore set (event flag group)
Next article:ucos-ii study notes-the principle and use of message mailbox
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- CGD and Qorvo to jointly revolutionize motor control solutions
- CGD and Qorvo to jointly revolutionize motor control solutions
- Keysight Technologies FieldFox handheld analyzer with VDI spread spectrum module to achieve millimeter wave analysis function
- Infineon's PASCO2V15 XENSIV PAS CO2 5V Sensor Now Available at Mouser for Accurate CO2 Level Measurement
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- A new chapter in Great Wall Motors R&D: solid-state battery technology leads the future
- Naxin Micro provides full-scenario GaN driver IC solutions
- Interpreting Huawei’s new solid-state battery patent, will it challenge CATL in 2030?
- Are pure electric/plug-in hybrid vehicles going crazy? A Chinese company has launched the world's first -40℃ dischargeable hybrid battery that is not afraid of cold
- Dual-receive and dual-transmit radio RF board based on XC7Z100+ADRV9009
- 【Repost】The definition and difference between passive and active signals of sensors
- TI C64x+ DSP CACHE consistency analysis and maintenance
- Some basic knowledge about SPI-Flash
- Is your phone ready for 5G?
- [MSP430] Practical ADC use, internal temperature measurement use
- CC2640R2F ADC
- [RVB2601 Creative Application Development] Practice 5-FOTA upgrade display download progress
- PCB design information sharing
- Help! I'm looking for an ultra-low power MCU. I hope you can recommend one.