Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
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
60extern void actuators_bebop_commit(void);
61extern void actuators_bebop_init(void);
62
63#endif /* ACTUATORS_BEBOP_RAW_H_ */
uint8_t led
Current led status.
Definition actuators.h:52
void actuators_bebop_init(void)
Definition actuators.c:61
struct i2c_transaction i2c_trans
I2C transaction for communicating with the bebop BLDC driver.
Definition actuators.h:49
uint16_t rpm_ref[4]
Reference RPM.
Definition actuators.h:50
uint16_t rpm_obs[4]
Observed RPM.
Definition actuators.h:51
void actuators_bebop_commit(void)
Definition actuators.c:73
struct ActuatorsBebop actuators_bebop
Definition actuators.c:58
I2C transaction structure.
Definition i2c.h:93
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.