Browse Source

update

master
zhaohe 2 years ago
parent
commit
8ed37f58ad
  1. 6
      components/modbus/modbus_block_host.cpp

6
components/modbus/modbus_block_host.cpp

@ -2,7 +2,7 @@
#include "modbus_basic.hpp"
using namespace iflytop;
#define DEBUG 0
#define PRV_DEBUG 0
ModbusBlockHost::ModbusBlockHost() {}
ModbusBlockHost::~ModbusBlockHost() {}
@ -16,7 +16,7 @@ void ModbusBlockHost::cleanRxBuff() { //
void ModbusBlockHost::uarttx(uint8_t *buff, size_t len) {
ZASSERT(len < sizeof(txbuff));
#if DEBUG
#if PRV_DEBUG
printf("uarttx:\n");
for (size_t i = 0; i < len; i++) {
printf("%02x ", buff[i]);
@ -30,7 +30,7 @@ bool ModbusBlockHost::uartrx(uint8_t *buff, size_t len, int overtimems) {
ZASSERT(len < sizeof(rxbuff));
status = HAL_UART_Receive(huart, buff, len, overtimems);
#if DEBUG
#if PRV_DEBUG
if (status == HAL_OK) {
printf("uartrx:");
for (size_t i = 0; i < len; i++) {

Loading…
Cancel
Save