Repository navigation
Expand file tree
/
Copy pathSensorInt.h
More file actions
59 lines (40 loc) · 1.57 KB
/
Copy pathSensorInt.h
File metadata and controls
59 lines (40 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef SENSOR_INT_H_
#define SENSOR_INT_H_
#include <stdint.h>
#include <stdbool.h>
#include "../utilities/CtlHandler.h"
#include "../utilities/ModuleIOPorts.h"
#include "Sensors/QEIModule.h"
#include "Sensors/ForceSensor.h"
#include "Sensors/CurrentMeas.h"
//*****************************************************************************
//
// Global variables of SpeedController.c
//
//*****************************************************************************
enum SensorsVector {QEI_POS, QEI_SPEED, CURRENT, FORCE};
typedef struct ClassSensorInt ClassSensorInt;
struct ClassSensorInt{
uint32_t _FS;
float _value;
enum SensorsVector _sensor;
ClassIOPorts _IOPorts;
ClassCtlHandler _handler;
};
//*****************************************************************************
//
// Functions defined in PositionController.c
//
//*****************************************************************************
//*****************************************************************************
//
// Functions defined in PositionController.c that are made available to other files.
//
//*****************************************************************************
void SensorInt_Construct(ClassSensorInt * sensorInt, enum SensorsVector sensor, uint32_t ctlFS, char ID);
void SensorInt_Compute(void * SensorIntV);
void SensorInt_Reset(void * SensorIntV);
void SensorInt_SetFS(ClassSensorInt * sensorInt, uint32_t ctlFS);
uint32_t SensorInt_GetFS(void * sensorIntV);
float SensorInt_GetValue(ClassSensorInt * sensorInt);
#endif