Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
mcu.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010-2012 The Paparazzi team
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
27
28#ifndef MCU_H
29#define MCU_H
30
31
32#include "std.h"
33#include <mcu_arch.h>
34
39
49
55extern void mcu_init(void);
56
61extern void mcu_event(void);
62
68extern void mcu_reboot(enum reboot_state_t reboot_state);
69
75extern void mcu_energy_save(void);
76
83extern uint8_t mcu_get_uid(uint8_t *uid, uint8_t max_len);
84
88extern void board_init(void);
89
93extern void board_init2(void);
94
96
97#endif /* MCU_H */
98
99
void mcu_reboot(enum reboot_state_t reboot_state)
Reboot the MCU Should not be called during flight or ciritcal operations.
Definition mcu_arch.c:208
reboot_state_t
The requested reboot states.
Definition mcu.h:43
void board_init(void)
Optional board init function called at the start of mcu_init().
Definition board.c:72
void mcu_init(void)
Microcontroller peripherals initialization.
Definition mcu.c:104
void mcu_energy_save(void)
Puts the MCU in energy save mode This disables features of the MCU to save energy.
Definition mcu_arch.c:232
uint8_t mcu_get_uid(uint8_t *uid, uint8_t max_len)
Get the unique hardware ID of the MCU.
Definition mcu_arch.c:252
void mcu_event(void)
MCU event functions.
Definition mcu.c:275
void board_init2(void)
Optional board init function called at the end of mcu_init().
Definition board.c:92
@ MCU_REBOOT_BOOTLOADER
Go to bootloader.
Definition mcu.h:47
@ MCU_REBOOT_POWEROFF
Poweroff the device.
Definition mcu.h:45
@ MCU_REBOOT_NORMAL
Normal reboot.
Definition mcu.h:44
@ MCU_REBOOT_FAST
Fast reboot (skip bootloader).
Definition mcu.h:46
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.