Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
Read Status and Config from MKK (Mikrokopter) BLDC motor controllers. More...
Go to the source code of this file.
Data Structures | |
struct | config_mkk_v2_struct |
struct | config_mkk_v2_eeprom_t |
Macros | |
#define | CONFIG_MKK_V2_MASK_SET_PWM_SCALING 0x01 |
#define | CONFIG_MKK_V2_MASK_SET_CURRENT_LIMIT 0x02 |
#define | CONFIG_MKK_V2_MASK_SET_TEMP_LIMIT 0x04 |
#define | CONFIG_MKK_V2_MASK_SET_CURRENT_SCALING 0x08 |
#define | CONFIG_MKK_V2_MASK_SET_BITCONFIG 0x10 |
#define | CONFIG_MKK_V2_MASK_RESET_CAPCOUNTER 0x20 |
#define | CONFIG_MKK_V2_MASK_SET_DEFAULT_PARAMS 0x40 |
#define | CONFIG_MKK_V2_MASK_SET_SAVE_EEPROM 0x80 |
#define | BITCONF_REVERSE_ROTATION 0x01 |
#define | config_mkk_v2_ResetDefault(_v) |
#define | config_mkk_v2_SetPwmScaling(_v) |
#define | config_mkk_v2_SetCurrentLimit(_v) |
#define | config_mkk_v2_SetTempLimit(_v) |
#define | config_mkk_v2_SetCurrentScaling(_v) |
#define | config_mkk_v2_SetBitConfig(_v) |
#define | config_mkk_v2_GetConfig(_v) |
Functions | |
void | config_mkk_v2_init (void) |
void | config_mkk_v2_periodic_read_status (void) |
void | config_mkk_v2_periodic_telemetry (void) |
void | config_mkk_v2_send_eeprom (void) |
void | config_mkk_v2_read_eeprom (void) |
Variables | |
struct config_mkk_v2_struct | config_mkk_v2 |
config_mkk_v2_eeprom_t | config_mkk_v2_eeprom |
Read Status and Config from MKK (Mikrokopter) BLDC motor controllers.
Definition in file config_mkk_v2.h.
struct config_mkk_v2_struct |
Definition at line 35 of file config_mkk_v2.h.
Data Fields | ||
---|---|---|
uint8_t | addr | |
int | nb_err | |
uint8_t | read_config | |
struct i2c_transaction | trans |
struct config_mkk_v2_eeprom_t |
#define BITCONF_REVERSE_ROTATION 0x01 |
Definition at line 76 of file config_mkk_v2.h.
#define config_mkk_v2_GetConfig | ( | _v | ) |
Definition at line 117 of file config_mkk_v2.h.
#define CONFIG_MKK_V2_MASK_RESET_CAPCOUNTER 0x20 |
Definition at line 72 of file config_mkk_v2.h.
#define CONFIG_MKK_V2_MASK_SET_BITCONFIG 0x10 |
Definition at line 71 of file config_mkk_v2.h.
#define CONFIG_MKK_V2_MASK_SET_CURRENT_LIMIT 0x02 |
Definition at line 68 of file config_mkk_v2.h.
#define CONFIG_MKK_V2_MASK_SET_CURRENT_SCALING 0x08 |
Definition at line 70 of file config_mkk_v2.h.
#define CONFIG_MKK_V2_MASK_SET_DEFAULT_PARAMS 0x40 |
Definition at line 73 of file config_mkk_v2.h.
#define CONFIG_MKK_V2_MASK_SET_PWM_SCALING 0x01 |
Definition at line 67 of file config_mkk_v2.h.
#define CONFIG_MKK_V2_MASK_SET_SAVE_EEPROM 0x80 |
Definition at line 74 of file config_mkk_v2.h.
#define CONFIG_MKK_V2_MASK_SET_TEMP_LIMIT 0x04 |
Definition at line 69 of file config_mkk_v2.h.
#define config_mkk_v2_ResetDefault | ( | _v | ) |
Definition at line 82 of file config_mkk_v2.h.
#define config_mkk_v2_SetBitConfig | ( | _v | ) |
Definition at line 111 of file config_mkk_v2.h.
#define config_mkk_v2_SetCurrentLimit | ( | _v | ) |
Definition at line 93 of file config_mkk_v2.h.
#define config_mkk_v2_SetCurrentScaling | ( | _v | ) |
Definition at line 105 of file config_mkk_v2.h.
#define config_mkk_v2_SetPwmScaling | ( | _v | ) |
Definition at line 87 of file config_mkk_v2.h.
#define config_mkk_v2_SetTempLimit | ( | _v | ) |
Definition at line 99 of file config_mkk_v2.h.
void config_mkk_v2_init | ( | void | ) |
Definition at line 31 of file config_mkk_v2.c.
References config_mkk_v2, I2CTransSuccess, config_mkk_v2_struct::nb_err, config_mkk_v2_struct::read_config, i2c_transaction::status, and config_mkk_v2_struct::trans.
void config_mkk_v2_periodic_read_status | ( | void | ) |
Definition at line 42 of file config_mkk_v2.c.
References config_mkk_v2, config_mkk_v2_parse_eeprom(), I2CTransDone, I2CTransFailed, I2CTransSuccess, config_mkk_v2_struct::read_config, i2c_transaction::status, and config_mkk_v2_struct::trans.
void config_mkk_v2_periodic_telemetry | ( | void | ) |
Definition at line 66 of file config_mkk_v2.c.
References actuators_mkk_v2, actuators_mkk_v2_telemetry_struct::Current, actuators_mkk_v2_struct::data, DefaultChannel, DefaultDevice, actuators_mkk_v2_telemetry_struct::MaxPWM, and actuators_mkk_v2_telemetry_struct::Temperature.
void config_mkk_v2_read_eeprom | ( | void | ) |
Definition at line 127 of file config_mkk_v2.c.
References config_mkk_v2_struct::addr, BL_READMODE_CONFIG, i2c_transaction::buf, config_mkk_v2, i2c_submit(), I2CTransTxRx, i2c_transaction::len_r, i2c_transaction::len_w, config_mkk_v2_struct::read_config, RETURN_IF_NOT_KILLMODE, i2c_transaction::slave_addr, config_mkk_v2_struct::trans, and i2c_transaction::type.
void config_mkk_v2_send_eeprom | ( | void | ) |
Definition at line 163 of file config_mkk_v2.c.
References config_mkk_v2_struct::addr, config_mkk_v2_eeprom_t::BitConfig, BL_READMODE_CONFIG, i2c_transaction::buf, config_mkk_v2, config_mkk_v2_crc(), config_mkk_v2_EEPROM_REVISION, config_mkk_v2_eeprom_t::CurrentLimit, config_mkk_v2_eeprom_t::CurrentScaling, i2c_submit(), I2CTransTx, i2c_transaction::len_w, config_mkk_v2_eeprom_t::PwmScaling, RETURN_IF_NOT_KILLMODE, config_mkk_v2_eeprom_t::revision, config_mkk_v2_eeprom_t::SetMask, i2c_transaction::slave_addr, config_mkk_v2_eeprom_t::TempLimit, config_mkk_v2_struct::trans, and i2c_transaction::type.
struct config_mkk_v2_struct config_mkk_v2 |
Definition at line 29 of file config_mkk_v2.c.
Referenced by config_mkk_v2_crc(), config_mkk_v2_init(), config_mkk_v2_parse_eeprom(), config_mkk_v2_periodic_read_status(), config_mkk_v2_read_eeprom(), and config_mkk_v2_send_eeprom().
config_mkk_v2_eeprom_t config_mkk_v2_eeprom |
Definition at line 114 of file config_mkk_v2.c.