Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F60563653
tachometer.c
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, May 1, 03:14
Size
537 B
Mime Type
text/x-c
Expires
Fri, May 3, 03:14 (2 d)
Engine
blob
Format
Raw Data
Handle
17375214
Attached To
R2671 HHRI-software
tachometer.c
View Options
#include "tachometer.h"
AdcChannel
tac_channel
;
/**
* @brief Initialize the tachometer driver.
* @param channel: the ADC channel the tachometer is wired to (0 or 1).
*/
void
tac_Init
(
AdcChannel
channel
)
{
tac_channel
=
channel
;
}
/**
* @brief Return the measured paddle angular speed.
* @retval The paddle angular speed [deg/s].
*/
float32_t
tac_Get
(
void
)
{
float32_t
voltage
=
adc_GetChannelVoltage
(
tac_channel
);
// Conversion from voltage to angular speed.
return
voltage
*
TAC_VOLTAGE_TO_RPM
;
}
Event Timeline
Log In to Comment