Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: ActiveCaster_ ActiveCaster_2
AMT22.h
00001 #ifndef _AMT22_H 00002 #define _AMT22_H 00003 00004 #include "mbed.h" 00005 #include "define.h" 00006 //#include <SPI.h> 00007 00008 class AMT203V{ 00009 public: 00010 AMT203V(SPI*, PinName); 00011 00012 int spi_write(int msg); 00013 int init(); 00014 int getEncount(); 00015 void updateCount(); 00016 int setZeroPos(); 00017 int getRawEncount(); 00018 00019 private: 00020 bool init_done; 00021 //unsigned char CSBpin; 00022 const int res = 0x3FFF;//4096; 00023 unsigned int ABSposition; // rawdata 00024 unsigned int preABSposition; 00025 int rotation = 0; 00026 int encount; // 渡す値 00027 int temp[2]; 00028 00029 SPI *pSPI; 00030 DigitalOut *CSBpin; 00031 00032 }; 00033 00034 #endif
Generated on Tue Aug 30 2022 15:49:49 by
1.7.2