Hirdetés
- Kormányok / autós szimulátorok topikja
- Apple MacBook
- NVIDIA GeForce RTX 3080 / 3090 / Ti (GA102)
- ThinkPad (NEM IdeaPad)
- HTPC (házimozi PC) topik
- Új termékkel és áremeléssel reagál a memóriahiányra a Raspberry Pi
- Androidos fejegységek
- Vezetékes FÜLhallgatók
- Szomjan halunk, míg az AI dolgozik
- Azonnali notebookos kérdések órája
Új hozzászólás Aktív témák
-
tototos
addikt
Sziasztok!
Egy kis macro segítség kellene. A következő sorokat szeretném kiváltani macroval:
task_Function[0] = task1;
task_Function[1] = task2;
task_Function[2] = task3;
task_Function[3] = task4;
task_Function[4] = task5;
task_Function[5] = task6;
task_Function[6] = task7;
static portTASK_FUNCTION(task1,params){
portTickType xLastWakeTime;
const portTickType xFrequency = RTOS_tasks[0].period_ldu32 / portTICK_RATE_MS;
// Initialize the xLastWakeTime variable with the current time.
xLastWakeTime = xTaskGetTickCount();
while(1)
{
RTOS_tasks[0].taskFunction(params);
// Wait for the next cycle.
vTaskDelayUntil( &xLastWakeTime, xFrequency );
}
}
static portTASK_FUNCTION(task2,params){
portTickType xLastWakeTime;
const portTickType xFrequency = RTOS_tasks[1].period_ldu32 / portTICK_RATE_MS;
// Initialize the xLastWakeTime variable with the current time.
xLastWakeTime = xTaskGetTickCount();
while(1)
{
RTOS_tasks[1].taskFunction(params);
// Wait for the next cycle.
vTaskDelayUntil( &xLastWakeTime, xFrequency );
}
}
static portTASK_FUNCTION(task3,params){
portTickType xLastWakeTime;
const portTickType xFrequency = RTOS_tasks[2].period_ldu32 / portTICK_RATE_MS;
// Initialize the xLastWakeTime variable with the current time.
xLastWakeTime = xTaskGetTickCount();
while(1)
{
RTOS_tasks[2].taskFunction(params);
// Wait for the next cycle.
vTaskDelayUntil( &xLastWakeTime, xFrequency );
}
}
static portTASK_FUNCTION(task4,params){
portTickType xLastWakeTime;
const portTickType xFrequency = RTOS_tasks[3].period_ldu32 / portTICK_RATE_MS;
// Initialize the xLastWakeTime variable with the current time.
xLastWakeTime = xTaskGetTickCount();
while(1)
{
RTOS_tasks[3].taskFunction(params);
// Wait for the next cycle.
vTaskDelayUntil( &xLastWakeTime, xFrequency );
}
}
static portTASK_FUNCTION(task5,params){
portTickType xLastWakeTime;
const portTickType xFrequency = RTOS_tasks[4].period_ldu32 / portTICK_RATE_MS;
// Initialize the xLastWakeTime variable with the current time.
xLastWakeTime = xTaskGetTickCount();
while(1)
{
RTOS_tasks[4].taskFunction(params);
// Wait for the next cycle.
vTaskDelayUntil( &xLastWakeTime, xFrequency );
}
}
static portTASK_FUNCTION(task6,params){
portTickType xLastWakeTime;
const portTickType xFrequency = RTOS_tasks[5].period_ldu32 / portTICK_RATE_MS;
// Initialize the xLastWakeTime variable with the current time.
xLastWakeTime = xTaskGetTickCount();
while(1)
{
RTOS_tasks[5].taskFunction(params);
// Wait for the next cycle.
vTaskDelayUntil( &xLastWakeTime, xFrequency );
}
}
static portTASK_FUNCTION(task7,params){
portTickType xLastWakeTime;
const portTickType xFrequency = RTOS_tasks[6].period_ldu32 / portTICK_RATE_MS;
// Initialize the xLastWakeTime variable with the current time.
xLastWakeTime = xTaskGetTickCount();
while(1)
{
RTOS_tasks[6].taskFunction(params);
// Wait for the next cycle.
vTaskDelayUntil( &xLastWakeTime, xFrequency );
}
}Meg lehet ezt valósítani? Köszi.
Új hozzászólás Aktív témák
● olvasd el a téma összefoglalót!
● ha kódot szúrsz be, használd a PROGRAMKÓD formázási funkciót!
- One mobilszolgáltatások
- Mesterséges intelligencia topik
- Otthoni hálózat és internet megosztás
- Witcher topik
- Óra topik
- Xiaomi 13 - felnőni nehéz
- Xiaomi 15T Pro - a téma nincs lezárva
- Milyen okostelefont vegyek?
- Milyen légkondit a lakásba?
- Honor Magic8 Pro - bevált recept kölcsönvett hozzávalókkal
- További aktív témák...
- Ryzen 7 5700X / RX 6800 16GB / B550M WIFI / 32GB RAM 3600Mhz / 1TB NVMe SSD / 650W GOLD
- HP 250R G10 - 15.6"FHD IPS - Core 5 120U - 16GB - 512GB - Win11 - 3 év garancia - MAGYAR
- Eladó Anker Soundcare Motion Boom Plus hordozható zenedoboz!
- GIGABYTE GeForce RTX 3060 12GB (Beszámítás)
- Arturia KeyStep 32 MIDI USB
- 137 - Lenovo Legion Pro 7 (16IRX9H) - Intel Core i9-14900HX, RTX 4080 (ELKELT)
- Lenovo LEGION 5 PRO Ultra 9 275HX 32GB RAM 2TB SSD RTX 5070 Ti 12GB 16" QHD+ OLED 3év Prémium GAR
- GAMING PC! Intel i5-12400F / RTX 4060 Ti / 16GB DDR4 / H610 / 512GB NVMe / 600w! BeszámítOK
- Akciós Windows 10 pro + Office 2019 professional plus csomag AZONNALI SZÁLLÍTÁS
- LG 39GX90SA-W - 39" Ívelt Smart OLED/ WQHD 2K / 240Hz & 0.03ms / 1300 Nits / G-Sync & FreeSync
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

