Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
main_demo6.c
Go to the documentation of this file.
1 #include "std.h"
2 #include "mcu.h"
3 #include "mcu_periph/sys_time.h"
4 #include "led.h"
5 #include "interrupt_hw.h"
7 
8 #include "messages.h"
10 
11 static inline void main_init( void );
12 static inline void main_periodic_task( void );
13 
14 int main( void ) {
15  main_init();
16  while(1) {
19  }
20  return 0;
21 }
22 
23 static inline void main_init( void ) {
24  mcu_init();
26  usb_serial_init();
28 }
29 
30 static inline void main_periodic_task( void ) {
31  LED_TOGGLE(1);
32  //uint16_t time_sec = sys_time.nb_sec;
33  // DOWNLINK_SEND_TAKEOFF(&time_sec);
34  usb_serial_transmit( 'A' );
35  usb_serial_transmit( '\n' );
36 
37 }
static void main_init(void)
Definition: main_demo6.c:23
#define PERIODIC_FREQUENCY
Definition: imu_aspirin2.c:54
#define mcu_int_enable()
Definition: mcu_arch.h:32
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
int main(void)
Definition: main_demo6.c:14
static void main_periodic_task(void)
Definition: main_demo6.c:30
arch independent LED (Light Emitting Diodes) API
void mcu_init(void)
Definition: mcu.c:57
arch independent USB API