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
max11040.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 Martin Mueller
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 */
22
28#include "led.h"
29#include "mcu_periph/uart.h"
30#include "pprzlink/messages.h"
32#include "max11040.h"
33#include "adcs/max11040_hw.h"
34
42
43
54
56{
57#ifdef MAX11040_DEBUG
58 float max11040_values_f[16];
59 int i;
60
62// LED_TOGGLE(3);
63 for (i = 0; i < 16; i++) {
64 /* we assume that the buffer will be full always in this test mode anyway */
65 max11040_values_f[i] = (max11040_values[max11040_buf_in][i] * 2.2) / 8388608.0;
66 }
67
87 }
88#endif
89}
90
arch independent LED (Light Emitting Diodes) API
uint16_t foo
Definition main_demo5.c:58
volatile uint8_t max11040_data
Definition max11040.c:36
volatile uint8_t max11040_status
Definition max11040.c:35
volatile int32_t max11040_values[MAX11040_BUF_SIZE][MAXM_NB_CHAN]
Definition max11040.c:37
volatile uint32_t max11040_buf_in
Definition max11040.c:40
void max11040_periodic(void)
Definition max11040.c:55
volatile uint32_t max11040_buf_out
Definition max11040.c:41
volatile uint8_t max11040_count
Definition max11040.c:39
volatile uint32_t max11040_timestamp[MAX11040_BUF_SIZE]
Definition max11040.c:38
void max11040_init(void)
Definition max11040.c:44
#define MAX11040_BUF_SIZE
Definition max11040.h:9
#define MAXM_NB_CHAN
Definition max11040.h:7
#define MAX11040_RESET
Definition max11040.h:20
#define MAX11040_IDLE
Definition max11040.h:28
#define MAX11040_DATA_AVAILABLE
Definition max11040.h:29
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.