APM:Libraries
libraries
AP_HAL_Linux
Led_Sysfs.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2017 Mathieu Othacehe. All rights reserved.
3
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
#pragma once
18
19
#include <
AP_HAL/AP_HAL.h
>
20
21
#include "
AP_HAL_Linux.h
"
22
#include "
Util.h
"
23
24
namespace
Linux
{
25
26
class
Led_Sysfs
{
27
public
:
28
bool
init
();
29
bool
set_brightness
(uint8_t brightness);
30
31
Led_Sysfs
(
const
char
* led_name);
32
~Led_Sysfs
();
33
34
private
:
35
int
_brightness_fd
= -1;
36
int
_max_brightness
= 0;
37
const
char
*
_led_name
=
nullptr
;
38
};
39
40
}
Linux::Led_Sysfs::~Led_Sysfs
~Led_Sysfs()
Definition:
Led_Sysfs.cpp:38
Linux::Led_Sysfs::set_brightness
bool set_brightness(uint8_t brightness)
Definition:
Led_Sysfs.cpp:76
Linux::Led_Sysfs::_led_name
const char * _led_name
Definition:
Led_Sysfs.h:37
AP_HAL.h
Linux::Led_Sysfs::_max_brightness
int _max_brightness
Definition:
Led_Sysfs.h:36
Linux::Led_Sysfs::_brightness_fd
int _brightness_fd
Definition:
Led_Sysfs.h:35
Linux::Led_Sysfs::Led_Sysfs
Led_Sysfs(const char *led_name)
Definition:
Led_Sysfs.cpp:33
AP_HAL_Linux.h
Linux
Definition:
CameraSensor.h:19
Linux::Led_Sysfs
Definition:
Led_Sysfs.h:26
Linux::Led_Sysfs::init
bool init()
Definition:
Led_Sysfs.cpp:45
Util.h
Generated on Sun Jun 17 2018 14:18:49 for APM:Libraries by
1.8.13