Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
uart_drop.c
Go to the documentation of this file.
1
/*
2
* Copyright (C) Freek van Tienen
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, see
18
* <http://www.gnu.org/licenses/>.
19
*/
26
#include "
modules/com/uart_drop.h
"
27
#include "
mcu_periph/uart.h
"
28
29
static
uint8_t
drop_string
[] =
"<Drop_Paintball_Now"
;
30
#define DROP_STRINGLEN 19
31
32
void
drop_ball
(
uint8_t
number) {
33
for
(
uint8_t
i = 0; i <
DROP_STRINGLEN
; i++)
34
uart_put_byte
(&UART_DROP_PORT,
drop_string
[i]);
35
36
uint8_t
last =
'>'
;
37
if
(number == 1) {
38
last =
'1'
;
39
}
else
if
(number == 2) {
40
last =
'2'
;
41
}
else
if
(number == 3) {
42
last =
'3'
;
43
}
else
if
(number == 4) {
44
last =
'4'
;
45
}
46
uart_put_byte
(&UART_DROP_PORT, last);
47
}
drop_string
static uint8_t drop_string[]
Definition:
uart_drop.c:29
uart.h
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
DROP_STRINGLEN
#define DROP_STRINGLEN
Definition:
uart_drop.c:30
drop_ball
void drop_ball(uint8_t number)
Definition:
uart_drop.c:32
uint8_t
unsigned char uint8_t
Definition:
types.h:14
uart_drop.h
uart_put_byte
void uart_put_byte(struct uart_periph *periph, uint8_t data)
Definition:
uart_arch.c:243
sw
airborne
modules
com
uart_drop.c
Generated on Tue Jun 21 2016 14:01:16 for Paparazzi UAS by
1.8.8