Ú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!
- Kuponkunyeráló
- gban: Ingyen kellene, de tegnapra
- Spórolós topik
- Samsung Galaxy Felhasználók OFF topicja
- Anime filmek és sorozatok
- Bejelentették a Graveyard Keeper 2-t, az első rész átmenetileg ingyenes
- Analóg fényképezés
- AliExpress tapasztalatok
- A jövőben egy új foglalat több CPU-generációt is kiszolgál majd az Intelnél
- Milyen billentyűzetet vegyek?
- További aktív témák...
- Huawei MateBook: Ryzen 5 / 8GB/ 256SSD/ 15.6 Full HD/ akku: óra
- Dell G3 3590 15.6" FHD IPS i5-9300H GTX 1650 16GB 256GB NVMe + 1TB HDD magyar vbill új akku gar
- Iphone 17 Pro 512 GB. Független.
- T14s Gen6 14" FHD+ IPS Ultra 7 255U 32GB 1TB NVMe ujjlolv IR kam gar
- ROG Zephyrus G14 GA401QM 14" FHD IPS Ryzen 9 5900HS RTX 3060 16GB 512GB magyar vbill gar
- Lenovo ThinkBook 14s Yoga 2-in-1 üzleti laptop tollal ÚJ Állapot i7-1165G7 16gb ram 512ssd FHD Gari
- ÁRGARANCIA!Épített KomPhone Ryzen 5 7500F 32/64GB RAM RTX 5070 12GB GAMER PC termékbeszámítással
- Dell Latitude E7240 Core I5-4310U CPU / 4GB DDR3 RAM laptop
- Apple iPhone 13 256GB,Használt,Dobozaval,12 hónap garanciával
- Magyar, Aktiválatlan! Apple MacBook Pro 14! M3, 8GB, 500GB! BeszámítOK
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
