Ú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!
- Samsung Galaxy Felhasználók OFF topicja
- Autós topik
- Építő/felújító topik
- PROHARDVER! feedback: bugok, problémák, ötletek
- Le Mans Ultimate
- Kormányok / autós szimulátorok topikja
- OLED TV topic
- AMD Ryzen 9 / 7 / 5 / 3 5***(X) "Zen 3" (AM4)
- Cyberpunk 2077
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- További aktív témák...
- MikroTik RB962UiGS-5HacT2HnT- hAP ac RouterBoard 2,4GHz - 5GHz
- PS Vita 2000 japán dobozos újszerű állapot, új aksi, 16 GB Sony, 256 GB SD kártya, hordtáska
- SZÉP ÉS OLCSÓ! 100% akku és csak 6 hónapos, iPhone 16e 128GB AZONNAL! - Space Black! 155.990Ft
- Jura Ena 8 kávégép
- Dell Precision 5520 15,6" FHD, Xeon E3-1505M v5, 16GB RAM, Quadro 4GB VGA, SSD, jó akku, számla, gar
- Bomba ár! Lenovo ThinkPad X13 G1- i5-10310U I 16GB I 256SSD I 13,3" FHD Touch I Cam I W11 I Gari!
- Keresünk iPhone 16/16e/16 Plus/16 Pro/16 Pro Max
- AKCIÓ! LG UltraGear 27GR93U-B 27 4K 144Hz IPS monitor garanciával hibátlan működéssel
- ÁRGARANCIA!Épített KomPhone i5 14600KF 32/64GB RAM RTX 5070 12GB GAMER PC termékbeszámítással
- LG 27UP850K-W - 27" IPS LED - 3840x2160 4K - DisplayHDR 400 - USB Type-C - AMD FreeSync
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopszaki Kft.
Város: Budapest

