Open FFBoard
Open source force feedback firmware
voltagesense.h
Go to the documentation of this file.
1
/*
2
* voltagesense.h
3
*
4
* Created on: Feb 1, 2020
5
* Author: Yannick
6
*/
7
8
#ifndef VOLTAGESENSE_H_
9
#define VOLTAGESENSE_H_
10
#include "target_constants.h"
11
12
int32_t
getIntV
();
13
int32_t
getExtV
();
14
void
brakeCheck
();
15
16
/*
17
* Multiplier to convert ADC counts to a sensed voltage on the vInt and vExt pins.
18
*/
19
void
setVSenseMult
(
float
vSenseMultiplier);
20
21
/*
22
* vMax: maximum voltage where the brake pin goes always high
23
* vdiffAct: difference between vInt and vExt to activate brake pin
24
* vdiffDeact: difference when to deactivate brake pin again (must be lower than vdiffAct)
25
* Set vMax = 0 to completely deactivate the brake resistor function. DANGEROUS
26
*
27
*/
28
void
setupBrakePin
(uint32_t vdiffAct,int32_t vdiffDeact,int32_t vMax);
29
34
float
adcValToVoltage
(uint32_t adcval);
35
40
int32_t
getChipTemp
();
41
42
#endif
/* VOLTAGESENSE_H_ */
brakeCheck
void brakeCheck()
Definition:
voltagesense.cpp:62
getChipTemp
int32_t getChipTemp()
Definition:
voltagesense.cpp:96
getIntV
int32_t getIntV()
Definition:
voltagesense.cpp:53
setupBrakePin
void setupBrakePin(uint32_t vdiffAct, int32_t vdiffDeact, int32_t vMax)
adcValToVoltage
float adcValToVoltage(uint32_t adcval)
Definition:
voltagesense.cpp:46
getExtV
int32_t getExtV()
Definition:
voltagesense.cpp:58
setVSenseMult
void setVSenseMult(float vSenseMultiplier)
Definition:
voltagesense.cpp:29
Firmware
FFBoard
Inc
voltagesense.h
Generated by
1.9.2