Merge branch 'feature_soft_i2c'

This commit is contained in:
2025-11-18 14:54:09 +08:00
8 changed files with 314 additions and 191 deletions

View File

@@ -34,13 +34,13 @@
#include "delay.h"
#include "dfoc.h"
#include "mt6701.h"
#include "soft_i2c.h"
#include "ti_msp_dl_config.h"
#include <ctype.h>
#include <pwm.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
extern float angle_f;
extern bool gIsI2cError;
@@ -50,8 +50,8 @@ const float num_f = 0.123456f;
volatile uint16_t count = 0;
volatile float Target = 0; // 串口目标值
const int pp = 7; // 电机极对数
const int Dir = 1; // 电机编码器方向
const int pp = 7; // 电机极对数
const int Dir = -1; // 电机编码器方向
#define UART_PACKET_SIZE (6)
@@ -134,9 +134,8 @@ void TIMER_0_INST_IRQHandler(void) {
printf("Target is %f \n", Target);
// printf("%s",gUartRxPacket);
printf("angle is %f \n", angle_f);
DL_GPIO_togglePins(LED_PORT, LED_PA0_PIN);
Target = Target + 1;
break;
default:
break;