Vito Lin
/
Rong_Sensor
rrr
encoder.h@12:a197e7eed8ab, 2018-12-19 (annotated)
- Committer:
- ChengHan
- Date:
- Wed Dec 19 12:35:03 2018 +0000
- Revision:
- 12:a197e7eed8ab
- Parent:
- 0:c23e915f255b
rrr
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
JJting | 0:c23e915f255b | 1 | #ifndef _ENCODER_H_ |
JJting | 0:c23e915f255b | 2 | #define _ENCODER_H_ |
JJting | 0:c23e915f255b | 3 | |
JJting | 0:c23e915f255b | 4 | #include "mbed.h" |
JJting | 0:c23e915f255b | 5 | |
JJting | 0:c23e915f255b | 6 | extern void init_SPI_encoder(); |
JJting | 0:c23e915f255b | 7 | extern void init_encoder(); |
JJting | 0:c23e915f255b | 8 | extern void angle_measure(); |
JJting | 0:c23e915f255b | 9 | extern int angle_count(unsigned short,unsigned short); |
JJting | 0:c23e915f255b | 10 | |
JJting | 0:c23e915f255b | 11 | extern DigitalOut encoder_cs; |
JJting | 0:c23e915f255b | 12 | extern SPI spi_encoder; |
JJting | 0:c23e915f255b | 13 | |
JJting | 0:c23e915f255b | 14 | extern unsigned short encoder_value; |
JJting | 0:c23e915f255b | 15 | extern unsigned short angle; |
JJting | 0:c23e915f255b | 16 | extern unsigned short angle_old; |
JJting | 0:c23e915f255b | 17 | extern int angle_dif; |
JJting | 0:c23e915f255b | 18 | extern int a_dif; |
JJting | 0:c23e915f255b | 19 | extern int Angle; |
JJting | 0:c23e915f255b | 20 | extern unsigned short k; |
JJting | 0:c23e915f255b | 21 | |
JJting | 0:c23e915f255b | 22 | |
JJting | 0:c23e915f255b | 23 | #endif |