Vehicle Control Unit 0.01
This is the c library for controlling the car.
Loading...
Searching...
No Matches
Task.h
Go to the documentation of this file.
1#ifndef RENSSELAERMOTORSPORT_TASK_H
2#define RENSSELAERMOTORSPORT_TASK_H
3
4#include "../Utils/Updateable.h"
5// FIXME: Configure board to get high-resolution time
6typedef int highResTime;
7
8typedef struct {
9 int hz;
12} Task;
13
22void TaskInit(Task* task, Updateable* updateable, int hz);
23
30void TaskExecute(Task* task);
31
32#endif // RENSSELAERMOTORSPORT_TASK_H
int highResTime
Definition: Task.h:6
void TaskInit(Task *task, Updateable *updateable, int hz)
Initializes a task with the given sensor and update frequency.
Definition: Task.c:3
void TaskExecute(Task *task)
Executes the task by calling the sensor's update function.
Definition: Task.c:9
Definition: Task.h:8
int hz
Definition: Task.h:9
Updateable * updateable
Definition: Task.h:11
highResTime nextExecTime
Definition: Task.h:10