Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
Actuators driver for Asctec v2 motor controllers with the new I2C protocol. More...
Go to the source code of this file.
Data Structures | |
struct | ActuatorsAsctecV2 |
Macros | |
#define | actuators_asctec_v2_new_SetCommand(_v) |
#define | actuators_asctec_v2_new_SetNewAddr(_v) |
#define | actuators_asctec_v2_new_SetCurAddr(_v) |
#define | ActuatorAsctec_v2_newSet(_i, _v) { actuators_asctec_v2.cmds[_i] = _v; } |
#define | ActuatorsAsctec_v2_newInit() actuators_asctec_v2_init() |
#define | ActuatorsAsctec_v2_newCommit() actuators_asctec_v2_set() |
Enumerations | |
enum | actuators_asctec_v2_cmd { NONE, TEST, REVERSE, SET_ADDR, NONE, TEST, REVERSE, SET_ADDR } |
enum | actuators_asctec_v2_addr { FRONT, BACK, LEFT, RIGHT, FRONT, BACK, LEFT, RIGHT } |
Functions | |
void | actuators_asctec_v2_init (void) |
void | actuators_asctec_v2_set (void) |
Variables | |
struct ActuatorsAsctecV2 | actuators_asctec_v2 |
Actuators driver for Asctec v2 motor controllers with the new I2C protocol.
Definition in file actuators_asctec_v2_new.h.
struct ActuatorsAsctecV2 |
Definition at line 45 of file actuators_asctec_v2.h.
Data Fields | ||
---|---|---|
enum actuators_asctec_v2_cmd | cmd | |
int32_t | cmds[4] | |
enum actuators_asctec_v2_addr | cur_addr | |
struct i2c_transaction | i2c_trans | |
volatile uint32_t | nb_err | |
enum actuators_asctec_v2_addr | new_addr |
#define ActuatorAsctec_v2_newSet | ( | _i, | |
_v | |||
) | { actuators_asctec_v2.cmds[_i] = _v; } |
Definition at line 72 of file actuators_asctec_v2_new.h.
#define actuators_asctec_v2_new_SetCommand | ( | _v | ) |
Definition at line 57 of file actuators_asctec_v2_new.h.
#define actuators_asctec_v2_new_SetCurAddr | ( | _v | ) |
Definition at line 65 of file actuators_asctec_v2_new.h.
#define actuators_asctec_v2_new_SetNewAddr | ( | _v | ) |
Definition at line 61 of file actuators_asctec_v2_new.h.
#define ActuatorsAsctec_v2_newCommit | ( | ) | actuators_asctec_v2_set() |
Definition at line 74 of file actuators_asctec_v2_new.h.
#define ActuatorsAsctec_v2_newInit | ( | ) | actuators_asctec_v2_init() |
Definition at line 73 of file actuators_asctec_v2_new.h.
Enumerator | |
---|---|
FRONT | |
BACK | |
LEFT | |
RIGHT | |
FRONT | |
BACK | |
LEFT | |
RIGHT |
Definition at line 39 of file actuators_asctec_v2_new.h.
Enumerator | |
---|---|
NONE | |
TEST | |
REVERSE | |
SET_ADDR | |
NONE | |
TEST | |
REVERSE | |
SET_ADDR |
Definition at line 33 of file actuators_asctec_v2_new.h.
void actuators_asctec_v2_init | ( | void | ) |
Definition at line 38 of file actuators_asctec_v2.c.
References ACTUATORS_ASCTEC_V2_SLAVE_ADDR, ActuatorsAsctecV2::cmd, ActuatorsAsctecV2::cur_addr, FRONT, ActuatorsAsctecV2::i2c_trans, I2CTransSuccess, I2CTransTx, i2c_transaction::len_w, ActuatorsAsctecV2::nb_err, ActuatorsAsctecV2::new_addr, NONE, i2c_transaction::slave_addr, i2c_transaction::status, and i2c_transaction::type.
void actuators_asctec_v2_set | ( | void | ) |
Definition at line 51 of file actuators_asctec_v2.c.
References actuators_asctec_v2, ACTUATORS_ASCTEC_V2_SLAVE_ADDR, i2c_transaction::buf, ActuatorsAsctecV2::cmd, ActuatorsAsctecV2::cmds, crc, crc_update(), ActuatorsAsctecV2::cur_addr, i2c_receive(), i2c_submit(), ActuatorsAsctecV2::i2c_trans, i2c_transmit(), I2CTransDone, I2CTransFailed, I2CTransSuccess, I2CTransTx, i2c_transaction::len_w, ActuatorsAsctecV2::nb_err, ActuatorsAsctecV2::new_addr, NONE, REVERSE, SET_ADDR, i2c_transaction::status, SysTimeTimer, TEST, i2c_transaction::type, and USEC_OF_SEC.
struct ActuatorsAsctecV2 actuators_asctec_v2 |
Definition at line 36 of file actuators_asctec_v2.c.
Referenced by actuators_asctec_v2_set().