Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F64020927
hall.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
Fri, May 24, 00:50
Size
679 B
Mime Type
text/x-c
Expires
Sun, May 26, 00:50 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
17833544
Attached To
R2671 HHRI-software
hall.c
View Options
#include "hall.h"
AdcChannel
hall_channel
;
/**
* @brief Initialize the hall sensor driver.
* @param channel: the ADC channel the hall sensor is wired to (0 or 1).
*/
void
hall_Init
(
AdcChannel
channel
)
{
hall_channel
=
channel
;
}
/**
* @brief Return the measured paddle angle.
* @retval The paddle angle [deg].
* @warning this function is not implemented yet, and returns actually the raw
* voltage from the Hall sensor, instead of the ready-to-use angular position.
*/
float32_t
hall_Get
(
void
)
{
float32_t
voltage
=
adc_GetChannelVoltage
(
hall_channel
);
// TODO: the voltage to angle conversion is not implemented yet.
return
voltage
;
}
Event Timeline
Log In to Comment