From 168e9d6305f096252015d5a73522095d640582a3 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Sun, 13 Apr 2025 13:32:36 +0800 Subject: [PATCH] =?UTF-8?q?APPEDN:=20v1022|=20=E4=BF=AE=E5=A4=8DTMC5160=20?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E9=A9=B1=E5=8A=A8=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sdk/components/tmc/ic/TMC5130/TMC5130.h | 2 -- sdk/components/tmc/ic/TMC5160/TMC5160.h | 25 ------------------------- usrc/version.h | 2 +- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/sdk/components/tmc/ic/TMC5130/TMC5130.h b/sdk/components/tmc/ic/TMC5130/TMC5130.h index 3a5d4d3..edbe121 100644 --- a/sdk/components/tmc/ic/TMC5130/TMC5130.h +++ b/sdk/components/tmc/ic/TMC5130/TMC5130.h @@ -14,8 +14,6 @@ #include "TMC5130_Register.h" // Helper macros -#define TMC5130_FIELD_READ(tdef, address, mask, shift) FIELD_GET(tmc5130_readInt(tdef, address), mask, shift) -#define TMC5130_FIELD_WRITE(tdef, address, mask, shift, value) (tmc5130_writeInt(tdef, address, FIELD_SET(tmc5130_readInt(tdef, address), mask, shift, value))) // Typedefs typedef struct { diff --git a/sdk/components/tmc/ic/TMC5160/TMC5160.h b/sdk/components/tmc/ic/TMC5160/TMC5160.h index b36e2ca..b31febd 100644 --- a/sdk/components/tmc/ic/TMC5160/TMC5160.h +++ b/sdk/components/tmc/ic/TMC5160/TMC5160.h @@ -13,12 +13,6 @@ #include "TMC5160_Constants.h" #include "TMC5160_Fields.h" -// Helper macros -#define TMC5160_FIELD_READ(tdef, address, mask, shift) \ - FIELD_GET(tmc5160_readInt(tdef, address), mask, shift) -#define TMC5160_FIELD_WRITE(tdef, address, mask, shift, value) \ - (tmc5160_writeInt(tdef, address, FIELD_SET(tmc5160_readInt(tdef, address), mask, shift, value))) - // Factor between 10ms units and internal units for 16MHz //#define TPOWERDOWN_FACTOR (4.17792*100.0/255.0) // TPOWERDOWN_FACTOR = k * 100 / 255 where k = 2^18 * 255 / fClk for fClk = 16000000) @@ -112,25 +106,6 @@ static const TMCRegisterConstant tmc5160_RegisterConstants[] = { 0x70, 0xC40C001E } // PWMCONF }; -void tmc5160_writeDatagram(TMC5160TypeDef *tmc5160, uint8_t address, uint8_t x1, uint8_t x2, uint8_t x3, uint8_t x4); -void tmc5160_writeInt(TMC5160TypeDef *tmc5160, uint8_t address, int32_t value); -int32_t tmc5160_readInt(TMC5160TypeDef *tmc5160, uint8_t address); - -void tmc5160_init(TMC5160TypeDef *tmc5160, uint8_t channel, ConfigurationTypeDef *config, const int32_t *registerResetState); -void tmc5160_fillShadowRegisters(TMC5160TypeDef *tmc5160); -uint8_t tmc5160_reset(TMC5160TypeDef *tmc5160); -uint8_t tmc5160_restore(TMC5160TypeDef *tmc5160); -void tmc5160_setRegisterResetState(TMC5160TypeDef *tmc5160, const int32_t *resetState); -void tmc5160_setCallback(TMC5160TypeDef *tmc5160, tmc5160_callback callback); -void tmc5160_periodicJob(TMC5160TypeDef *tmc5160, uint32_t tick); - -void tmc5160_rotate(TMC5160TypeDef *tmc5160, int32_t velocity); -void tmc5160_right(TMC5160TypeDef *tmc5160, uint32_t velocity); -void tmc5160_left(TMC5160TypeDef *tmc5160, uint32_t velocity); -void tmc5160_stop(TMC5160TypeDef *tmc5160); -void tmc5160_moveTo(TMC5160TypeDef *tmc5160, int32_t position, uint32_t velocityMax); -void tmc5160_moveBy(TMC5160TypeDef *tmc5160, int32_t *ticks, uint32_t velocityMax); -uint8_t tmc5160_consistencyCheck(TMC5160TypeDef *tmc5160); #endif /* TMC_IC_TMC5160_H_ */ diff --git a/usrc/version.h b/usrc/version.h index 80f67f5..6972b12 100644 --- a/usrc/version.h +++ b/usrc/version.h @@ -1,2 +1,2 @@ #pragma once -#define APP_VERSION 1021 +#define APP_VERSION 1022