Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
config_mkk_v2.h File Reference
#include "std.h"
#include "mcu_periph/i2c.h"
+ Include dependency graph for config_mkk_v2.h:
+ This graph shows which files directly or indirectly include this file:

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
 

Detailed Description

Read Status and Config from MKK (Mikrokopter) BLDC motor controllers

Definition in file config_mkk_v2.h.


Data Structure Documentation

◆ config_mkk_v2_struct

struct config_mkk_v2_struct

Definition at line 35 of file config_mkk_v2.h.

+ Collaboration diagram for config_mkk_v2_struct:
Data Fields
uint8_t addr
int nb_err
uint8_t read_config
struct i2c_transaction trans

◆ config_mkk_v2_eeprom_t

struct config_mkk_v2_eeprom_t

Definition at line 53 of file config_mkk_v2.h.

Data Fields
uint8_t BitConfig
uint8_t crc
uint8_t CurrentLimit
uint8_t CurrentScaling
uint8_t PwmScaling
uint8_t revision
uint8_t SetMask
uint8_t TempLimit

Macro Definition Documentation

◆ BITCONF_REVERSE_ROTATION

#define BITCONF_REVERSE_ROTATION   0x01

Definition at line 76 of file config_mkk_v2.h.

◆ config_mkk_v2_GetConfig

#define config_mkk_v2_GetConfig (   _v)
Value:
{ \
config_mkk_v2.addr = _v; \
config_mkk_v2_read_eeprom(); \
}

Definition at line 117 of file config_mkk_v2.h.

◆ CONFIG_MKK_V2_MASK_RESET_CAPCOUNTER

#define CONFIG_MKK_V2_MASK_RESET_CAPCOUNTER   0x20

Definition at line 72 of file config_mkk_v2.h.

◆ CONFIG_MKK_V2_MASK_SET_BITCONFIG

#define CONFIG_MKK_V2_MASK_SET_BITCONFIG   0x10

Definition at line 71 of file config_mkk_v2.h.

◆ CONFIG_MKK_V2_MASK_SET_CURRENT_LIMIT

#define CONFIG_MKK_V2_MASK_SET_CURRENT_LIMIT   0x02

Definition at line 68 of file config_mkk_v2.h.

◆ CONFIG_MKK_V2_MASK_SET_CURRENT_SCALING

#define CONFIG_MKK_V2_MASK_SET_CURRENT_SCALING   0x08

Definition at line 70 of file config_mkk_v2.h.

◆ CONFIG_MKK_V2_MASK_SET_DEFAULT_PARAMS

#define CONFIG_MKK_V2_MASK_SET_DEFAULT_PARAMS   0x40

Definition at line 73 of file config_mkk_v2.h.

◆ CONFIG_MKK_V2_MASK_SET_PWM_SCALING

#define CONFIG_MKK_V2_MASK_SET_PWM_SCALING   0x01

Definition at line 67 of file config_mkk_v2.h.

◆ CONFIG_MKK_V2_MASK_SET_SAVE_EEPROM

#define CONFIG_MKK_V2_MASK_SET_SAVE_EEPROM   0x80

Definition at line 74 of file config_mkk_v2.h.

◆ CONFIG_MKK_V2_MASK_SET_TEMP_LIMIT

#define CONFIG_MKK_V2_MASK_SET_TEMP_LIMIT   0x04

Definition at line 69 of file config_mkk_v2.h.

◆ config_mkk_v2_ResetDefault

#define config_mkk_v2_ResetDefault (   _v)
Value:
{ \
config_mkk_v2_send_eeprom(); \
}

Definition at line 82 of file config_mkk_v2.h.

◆ config_mkk_v2_SetBitConfig

#define config_mkk_v2_SetBitConfig (   _v)
Value:
{ \
config_mkk_v2_eeprom.BitConfig = _v; \
config_mkk_v2_send_eeprom(); \
}

Definition at line 111 of file config_mkk_v2.h.

◆ config_mkk_v2_SetCurrentLimit

#define config_mkk_v2_SetCurrentLimit (   _v)
Value:
{ \
config_mkk_v2_eeprom.CurrentLimit = _v; \
config_mkk_v2_send_eeprom(); \
}

Definition at line 93 of file config_mkk_v2.h.

◆ config_mkk_v2_SetCurrentScaling

#define config_mkk_v2_SetCurrentScaling (   _v)
Value:
{ \
config_mkk_v2_eeprom.CurrentScaling = _v; \
config_mkk_v2_send_eeprom(); \
}

Definition at line 105 of file config_mkk_v2.h.

◆ config_mkk_v2_SetPwmScaling

#define config_mkk_v2_SetPwmScaling (   _v)
Value:
{ \
config_mkk_v2_eeprom.PwmScaling = _v; \
config_mkk_v2_send_eeprom(); \
}

Definition at line 87 of file config_mkk_v2.h.

◆ config_mkk_v2_SetTempLimit

#define config_mkk_v2_SetTempLimit (   _v)
Value:
{ \
config_mkk_v2_eeprom.TempLimit = _v; \
config_mkk_v2_send_eeprom(); \
}

Definition at line 99 of file config_mkk_v2.h.

Function Documentation

◆ config_mkk_v2_init()

◆ config_mkk_v2_periodic_read_status()

void config_mkk_v2_periodic_read_status ( void  )

◆ config_mkk_v2_periodic_telemetry()

◆ config_mkk_v2_read_eeprom()

◆ config_mkk_v2_send_eeprom()

Variable Documentation

◆ config_mkk_v2

◆ config_mkk_v2_eeprom

config_mkk_v2_eeprom_t config_mkk_v2_eeprom

Definition at line 114 of file config_mkk_v2.c.

Referenced by config_mkk_v2_parse_eeprom(), and config_mkk_v2_send_eeprom().

CONFIG_MKK_V2_MASK_SET_CURRENT_SCALING
#define CONFIG_MKK_V2_MASK_SET_CURRENT_SCALING
Definition: config_mkk_v2.h:70
CONFIG_MKK_V2_MASK_SET_BITCONFIG
#define CONFIG_MKK_V2_MASK_SET_BITCONFIG
Definition: config_mkk_v2.h:71
CONFIG_MKK_V2_MASK_SET_TEMP_LIMIT
#define CONFIG_MKK_V2_MASK_SET_TEMP_LIMIT
Definition: config_mkk_v2.h:69
CONFIG_MKK_V2_MASK_SET_SAVE_EEPROM
#define CONFIG_MKK_V2_MASK_SET_SAVE_EEPROM
Definition: config_mkk_v2.h:74
CONFIG_MKK_V2_MASK_SET_PWM_SCALING
#define CONFIG_MKK_V2_MASK_SET_PWM_SCALING
Definition: config_mkk_v2.h:67
CONFIG_MKK_V2_MASK_SET_CURRENT_LIMIT
#define CONFIG_MKK_V2_MASK_SET_CURRENT_LIMIT
Definition: config_mkk_v2.h:68
CONFIG_MKK_V2_MASK_SET_DEFAULT_PARAMS
#define CONFIG_MKK_V2_MASK_SET_DEFAULT_PARAMS
Definition: config_mkk_v2.h:73