Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
main_demo3.c
Go to the documentation of this file.
1 
2 #include "std.h"
3 #include "mcu.h"
4 #include "mcu_periph/sys_time.h"
5 #include "led.h"
6 #include "mcu_periph/uart.h"
7 #include "print.h"
8 
9 static inline void main_init( void );
10 static inline void main_periodic_task( void );
11 
12 int main( void ) {
13  main_init();
14  while(1) {
17  }
18  return 0;
19 }
20 
21 static inline void main_init( void ) {
22  mcu_init();
24  uart0_init_tx();
26 }
27 
28 static inline void main_periodic_task( void ) {
29  LED_TOGGLE(1);
30  Uart0PrintString("demo3 running since ");
31  Uart0PrintHex32(cpu_time_sec);
32  Uart0PrintString(" seconds\n");
33 }
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
int main(void)
Definition: main_demo3.c:12
static void main_periodic_task(void)
Definition: main_demo3.c:28
#define cpu_time_sec
Definition: sys_time.h:64
#define PERIODIC_FREQUENCY
Definition: imu_aspirin2.c:54
#define mcu_int_enable()
Definition: mcu_arch.h:32
static void main_init(void)
Definition: main_demo3.c:21
Architecture independent timing functions.
int sys_time_register_timer(float duration, sys_time_cb cb)
Register a new system timer.
Definition: sys_time.c:35
#define LED_TOGGLE(i)
Definition: led_hw.h:30
static bool_t sys_time_check_and_ack_timer(tid_t id)
Definition: sys_time.h:90
arch independent mcu ( Micro Controller Unit ) utilities
arch independent LED (Light Emitting Diodes) API
void mcu_init(void)
Definition: mcu.c:57