Browse Source

update

master
zhaohe 2 years ago
parent
commit
326f091a19
  1. 4
      components/iflytop_can_slave_modules/io_control_service.cpp
  2. 5
      components/iflytop_can_slave_v1/iflytop_can_slave.hpp
  3. 4
      components/tmc/ic/ztmc4361A.cpp
  4. 3
      components/tmc/ic/ztmc4361A.hpp
  5. 3
      components/tmc/ic/ztmc5130.cpp
  6. 4
      components/tmc/ic/ztmc5130.hpp
  7. 2
      hal/zcan.cpp

4
components/iflytop_can_slave_modules/io_control_service.cpp

@ -1,4 +1,5 @@
#include "io_control_service.hpp"
#ifdef HAL_CAN_MODULE_ENABLED
using namespace iflytop;
void IOControlService::initialize(IflytopCanProtocolStackProcesser* protocol_processer, int32_t regStartOff, write_io_cb_t write_io_cb,
read_io_cb_t read_io_cb) {
@ -101,4 +102,5 @@ uint32_t IOControlService::readgpiotable0() {
return val;
}
// uint32_t IOControlService::readgpiotable1() {}
// uint32_t IOControlService::readgpiotable1() {}
#endif

5
components/iflytop_can_slave_v1/iflytop_can_slave.hpp

@ -4,6 +4,8 @@
#pragma once
#include "iflytop_can_slave_protocol.hpp"
#ifdef HAL_CAN_MODULE_ENABLED
/**
* @brief
*
@ -239,4 +241,5 @@ class ICPSUtils {
static int32_t mutiValToRegVal(int8_t var1, int8_t var2, int8_t var3, int8_t var4) { return (var4 << 24) | (var3 << 16) | (var2 << 8) | (var1 & 0xFF); }
};
} // namespace iflytop
} // namespace iflytop
#endif

4
components/tmc/ic/ztmc4361A.cpp

@ -1,6 +1,8 @@
#if 1
#include "ztmc4361A.hpp"
#ifdef HAL_SPI_MODULE_ENABLED
#include <stdarg.h>
#include "../basic/basic.hpp"
@ -361,3 +363,5 @@ void TMC4361A::driverIC_setIHOLD_IRUN(uint8_t ihold, uint8_t irun, uint16_t ihol
#endif
#endif
#endif

3
components/tmc/ic/ztmc4361A.hpp

@ -13,6 +13,8 @@ extern "C" {
#include "TMC2160\TMC2160.h"
#include "TMC4361A\TMC4361A.h"
}
#ifdef HAL_SPI_MODULE_ENABLED
namespace iflytop {
#define TMC4361A_LISTENER_MAX 5
class TMC4361A : public IStepperMotor {
@ -153,3 +155,4 @@ class TMC4361A : public IStepperMotor {
} // namespace iflytop
#endif
#endif

3
components/tmc/ic/ztmc5130.cpp

@ -1,4 +1,6 @@
#include "ztmc5130.hpp"
#ifdef HAL_SPI_MODULE_ENABLED
using namespace iflytop;
/**
@ -192,3 +194,4 @@ int32_t TMC5130::readInt(uint8_t address) {
return ((uint32_t)data[1] << 24) | ((uint32_t)data[2] << 16) | (data[3] << 8) | data[4];
}
#endif

4
components/tmc/ic/ztmc5130.hpp

@ -9,6 +9,7 @@
extern "C" {
#include "TMC5130\TMC5130.h"
}
#ifdef HAL_SPI_MODULE_ENABLED
namespace iflytop {
#define TMC5130_LISTENER_MAX 5
/**
@ -138,4 +139,5 @@ class TMC5130 : public IStepperMotor {
private:
uint32_t haspassedms(uint32_t now, uint32_t last);
};
} // namespace iflytop
} // namespace iflytop
#endif

2
hal/zcan.cpp

@ -1,8 +1,8 @@
#include "zcan.hpp"
#ifdef HAL_CAN_MODULE_ENABLED
extern "C" {
#ifdef HAL_CAN_MODULE_ENABLED
void HAL_CAN_TxMailbox0CompleteCallback(CAN_HandleTypeDef *hcan) {
for (int i = 0; i < iflytop::ZCanIRQDispatcher::instance().m_listenerNum; i++) {
iflytop::ZCanIRQDispatcher::instance().m_listener[i]->STM32_HAL_onCAN_TxMailbox0Complete(hcan);

Loading…
Cancel
Save