first commit
This commit is contained in:
21
APP/tle5012b.h
Normal file
21
APP/tle5012b.h
Normal file
@ -0,0 +1,21 @@
|
||||
//
|
||||
// Created by hu123456 on 2024/1/16.
|
||||
//
|
||||
|
||||
#ifndef FOC_N_TLE5012B_H
|
||||
#define FOC_N_TLE5012B_H
|
||||
#include "mymain.h"
|
||||
|
||||
#define READ_ANGLE_VALUE 0x8020 //8021 // 20: NO CRC
|
||||
#define READ_SPEED_VALUE 0x8030 //8031 // 30: NO CRC
|
||||
#define TLE_CS1_ENABLE HAL_GPIO_WritePin( GPIOA, GPIO_PIN_3, 0 )
|
||||
#define TLE_CS1_DISABLE HAL_GPIO_WritePin( GPIOA, GPIO_PIN_3, 1 )
|
||||
#define TLE_CS2_ENABLE HAL_GPIO_WritePin( GPIOA, GPIO_PIN_4, 0 )
|
||||
#define TLE_CS2_DISABLE HAL_GPIO_WritePin( GPIOA, GPIO_PIN_4, 1 )
|
||||
|
||||
|
||||
|
||||
void tle5012b_init(void);
|
||||
double getAngle(unsigned char motor);
|
||||
uint16_t ReadTLE5012B_1(uint16_t u16RegValue);
|
||||
#endif //FOC_N_TLE5012B_H
|
Reference in New Issue
Block a user