Dawn Framework
1.0
Universal data acquisition framework for embedded systems
dawn
include
dawn
porting
pwm.hxx
1
// dawn/include/dawn/porting/pwm.hxx
2
//
3
// SPDX-License-Identifier: Apache-2.0
4
//
5
6
#pragma once
7
8
#include <cstdint>
9
10
#include "dawn/porting/nuttx/pwm.hxx"
11
12
namespace
dawn
13
{
14
namespace
porting
15
{
21
struct
pwm_write_s
22
{
23
uint32_t freq;
24
25
struct
26
{
27
uint16_t duty;
// Duty in 0.1% units (0 - 0%, 10 - 1%, 1000 - 100%)
28
uint8_t channel;
// start from 1
29
} channels[];
30
};
31
32
}
// namespace porting
33
}
// namespace dawn
34
42
int
pwm_open(
const
char
*path);
43
50
void
pwm_close(
int
fd);
51
58
void
pwm_init(
int
fd);
59
66
int
pwm_start(
int
fd);
67
74
int
pwm_stop(
int
fd);
75
84
int
pwm_write(
int
fd,
dawn::porting::pwm_write_s
*pwm);
dawn
Out-of-tree user-extension hooks for Dawn.
Definition
bindable.hxx:13
dawn::porting::pwm_write_s
PWM write data.
Definition
pwm.hxx:22
Generated by
1.9.8