Macros | Functions
conf_general.h File Reference
#include "datatypes.h"

Go to the source code of this file.

Macros

#define FW_VERSION_MAJOR   1
 
#define FW_VERSION_MINOR   12
 
#define AUTO_PRINT_FAULTS   0
 
#define SYSTEM_CORE_CLOCK   168000000
 
#define HW_VERSION_46
 
#define MCCONF_OUTRUNNER2
 
#define ENCODER_ENABLE   0
 
#define ENCODER_COUNTS   14400
 
#define CAN_ENABLE   1
 
#define LED_EXT_BATT_LOW   28.0
 
#define LED_EXT_BATT_HIGH   33.0
 
#define WS2811_ENABLE   0
 
#define WS2811_CLK_HZ   800000
 
#define WS2811_LED_NUM   14
 
#define WS2811_USE_CH2   1
 
#define SERVO_OUT_ENABLE   0
 
#define SERVO_OUT_SIMPLE   1
 
#define SERVO_OUT_PULSE_MIN_US   1000
 
#define SERVO_OUT_PULSE_MAX_US   2000
 
#define SERVO_OUT_RATE_HZ   50
 
#define VDIV_CORR   ((VIN_R2 / (VIN_R2 + VIN_R1)) / (2.2 / (2.2 + 33.0)))
 
#define V_REG   3.3
 

Functions

void conf_general_init (void)
 
void conf_general_read_app_configuration (app_configuration *conf)
 
bool conf_general_store_app_configuration (app_configuration *conf)
 
void conf_general_read_mc_configuration (mc_configuration *conf)
 
bool conf_general_store_mc_configuration (mc_configuration *conf)
 
bool conf_general_detect_motor_param (float current, float min_rpm, float low_duty, float *int_limit, float *bemf_coupling_k, int8_t *hall_table, int *hall_res)
 

Macro Definition Documentation

#define AUTO_PRINT_FAULTS   0
#define CAN_ENABLE   1
#define ENCODER_COUNTS   14400
#define ENCODER_ENABLE   0
#define FW_VERSION_MAJOR   1
#define FW_VERSION_MINOR   12
#define HW_VERSION_46
#define LED_EXT_BATT_HIGH   33.0
#define LED_EXT_BATT_LOW   28.0
#define MCCONF_OUTRUNNER2
#define SERVO_OUT_ENABLE   0
#define SERVO_OUT_PULSE_MAX_US   2000
#define SERVO_OUT_PULSE_MIN_US   1000
#define SERVO_OUT_RATE_HZ   50
#define SERVO_OUT_SIMPLE   1
#define SYSTEM_CORE_CLOCK   168000000
#define V_REG   3.3
#define VDIV_CORR   ((VIN_R2 / (VIN_R2 + VIN_R1)) / (2.2 / (2.2 + 33.0)))
#define WS2811_CLK_HZ   800000
#define WS2811_ENABLE   0
#define WS2811_LED_NUM   14
#define WS2811_USE_CH2   1

Function Documentation

bool conf_general_detect_motor_param ( float  current,
float  min_rpm,
float  low_duty,
float *  int_limit,
float *  bemf_coupling_k,
int8_t *  hall_table,
int *  hall_res 
)
void conf_general_init ( void  )
void conf_general_read_app_configuration ( app_configuration conf)

Read app_configuration from EEPROM. If this fails, default values will be used.

Parameters
confA pointer to a app_configuration struct to write the read configuration to.
void conf_general_read_mc_configuration ( mc_configuration conf)

Read mc_configuration from EEPROM. If this fails, default values will be used.

Parameters
confA pointer to a mc_configuration struct to write the read configuration to.
bool conf_general_store_app_configuration ( app_configuration conf)

Write app_configuration to EEPROM.

Parameters
confA pointer to the configuration that should be stored.
bool conf_general_store_mc_configuration ( mc_configuration conf)

Write mc_configuration to EEPROM.

Parameters
confA pointer to the configuration that should be stored.