Mail Queue Functions Test Cases.
More...
The test cases check the osMail* functions.
void TC_MailAlloc |
( |
void |
| ) |
|
- Allocate all mail blocks from the mail queue
- Return all mail blocks to the queue pool
void TC_MailCAlloc |
( |
void |
| ) |
|
- Allocate all mail block from the mail queue
- Init mail block with pattern
- Return all mail blocks to the queue pool
- Reallocate all mail block from the mail queue
- Check if mali block pattern was cleared to zero
- Return all mail blocks to the queue pool
void TC_MailCheckTimeout |
( |
void |
| ) |
|
- Set time thresholds
- Create wakeup thread to put a mail after 10 ticks
- Wait for a mail with a defined timeout
- Check if the mail is obtained between the minimum and maximum thresholds
- Wait for a mail with an infinite timeout
- Check if the mail is obtained between the minimum and maximum thresholds
void TC_MailFromISRToThread |
( |
void |
| ) |
|
- Periodically allocate and put mail into queue from the ISR
- Pool mail queue from a thread
- When mail available get if from queue and verify its content
- Free mail block
void TC_MailFromThread |
( |
void |
| ) |
|
- Create a mail sender thread
- Wait for mail from sender thread
- Verify mail content
- Free mail block
- Terminate sender thread
void TC_MailFromThreadToISR |
( |
void |
| ) |
|
- Continuously allocate mail, fill it with pattern and put it into queue
- Periodically trigger ISR and get, verify, free mail from it
void TC_MailInterrupts |
( |
void |
| ) |
|
- Call osMailAlloc without time-out from the ISR
- Call osMailAlloc with time-out from the ISR
- Call osMailCAlloc without time-out from the ISR
- Call osMailCAlloc with time-out from the ISR
- Call osMailGet from the ISR
- Call osMailPut from the ISR
- Call osMailFree from the ISR
void TC_MailParam |
( |
void |
| ) |
|
- Test mail queue management functions with invalid parameters
void TC_MailTimeout |
( |
void |
| ) |
|
- Wait for mail until time-out expires
- osMailGet must return status code osEventTimeout
void TC_MailToThread |
( |
void |
| ) |
|
- Create a mail receiver thread
- Allocate mail object
- Fill mail object with data
- Send mail to the receiver thread
- Wait for signal from receiver thread
- Free mail block
- Terminate receiver thread