APM:Libraries
libraries
AP_HAL_F4Light
HAL_F4Light_Class.h
Go to the documentation of this file.
1
2
#pragma once
3
4
5
#if CONFIG_HAL_BOARD == HAL_BOARD_F4LIGHT
6
7
#include <
AP_HAL_F4Light/AP_HAL_F4Light.h
>
8
#include "
handler.h
"
9
10
#include <
AP_Param/AP_Param.h
>
11
12
#include <
hal.h
>
13
#include "
USBDriver.h
"
14
#include <
pwm_in.h
>
15
#include <
usart.h
>
16
#include <
i2c.h
>
17
#include <
spi.h
>
18
19
20
#if defined(USB_MASSSTORAGE)
21
#include "
massstorage/mass_storage.h
"
22
#endif
23
24
/*
25
Backup SRAM 4KByte - 0x4002 4000 - 0x4002 3FFF can be used as EEPROM buffer?
26
27
ideally it should be used for state storage for recovery from in-flight reboots but we never get this from upstream...
28
29
*/
30
31
32
class
HAL_state
{
33
public
:
34
HAL_state
()
35
:
sd_busy
(0)
36
,
disconnect
(0)
37
{}
38
39
uint8_t
sd_busy
;
40
uint8_t
disconnect
;
41
};
42
43
class
HAL_F4Light
:
public
AP_HAL::HAL
{
44
public
:
45
HAL_F4Light
();
46
void
run(
int
argc,
char
*
const
argv[],
Callbacks
* callbacks)
const override
;
47
48
void
lateInit();
49
50
static
HAL_state
state
;
// hal is const so we should move out its internal state
51
52
private
:
53
AP_HAL::UARTDriver
** uarts[6];
54
55
void
connect_uart(
AP_HAL::UARTDriver
* uartL,
AP_HAL::UARTDriver
* uartR,
AP_HAL::Proc
proc);
56
// parameters in hal_param_helper
57
58
#if defined(USB_MASSSTORAGE)
59
F4Light::MassStorage
massstorage;
60
#endif
61
62
};
63
64
65
#endif // __AP_HAL_F4Light_CLASS_H__
HAL_state::HAL_state
HAL_state()
Definition:
HAL_F4Light_Class.h:34
HAL_state
Definition:
HAL_F4Light_Class.h:32
pwm_in.h
AP_HAL_F4Light.h
hal.h
F4Light::MassStorage
Definition:
mass_storage.h:16
AP_HAL::UARTDriver
Definition:
UARTDriver.h:9
AP_HAL::Proc
void(* Proc)(void)
Definition:
AP_HAL_Namespace.h:47
HAL_state::disconnect
uint8_t disconnect
Definition:
HAL_F4Light_Class.h:40
HAL_F4Light::state
static HAL_state state
Definition:
HAL_F4Light_Class.h:50
spi.h
AP_Param.h
A system for managing and storing variables that are of general interest to the system.
USBDriver.h
AP_HAL::HAL
Definition:
HAL.h:26
HAL_F4Light
Definition:
HAL_F4Light_Class.h:43
usart.h
AP_HAL::HAL::Callbacks
Definition:
HAL.h:82
mass_storage.h
handler.h
HAL_state::sd_busy
uint8_t sd_busy
Definition:
HAL_F4Light_Class.h:39
i2c.h
Generated on Sun Jun 17 2018 14:18:49 for APM:Libraries by
1.8.13