Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93371323
magnetic_encoder.h
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
Thu, Nov 28, 06:52
Size
941 B
Mime Type
text/x-c
Expires
Sat, Nov 30, 06:52 (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
22623378
Attached To
R6619 Oncilla Motordriver Firmware
magnetic_encoder.h
View Options
#ifndef MAGNETIC_ENCODER_H_
#define MAGNETIC_ENCODER_H_
#include <gpio.h>
struct
magnetic_encoder
;
typedef
struct
magnetic_encoder
magnetic_encoder
;
void
init_magnetic_encoders
(
gpio
spi_cs
);
void
magnetic_encoders_process
();
void
magnetic_encoders_start_reading
();
void
me_load_persistent_sbcp_settings
();
enum
me_error_flags
{
ME_F_OK
=
0
,
ME_F_LINEARITY_READ_ALARM
=
1
<<
0
,
ME_F_CORDIC_OVERFLOW
=
1
<<
1
,
ME_F_ONBOARD_PROCESSING_UNFINISHED
=
1
<<
2
,
ME_F_MAGNETIC_AMPLITUDE_ERROR
=
1
<<
3
};
typedef
enum
me_error_flags
me_error_flags
;
void
me_set_gear_ratio
(
magnetic_encoder
*
e
,
int
mult
,
int
div
);
int
me_get_gear_mult
(
magnetic_encoder
*
e
);
int
me_get_gear_div
(
magnetic_encoder
*
e
);
int
me_get_value
(
magnetic_encoder
*
e
);
me_error_flags
me_get_error
(
magnetic_encoder
*
e
);
extern
magnetic_encoder
*
me1
,
*
me2
,
*
me3
;
#endif
//MAGNETIC_ENCODER_H_
Event Timeline
Log In to Comment