mirror of
https://gitee.com/peng_zhihui/Dummy-Robot
synced 2025-11-04 20:49:40 +08:00
50 lines
933 B
C
50 lines
933 B
C
#ifndef CONFIGURATIONS_H
|
|
#define CONFIGURATIONS_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
/*---------------------------- C Scope ---------------------------*/
|
|
#include <stdbool.h>
|
|
#include "stdint-gcc.h"
|
|
|
|
typedef enum configStatus_t
|
|
{
|
|
CONFIG_RESTORE = 0,
|
|
CONFIG_OK,
|
|
CONFIG_COMMIT
|
|
} configStatus_t;
|
|
|
|
|
|
typedef struct Config_t
|
|
{
|
|
configStatus_t configStatus;
|
|
uint32_t canNodeId;
|
|
int32_t encoderHomeOffset;
|
|
uint32_t defaultMode;
|
|
int32_t currentLimit;
|
|
int32_t velocityLimit;
|
|
int32_t velocityAcc;
|
|
int32_t calibrationCurrent;
|
|
int32_t dce_kp;
|
|
int32_t dce_kv;
|
|
int32_t dce_ki;
|
|
int32_t dce_kd;
|
|
bool enableMotorOnBoot;
|
|
bool enableStallProtect;
|
|
} BoardConfig_t;
|
|
|
|
extern BoardConfig_t boardConfig;
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
/*---------------------------- C++ Scope ---------------------------*/
|
|
|
|
#include <Platform/Memory/eeprom_interface.h>
|
|
#include "Motor/motor.h"
|
|
|
|
|
|
#endif
|
|
#endif
|