|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Topics | |
| I2C Interface | |
| SPI Interface | |
Enumerations | |
| enum | reboot_state_t { MCU_REBOOT_NORMAL , MCU_REBOOT_POWEROFF , MCU_REBOOT_FAST , MCU_REBOOT_BOOTLOADER } |
| The requested reboot states. More... | |
Functions | |
| void | mcu_init (void) |
| Microcontroller peripherals initialization. | |
| void | mcu_event (void) |
| MCU event functions. | |
| void | mcu_reboot (enum reboot_state_t reboot_state) |
| Reboot the MCU Should not be called during flight or ciritcal operations. | |
| void | mcu_energy_save (void) |
| Puts the MCU in energy save mode This disables features of the MCU to save energy. | |
| uint8_t | mcu_get_uid (uint8_t *uid, uint8_t max_len) |
| Get the unique hardware ID of the MCU. | |
| void | board_init (void) |
| Optional board init function called at the start of mcu_init(). | |
| void | board_init2 (void) |
| Optional board init function called at the end of mcu_init(). | |
| enum reboot_state_t |
|
extern |
Optional board init function called at the start of mcu_init().
Definition at line 72 of file board.c.
References kill_gracefull().
Referenced by mcu_init().
|
extern |
Optional board init function called at the end of mcu_init().
Definition at line 92 of file board.c.
Referenced by mcu_init().
|
extern |
Puts the MCU in energy save mode This disables features of the MCU to save energy.
This is used for example to quickly write to the SD card while powering off.
Puts the MCU in energy save mode This disables features of the MCU to save energy.
Definition at line 232 of file mcu_arch.c.
References BOARD_GROUP_DECLFOREACH, ENERGY_SAVE_INPUTS, and ENERGY_SAVE_LOWS.
|
extern |
MCU event functions.
Calls the event functions of used peripherals like i2c, uart, etc.
Definition at line 275 of file mcu.c.
References i2c_event(), softi2c_event(), and VCOM_event().
Get the unique hardware ID of the MCU.
| uid | Buffer to write the ID to |
| max_len | Size of the buffer |
Get the unique hardware ID of the MCU.
| uid | Buffer to write the ID to |
| max_len | Size of the buffer |
Get the unique hardware ID of the MCU.
Uses the serial number from LINUX_UID_FILE if set and readable, otherwise the MAC address of the first network interface.
Get the unique hardware ID of the MCU.
on macOS)
Definition at line 252 of file mcu_arch.c.
References b, f, LINUX_UID_FILE, Min, p, uid_from_file(), and uid_from_mac().
Referenced by mavlink_send_autopilot_version(), and send_autopilot_version().
|
extern |
Microcontroller peripherals initialization.
This function is responisble for setting up the microcontroller after Reset.
Definition at line 104 of file mcu.c.
References adc_init(), board_init(), board_init2(), can_init(), gpio_get(), gpio_setup_input(), gpio_setup_output(), led_init(), mcu_arch_init(), PERIPHERAL3V3_ENABLE_ON, PERIPHERAL3V3_ENABLE_PIN, PERIPHERAL3V3_ENABLE_PORT, RADIO_CONTROL_POWER_ON, RADIO_CONTROL_POWER_PIN, RADIO_CONTROL_POWER_PORT, rng_init(), spi0_init(), spi1_init(), spi2_init(), spi_init_slaves(), sys_time_init(), uart_arch_init(), udp_arch_init(), and VCOM_init().
Referenced by main_init(), main_init(), main_init(), main_init(), and main_init().
|
extern |
Reboot the MCU Should not be called during flight or ciritcal operations.
| state | The state to reboot towards |
Reboot the MCU Should not be called during flight or ciritcal operations.
| reboot_state | The sate to reboot to |
Definition at line 208 of file mcu_arch.c.
References mcu_deep_sleep(), MCU_REBOOT_BOOTLOADER, MCU_REBOOT_FAST, MCU_REBOOT_POWEROFF, RTC_BOOT_FAST, and RTC_BOOT_HOLD.
Referenced by px4flash_event(), and thdUsbStorage().