APM:Libraries
libraries
AP_HAL_PX4
examples
simple
simple.cpp
Go to the documentation of this file.
1
/*
2
simple hello world sketch
3
Andrew Tridgell September 2011
4
*/
5
6
#include <
AP_HAL/AP_HAL.h
>
7
8
void
setup
();
9
void
loop
();
10
11
const
AP_HAL::HAL
&
hal
=
AP_HAL::get_HAL
();
12
13
void
setup
() {
14
hal.
console
->
printf
(
"hello world\n"
);
15
}
16
17
void
loop
()
18
{
19
hal.
scheduler
->
delay
(1000);
20
hal.
console
->
printf
(
"*\n"
);
21
}
22
23
AP_HAL_MAIN
();
AP_HAL.h
AP_HAL::HAL::console
AP_HAL::UARTDriver * console
Definition:
HAL.h:110
AP_HAL_MAIN
AP_HAL_MAIN()
AP_HAL::Scheduler::delay
virtual void delay(uint16_t ms)=0
AP_HAL::BetterStream::printf
virtual void printf(const char *,...) FMT_PRINTF(2
Definition:
BetterStream.cpp:5
AP_HAL::HAL
Definition:
HAL.h:26
setup
void setup()
Definition:
simple.cpp:13
hal
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
Definition:
simple.cpp:11
AP_HAL::get_HAL
const HAL & get_HAL()
Definition:
HAL_ChibiOS_Class.cpp:234
AP_HAL::HAL::scheduler
AP_HAL::Scheduler * scheduler
Definition:
HAL.h:114
loop
void loop()
Definition:
simple.cpp:17
Generated on Sun Jun 17 2018 14:18:49 for APM:Libraries by
1.8.13