- Projektor topic
- Milyen billentyűzetet vegyek?
- Házi barkács, gányolás, tákolás, megdöbbentő gépek!
- Milyen belső merevlemezt vegyek?
- Soundbar, soundplate, hangprojektor
- HiFi műszaki szemmel - sztereó hangrendszerek
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- R_volution médialejátszók
- Azonnali VGA-s 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!
- EVGA SuperNOVA 750W GT 80 Plus Gold full moduláris tápegység / 53 hónap Alza.hu garancia
- Surface Laptop 4 Touch 13.5 Retina Ryzen7 4980U 4.4Ghz 16GB 512GB Radeon RX Vega8 Win11 Pro Garancia
- Gigabyte AORUS B550I PRO AX ITX Rev 1.2 / Beszámítás OK!
- HP 15 Zbook Studio G8 FHD IPS i7-11850H vPro 32GB 512GB SSD Nvidia A2000 Studio Win11 Pro Garancia
- Dell 14 Latitude 7420 FHD IPS i7-1185G7 4.8Ghz 16GB 512GB SSD Intel Iris XE Win11 Pro Garancia
- Prémium PC házak akár 20-40% kedvezménnyel eladók garanciával, számlával!
- Újszerű Asus ExpertBook B1 B1500 - 15.6" FullHD IPS - i5-1235U - 16GB - 512GB SSD - Win11 - Garancia
- BESZÁMÍTÁS! MSI B460M i5 10400F 32GB DDR4 512GB SSD RTX 2060 Super 8GB Zalman S4 Plus TT 500W
- Okosóra felvásárlás!! Samsung Galaxy Watch 5 Pro, Samsung Galaxy Watch 6 Classic
- Telefon felvásárlás!! iPhone 12 Mini/iPhone 12/iPhone 12 Pro/iPhone 12 Pro Max
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest