read encoder

Dependencies:   mbed

Committer:
JJting
Date:
Tue Jul 31 13:24:56 2018 +0000
Revision:
1:2f2a74337b77
Parent:
0:f2657b94ea70
Child:
2:33062fc279ca
20180731ver2;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JJting 0:f2657b94ea70 1 #ifndef _ENCODER_H_
JJting 0:f2657b94ea70 2 #define _ENCODER_H_
JJting 0:f2657b94ea70 3
JJting 1:2f2a74337b77 4 #include "mbed.h"
JJting 1:2f2a74337b77 5
JJting 1:2f2a74337b77 6 extern void init_encoder();
JJting 1:2f2a74337b77 7 extern void init_SPI_encoder();
JJting 1:2f2a74337b77 8 extern void angle_measure();
JJting 1:2f2a74337b77 9 extern int angle_count(unsigned short,unsigned short);
JJting 1:2f2a74337b77 10
JJting 1:2f2a74337b77 11 extern DigitalOut encoder_cs;
JJting 1:2f2a74337b77 12 extern SPI spi_encoder;
JJting 1:2f2a74337b77 13
JJting 1:2f2a74337b77 14 extern unsigned short encoder_value;
JJting 1:2f2a74337b77 15 extern unsigned short angle;
JJting 1:2f2a74337b77 16 extern unsigned short angle_old;
JJting 1:2f2a74337b77 17 extern int angle_dif;
JJting 1:2f2a74337b77 18 extern int a_dif;
JJting 1:2f2a74337b77 19 extern int Angle;
JJting 1:2f2a74337b77 20 extern unsigned short angle_init;
JJting 1:2f2a74337b77 21 extern unsigned short k;
JJting 1:2f2a74337b77 22
JJting 1:2f2a74337b77 23
JJting 1:2f2a74337b77 24 #endif