Skip to content

Commit

Permalink
Add JY61P support
Browse files Browse the repository at this point in the history
  • Loading branch information
McflyWZX committed Mar 1, 2021
1 parent a39fa97 commit 8fcbf22
Show file tree
Hide file tree
Showing 21 changed files with 20,017 additions and 18,586 deletions.
5 changes: 3 additions & 2 deletions BUJIdesignCheck.ioc
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ I2C1.CustomTiming=Disabled
I2C1.I2C_Speed_Mode=I2C_Fast
I2C1.IPParameters=Timing,I2C_Speed_Mode,CustomTiming
I2C1.Timing=0x009034B6
I2C2.IPParameters=Timing
I2C2.Timing=0x10C0ECFF
I2C2.I2C_Speed_Mode=I2C_Fast
I2C2.IPParameters=Timing,I2C_Speed_Mode
I2C2.Timing=0x009034B6
KeepUserPlacement=false
Mcu.Family=STM32H7
Mcu.IP0=CORTEX_M7
Expand Down
2 changes: 1 addition & 1 deletion Core/Src/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void MX_I2C2_Init(void)
{

hi2c2.Instance = I2C2;
hi2c2.Init.Timing = 0x10C0ECFF;
hi2c2.Init.Timing = 0x009034B6;
hi2c2.Init.OwnAddress1 = 0;
hi2c2.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
hi2c2.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE;
Expand Down
5 changes: 4 additions & 1 deletion Core/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
/* USER CODE BEGIN Includes */
#include "OV2640.h"
#include "GPS.h"
#include <JY61P.h>
/* USER CODE END Includes */

/* Private typedef -----------------------------------------------------------*/
Expand All @@ -48,6 +49,7 @@ extern UART_HandleTypeDef huart4;
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
const GPS_INFO *testGPS;
float testAngle;
/* USER CODE END PM */

/* Private variables ---------------------------------------------------------*/
Expand Down Expand Up @@ -104,6 +106,7 @@ int main(void)
MX_TIM5_Init();
/* USER CODE BEGIN 2 */
GPS_Init(&huart4, NULL);
jy61p.Init(&hi2c2);
testGPS = get_GPS_INFO();
/* USER CODE END 2 */

Expand All @@ -112,8 +115,8 @@ int main(void)
while (1)
{
/* USER CODE END WHILE */

/* USER CODE BEGIN 3 */
testAngle = jy61p.ReadAngle(ROLL);
}
/* USER CODE END 3 */
}
Expand Down
Binary file modified Debug/BUJIdesignCheck.bin
Binary file not shown.
Binary file modified Debug/BUJIdesignCheck.elf
Binary file not shown.
Loading

0 comments on commit 8fcbf22

Please sign in to comment.