Ú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 S26 - szeret, nem szeret
- Mesterséges intelligencia topik
- Windows 11
- Audi, Cupra, Seat, Skoda, Volkswagen topik
- OLED TV topic
- Túl jól fogy az S26, túlóráznia kell a gyártósoroknak
- S.T.A.L.K.E.R. 2: Heart of Chornobyl
- Xbox tulajok OFF topicja
- Robotporszívók
- Amit látnod kell 80’ – 90’ évek, egész estét betöltő mozi filmjei.
- További aktív témák...
- Új Dobozos Lenovo Thinkpad P14s G5 Workstation Laptop 14" -45% Ultra 7 165H 32/512 RTX 500 3K 120Hz
- Revel Performa3 5.1 szett + Primare SPA23
- Sony Alpha a7R IV tükör nélküli digitális fényképezőgép váz (ILCE-7RM4A) Új modell
- Új Dobozos Dell Latitude 3450 Laptop 14" -40% i7-1355U 16GB/256GB SSD NVIDIA MX570A 2GB FHD
- Megkímélt HP EliteBook 855 G7 Fémházas Strapabíró Laptop 15,6" -65% AMD Ryzen 3 PRO 4450U 16/256 FHD
- GYÖNYÖRŰ iPhone 14 Pro Max 256GB Space Black -1 ÉV GARANCIA -Kártyafüggetlen, MS4031
- Kingston 1TB NVMe ÚJ, 3 év garival, brutál gyors!
- REFURBISHED és ÚJ - Lenovo ThinkPad 40AY Universal USB-C Dock
- HIBÁTLAN iPhone 11 128GB Black -1 ÉV GARANCIA - Kártyafüggetlen, MS4411, 100% Akksi
- 215 - Lenovo LOQ (15IRX9) - Intel Core i7-13650HX, RTX 4060 (ELKELT)
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest
