变更
This commit is contained in:
23
BoooomCTL/Controller/PreDrive/PreDrive.c
Normal file
23
BoooomCTL/Controller/PreDrive/PreDrive.c
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#include "PreDrive.h"
|
||||
|
||||
|
||||
|
||||
uint8_t PreDrive_Init_Buffur[2] = {0x00, 0x00};
|
||||
|
||||
|
||||
bool PreDrive_Init(void){
|
||||
while (HAL_I2C_Mem_Write(&hi2c3, 0x8e, 0x0c, I2C_MEMADD_SIZE_8BIT, PreDrive_Init_Buffur, 1, 1000) != HAL_OK) {}
|
||||
PreDrive_Init_Buffur[0] = 0x00;
|
||||
while (HAL_I2C_Mem_Write(&hi2c3, 0x8e, 0x0c, I2C_MEMADD_SIZE_8BIT, PreDrive_Init_Buffur, 1, 1000) != HAL_OK) {}
|
||||
PreDrive_Init_Buffur[0] = 0xff;
|
||||
while (HAL_I2C_Mem_Write(&hi2c3, 0x8e, 0x09, I2C_MEMADD_SIZE_8BIT, PreDrive_Init_Buffur, 1, 1000) != HAL_OK) {}
|
||||
PreDrive_Init_Buffur[0] = 0x00;
|
||||
while (HAL_I2C_Mem_Write(&hi2c3, 0x8e, 0x09, I2C_MEMADD_SIZE_8BIT, PreDrive_Init_Buffur, 1, 1000) != HAL_OK) {}
|
||||
HAL_Delay(10);
|
||||
|
||||
return 0;
|
||||
}
|
||||
13
BoooomCTL/Controller/PreDrive/PreDrive.h
Normal file
13
BoooomCTL/Controller/PreDrive/PreDrive.h
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// Created by ZK on 2023/3/14.
|
||||
//
|
||||
|
||||
#ifndef BOOOOMFOC_STSPIN32G4_EVB_PREDRIVE_H
|
||||
#define BOOOOMFOC_STSPIN32G4_EVB_PREDRIVE_H
|
||||
|
||||
#include "APP_Main.h"
|
||||
|
||||
bool PreDrive_Init(void);
|
||||
|
||||
|
||||
#endif //BOOOOMFOC_STSPIN32G4_EVB_PREDRIVE_H
|
||||
Reference in New Issue
Block a user