Dawn Framework 1.0
Universal data acquisition framework for embedded systems
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
12namespace dawn
13{
14namespace porting
15{
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
42int pwm_open(const char *path);
43
50void pwm_close(int fd);
51
58void pwm_init(int fd);
59
66int pwm_start(int fd);
67
74int pwm_stop(int fd);
75
84int pwm_write(int fd, dawn::porting::pwm_write_s *pwm);
Out-of-tree user-extension hooks for Dawn.
Definition bindable.hxx:13
PWM write data.
Definition pwm.hxx:22