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_init(void)
struct i2c_transaction i2c_trans
I2C transaction for communicating with the Disco BLDC driver.
PWM servos handling using Linux sysfs.
uint8_t status
Status flag.
bool rpm_saturated
RPM saturation flag (bit 15 in obs data)
void actuators_disco_commit(void)
uint16_t motor_rpm
Motor RPM setpoint.
struct ActuatorsDisco actuators_disco
I2C transaction structure.
#define ACTUATORS_DISCO_PWM_NB
Max number of PWM channels.
uint16_t rpm_obs
Measured RPM.
void actuators_disco_set(uint8_t idx, uint16_t val)
struct PWM_Sysfs pwm[ACTUATORS_DISCO_PWM_NB]
Array of PWM outputs.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.