Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
actuators.h
Go to the documentation of this file.
1
/*
2
*
3
* Copyright (C) 2014 Freek van Tienen <freek.v.tienen@gmail.com>
4
*
5
* This file is part of paparazzi.
6
*
7
* paparazzi is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2, or (at your option)
10
* any later version.
11
*
12
* paparazzi is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with paparazzi; see the file COPYING. If not, write to
19
* the Free Software Foundation, 59 Temple Place - Suite 330,
20
* Boston, MA 02111-1307, USA.
21
*/
22
28
#ifndef ACTUATORS_BEBOP_RAW_H_
29
#define ACTUATORS_BEBOP_RAW_H_
30
31
#include <stdint.h>
32
#include "
mcu_periph/i2c.h
"
33
34
// full 8-bit address
35
#define ACTUATORS_BEBOP_ADDR 0x10
36
37
// I2C Commands
38
#define ACTUATORS_BEBOP_SET_REF_SPEED 0x02
39
#define ACTUATORS_BEBOP_GET_OBS_DATA 0x20
40
#define ACTUATORS_BEBOP_START_PROP 0x40
41
#define ACTUATORS_BEBOP_TOGGLE_GPIO 0x4D
42
#define ACTUATORS_BEBOP_STOP_PROP 0x60
43
#define ACTUATORS_BEBOP_CLEAR_ERROR 0x80
44
#define ACTUATORS_BEBOP_PLAY_SOUND 0x82
45
#define ACTUATORS_BEBOP_GET_INFO 0xA0
46
47
48
struct
ActuatorsBebop
{
49
struct
i2c_transaction
i2c_trans
;
50
uint16_t
rpm_ref
[4];
51
uint16_t
rpm_obs
[4];
52
uint8_t
led
;
53
};
54
55
#define ActuatorsBebopSet(_i, _v) { actuators_bebop.rpm_ref[_i] = _v; }
56
#define ActuatorsBebopCommit() actuators_bebop_commit();
57
#define ActuatorsBebopInit() actuators_bebop_init();
58
59
extern
struct
ActuatorsBebop
actuators_bebop
;
60
extern
void
actuators_bebop_commit
(
void
);
61
extern
void
actuators_bebop_init
(
void
);
62
63
#endif
/* ACTUATORS_BEBOP_RAW_H_ */
uint16_t
unsigned short uint16_t
Definition:
types.h:16
actuators_bebop_init
void actuators_bebop_init(void)
Definition:
actuators.c:61
ActuatorsBebop::led
uint8_t led
Current led status.
Definition:
actuators.h:52
uint8_t
unsigned char uint8_t
Definition:
types.h:14
ActuatorsBebop::i2c_trans
struct i2c_transaction i2c_trans
I2C transaction for communicating with the bebop BLDC driver.
Definition:
actuators.h:49
actuators_bebop
struct ActuatorsBebop actuators_bebop
Definition:
actuators.c:58
i2c_transaction
I2C transaction structure.
Definition:
i2c.h:93
ActuatorsBebop::rpm_obs
uint16_t rpm_obs[4]
Observed RPM.
Definition:
actuators.h:51
ActuatorsBebop::rpm_ref
uint16_t rpm_ref[4]
Reference RPM.
Definition:
actuators.h:50
ActuatorsBebop
Definition:
actuators.h:48
i2c.h
actuators_bebop_commit
void actuators_bebop_commit(void)
Definition:
actuators.c:73
sw
airborne
boards
bebop
actuators.h
Generated on Tue Feb 1 2022 13:51:13 for Paparazzi UAS by
1.8.17