LPC1549でQEI(ハードウェアでエンコーダ読み取り)を実現します。 (.cppでピン指定しています(基本的にはどこでも使用可))

Dependents:   Tourobo2022_TBCMotorDriver

qeihw_lpc1549.h

Committer:
YutaTogashi
Date:
2022-08-07
Revision:
6:cd0694454594
Parent:
3:68844cd35e64

File content as of revision 6:cd0694454594:

// Defines translating LPC1768 to LPC1548

#ifdef TARGET_LPC1549
#define QEICON                  CON
#define QEIMAXPOS               MAXPOS
#define INXCMP                  INXCMP0
#define QEILOAD                 LOAD
#define FILTER
#define QEICONF                 CONF
#define QEIIEC                  IEC
#define QEICLR                  CLR
#define QEISTAT                 STAT
#define QEIPOS                  POS
#define QEITIME                 TIME
#define QEICAP                  CAP
#define QEIINTSTAT              INTSTAT
#define QEIIES                  IES
#define QEIVEL                  VEL
#define QEISET                  SET

#define QEIO_PHA_I              8
#define QEIO_PHB_I              16
#define QEIO_IDX_I              24

#define SYSAHBCLKCTRL_QEI       ((uint32_t)(1<<21))
#endif /* TARGET_LPC1549 */