Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the source code of this file.
Macros | |
#define | MD25_REG_SPEED1 0x00 |
#define | MD25_REG_SPEED2 0x01 |
#define | MD25_REG_ENCODER1 0x02 |
#define | MD25_REG_ENCODER2 0x06 |
#define | MD25_REG_BAT 0x0A |
#define | MD25_REG_CURRENT1 0x0B |
#define | MD25_REG_CURRENT2 0x0C |
#define | MD25_REG_SOFT_REV 0x0D |
#define | MD25_REG_ACCEL_RATE 0x0E |
#define | MD25_REG_MODE 0x0F |
#define | MD25_REG_COMMAND 0x10 |
#define | MD25_CMD_RESET_ENCODERS 0x20 |
#define | MD25_CMD_NO_SPEED_REGUL 0x30 |
#define | MD25_CMD_SPEED_REGUL 0x31 |
#define | MD25_CMD_NO_MOTOR_TIMEOUT 0x32 |
#define | MD25_CMD_MOTOR_TIMEOUT 0x33 |
#define | MD25_MODE0 0 |
#define | MD25_MODE1 1 |
#define | MD25_MODE2 2 |
#define | MD25_MODE3 3 |
#define | ACTUATORS_MD25_MODE MD25_MODE0 |
#define | ACTUATORS_MD25_ACCEL_RATE 5 |
#define | ACTUATORS_MD25_I2C_ADDR 0xB0 |
#define | Int32FromBuf(_buf, _idx) ((int32_t)(((uint32_t)_buf[_idx]<<24) | ((uint32_t)_buf[_idx+1]<<16) | ((uint32_t)_buf[_idx+2]<<8) | _buf[_idx+3])) |
Functions | |
void | actuators_md25_init (void) |
void | actuators_md25_periodic (void) |
void | actuators_md25_set (void) |
void | actuators_md25_event (void) |
Variables | |
struct ActuatorsMD25 | actuators_md25 |
Definition in file actuators_md25.c.
#define ACTUATORS_MD25_ACCEL_RATE 5 |
Definition at line 62 of file actuators_md25.c.
Referenced by actuators_md25_init().
#define ACTUATORS_MD25_I2C_ADDR 0xB0 |
Definition at line 67 of file actuators_md25.c.
Referenced by actuators_md25_periodic(), and actuators_md25_set().
#define ACTUATORS_MD25_MODE MD25_MODE0 |
Definition at line 57 of file actuators_md25.c.
Referenced by actuators_md25_init().
#define Int32FromBuf | ( | _buf, | |
_idx | |||
) | ((int32_t)(((uint32_t)_buf[_idx]<<24) | ((uint32_t)_buf[_idx+1]<<16) | ((uint32_t)_buf[_idx+2]<<8) | _buf[_idx+3])) |
Definition at line 118 of file actuators_md25.c.
Referenced by actuators_md25_event().
#define MD25_CMD_MOTOR_TIMEOUT 0x33 |
Definition at line 47 of file actuators_md25.c.
#define MD25_CMD_NO_MOTOR_TIMEOUT 0x32 |
Definition at line 46 of file actuators_md25.c.
#define MD25_CMD_NO_SPEED_REGUL 0x30 |
Definition at line 44 of file actuators_md25.c.
#define MD25_CMD_RESET_ENCODERS 0x20 |
Definition at line 43 of file actuators_md25.c.
#define MD25_CMD_SPEED_REGUL 0x31 |
Definition at line 45 of file actuators_md25.c.
#define MD25_MODE0 0 |
Definition at line 50 of file actuators_md25.c.
#define MD25_MODE1 1 |
Definition at line 51 of file actuators_md25.c.
#define MD25_MODE2 2 |
Definition at line 52 of file actuators_md25.c.
#define MD25_MODE3 3 |
Definition at line 53 of file actuators_md25.c.
#define MD25_REG_ACCEL_RATE 0x0E |
Definition at line 39 of file actuators_md25.c.
Referenced by actuators_md25_periodic().
#define MD25_REG_BAT 0x0A |
Definition at line 35 of file actuators_md25.c.
#define MD25_REG_COMMAND 0x10 |
Definition at line 41 of file actuators_md25.c.
#define MD25_REG_CURRENT1 0x0B |
Definition at line 36 of file actuators_md25.c.
#define MD25_REG_CURRENT2 0x0C |
Definition at line 37 of file actuators_md25.c.
#define MD25_REG_ENCODER1 0x02 |
Definition at line 33 of file actuators_md25.c.
Referenced by actuators_md25_periodic().
#define MD25_REG_ENCODER2 0x06 |
Definition at line 34 of file actuators_md25.c.
#define MD25_REG_MODE 0x0F |
Definition at line 40 of file actuators_md25.c.
#define MD25_REG_SOFT_REV 0x0D |
Definition at line 38 of file actuators_md25.c.
#define MD25_REG_SPEED1 0x00 |
Definition at line 31 of file actuators_md25.c.
Referenced by actuators_md25_set().
#define MD25_REG_SPEED2 0x01 |
Definition at line 32 of file actuators_md25.c.
void actuators_md25_event | ( | void | ) |
Definition at line 120 of file actuators_md25.c.
References actuators_md25, ActuatorsMD25::bat, i2c_transaction::buf, ActuatorsMD25::current, ActuatorsMD25::encoders, I2CTransDone, I2CTransFailed, I2CTransSuccess, ActuatorsMD25::initialized, Int32FromBuf, i2c_transaction::status, ActuatorsMD25::trans_cmd, and ActuatorsMD25::trans_sensors.
void actuators_md25_init | ( | void | ) |
Definition at line 75 of file actuators_md25.c.
References ActuatorsMD25::accel_rate, ACTUATORS_MD25_ACCEL_RATE, ACTUATORS_MD25_MODE, ActuatorsMD25::bat, ActuatorsMD25::cmds, ActuatorsMD25::encoders, I2CTransDone, ActuatorsMD25::initialized, ActuatorsMD25::mode, i2c_transaction::status, ActuatorsMD25::trans_cmd, and ActuatorsMD25::trans_sensors.
void actuators_md25_periodic | ( | void | ) |
Definition at line 90 of file actuators_md25.c.
References ActuatorsMD25::accel_rate, actuators_md25, ACTUATORS_MD25_I2C_ADDR, i2c_transaction::buf, i2c_transceive(), i2c_transmit(), I2CTransDone, ActuatorsMD25::initialized, MD25_REG_ACCEL_RATE, MD25_REG_ENCODER1, ActuatorsMD25::mode, i2c_transaction::status, and ActuatorsMD25::trans_sensors.
void actuators_md25_set | ( | void | ) |
Definition at line 108 of file actuators_md25.c.
References actuators_md25, ACTUATORS_MD25_I2C_ADDR, i2c_transaction::buf, ActuatorsMD25::cmds, i2c_transmit(), I2CTransDone, ActuatorsMD25::initialized, MD25_REG_SPEED1, i2c_transaction::status, and ActuatorsMD25::trans_cmd.
struct ActuatorsMD25 actuators_md25 |
Definition at line 73 of file actuators_md25.c.
Referenced by actuators_md25_event(), actuators_md25_periodic(), and actuators_md25_set().