30#ifndef ACTUATORS_DISCO_H_
31#define ACTUATORS_DISCO_H_
38#define ACTUATORS_DISCO_ADDR 0x10
41#define ACTUATORS_DISCO_SET_REF_SPEED 0x02
42#define ACTUATORS_DISCO_GET_OBS_DATA 0x20
43#define ACTUATORS_DISCO_START_PROP 0x40
44#define ACTUATORS_DISCO_TOGGLE_GPIO 0x4D
45#define ACTUATORS_DISCO_STOP_PROP 0x60
46#define ACTUATORS_DISCO_CLEAR_ERROR 0x80
47#define ACTUATORS_DISCO_PLAY_SOUND 0x82
48#define ACTUATORS_DISCO_GET_INFO 0xA0
51#define ACTUATORS_DISCO_PWM_NB 6
52#define ACTUATORS_DISCO_MOTOR_IDX 0
63#define ActuatorsDiscoSet(_i, _v) actuators_disco_set(_i, _v)
64#define ActuatorsDiscoCommit() actuators_disco_commit()
65#define ActuatorsDiscoInit() actuators_disco_init()
void actuators_disco_commit(void)
uint8_t status
Status flag.
#define ACTUATORS_DISCO_PWM_NB
Max number of PWM channels.
bool rpm_saturated
RPM saturation flag (bit 15 in obs data)
uint16_t rpm_obs
Measured RPM.
uint16_t motor_rpm
Motor RPM setpoint.
struct ActuatorsDisco actuators_disco
struct i2c_transaction i2c_trans
I2C transaction for communicating with the Disco BLDC driver.
struct PWM_Sysfs pwm[ACTUATORS_DISCO_PWM_NB]
Array of PWM outputs.
void actuators_disco_set(uint8_t idx, uint16_t val)
void actuators_disco_init(void)
I2C transaction structure.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
PWM servos handling using Linux sysfs.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.