Peritoneal Dialysis Capstone
Controlling catheter for peritoneal dialysis
Loading...
Searching...
No Matches
PWMOutput.h
Go to the documentation of this file.
1
4
5
#ifndef PWM_OUTPUT_H
6
#define PWM_OUTPUT_H
7
8
#include <
IHAL.h
>
9
#include <
IOutput.h
>
10
14
class
PWMOutput
:
public
IOutput
{
15
public
:
22
PWMOutput
(
IHAL
&
hal
,
int
pin);
23
24
float
getValue
()
override
;
25
void
setValue
(
float
value)
override
;
26
27
private
:
28
IHAL
&
m_hal
;
29
int
m_pin
;
30
float
m_value
;
31
};
32
33
#endif
// PWM_OUTPUT_H
IHAL.h
IOutput.h
IHAL
A hardware abstraction layer interface.
Definition
IHAL.h:29
IOutput
An analog output interface.
Definition
IOutput.h:13
PWMOutput::m_value
float m_value
Definition
PWMOutput.h:30
PWMOutput::m_hal
IHAL & m_hal
Definition
PWMOutput.h:28
PWMOutput::PWMOutput
PWMOutput(IHAL &hal, int pin)
Configures a pin as a PWM output.
Definition
PWMOutput.cpp:4
PWMOutput::getValue
float getValue() override
Returns the last value written to this output.
Definition
PWMOutput.cpp:9
PWMOutput::setValue
void setValue(float value) override
Writes a value to this output.
Definition
PWMOutput.cpp:13
PWMOutput::m_pin
int m_pin
Definition
PWMOutput.h:29
hal
ArduinoHAL hal(BAUD_RATE)
lib
Output
PWMOutput.h
Generated by
1.16.1