Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
actuators_md25.c File Reference
+ Include dependency graph for actuators_md25.c:

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
 

Detailed Description

Author
Gautier Hattenberger Driver for the MD25 rover controller board

Definition in file actuators_md25.c.

Macro Definition Documentation

#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.

Function Documentation

void actuators_md25_set ( void  )

Variable Documentation

struct ActuatorsMD25 actuators_md25