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_asctec_v2.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2009-2013 The Paparazzi Team
3 *
4 * This file is part of paparazzi.
5 *
6 * paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, write to
18 * the Free Software Foundation, 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
26#ifndef ACTUATORS_ASCTEC_V2_H
27#define ACTUATORS_ASCTEC_V2_H
28
29#include "mcu_periph/i2c.h"
30
31#include "generated/airframe.h"
32
38
44
53
54
56
57#define actuators_asctec_v2_SetCommand(_v) { \
58 actuators_asctec_v2.cmd = _v; \
59 }
60
61#define actuators_asctec_v2_SetNewAddr(_v) { \
62 actuators_asctec_v2.new_addr = _v; \
63 }
64
65#define actuators_asctec_v2_SetCurAddr(_v) { \
66 actuators_asctec_v2.cur_addr = _v; \
67 }
68
69extern void actuators_asctec_v2_init(void);
70extern void actuators_asctec_v2_set(void);
71
72#define ActuatorAsctec_v2Set(_i, _v) { actuators_asctec_v2.cmds[_i] = _v; }
73#define ActuatorsAsctec_v2Init() actuators_asctec_v2_init()
74#define ActuatorsAsctec_v2Commit() actuators_asctec_v2_set()
75
76
77#endif /* ACTUATORS_ASCTEC_H */
void actuators_asctec_v2_set(void)
void actuators_asctec_v2_init(void)
enum actuators_asctec_v2_addr cur_addr
struct ActuatorsAsctecV2 actuators_asctec_v2
actuators_asctec_v2_cmd
actuators_asctec_v2_addr
enum actuators_asctec_v2_addr new_addr
enum actuators_asctec_v2_cmd cmd
struct i2c_transaction i2c_trans
volatile uint32_t nb_err
I2C transaction structure.
Definition i2c.h:93
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.