|
Peritoneal Dialysis Capstone
Controlling catheter for peritoneal dialysis
|
A hardware abstraction layer interface. More...
#include <IHAL.h>

Public Member Functions | |
| virtual | ~IHAL ()=default |
| virtual AnalogValue | analogRead (int pin)=0 |
| Samples an analog input pin. | |
| virtual void | analogWrite (int pin, AnalogValue value)=0 |
| Drives an analog output pin. | |
| virtual AnalogValue | getMaxAnalogReadQuant () const =0 |
| Returns the maximum quantized value of an analog read. | |
| virtual AnalogValue | getMaxAnalogWriteQuant () const =0 |
| Returns the maximum quantized value of an analog write. | |
| virtual void | configurePin (int pin, PinMode mode)=0 |
| Configures a pin for use as an input or output. | |
| virtual DigitalValue | digitalRead (int pin)=0 |
| Samples a digital input pin. | |
| virtual void | digitalWrite (int pin, DigitalValue value)=0 |
| Drives a digital output pin. | |
| virtual void | beginSerial ()=0 |
| Initializes the serial interface. | |
| virtual size_t | print (const char *s)=0 |
| Transmits an ASCII string over serial. | |
| virtual size_t | println (const char *s)=0 |
| Transmits an ASCII string with trailing newline over serial. | |
| virtual void | delayMs (unsigned long durationMs)=0 |
| Suspends execution for a specified duration in milliseconds. | |
| virtual unsigned long | getTimeMs ()=0 |
| Returns the number of milliseconds elapsed since the start of execution, modulo ULONG_MAX-1. | |
A hardware abstraction layer interface.
This interface defines all the microcontroller operations needed by the application. It can be implemented for different platforms (e.g., Arduino, Raspberry Pi, ESP8266 etc.) to port the application to them.
|
virtualdefault |
|
pure virtual |
Samples an analog input pin.
The pin must be valid for analog reading.
| pin | The pin number. |
N is the maximum value indicated by getMaxAnalogReadQuant. Implemented in ArduinoHAL.
|
pure virtual |
Drives an analog output pin.
The pin must be valid for analog writing.
| pin | The pin number. |
| value | The quantized value to write. Must be in the range [0,
N] where N is the maximum value indicated by getMaxAnalogWriteQuant. |
Implemented in ArduinoHAL.
|
pure virtual |
Initializes the serial interface.
This method must be called before using the serial print functions.
Implemented in ArduinoHAL.
|
pure virtual |
Configures a pin for use as an input or output.
| pin | The pin number. |
| mode | The mode (input or output) to set. |
Implemented in ArduinoHAL.
|
pure virtual |
Suspends execution for a specified duration in milliseconds.
| durationMs | The duration in milliseconds. |
Implemented in ArduinoHAL.
|
pure virtual |
Samples a digital input pin.
The pin must be valid for digital reading.
| pin | The pin number. |
Implemented in ArduinoHAL.
|
pure virtual |
Drives a digital output pin.
The pin must be valid for digital writing.
| pin | The pin number. |
| value | The digital value to write. |
Implemented in ArduinoHAL.
|
pure virtual |
Returns the maximum quantized value of an analog read.
For an analog read, a real input value in the range [0, 1] can be obtained by dividing the quantized value by this maximum value.
Implemented in ArduinoHAL.
|
pure virtual |
Returns the maximum quantized value of an analog write.
For an analog write, a real output value in the range [0, 1] can be converted to a quantized value by multiplying by this maximum value.
Implemented in ArduinoHAL.
|
pure virtual |
Returns the number of milliseconds elapsed since the start of execution, modulo ULONG_MAX-1.
Implemented in ArduinoHAL.
|
pure virtual |
Transmits an ASCII string over serial.
| s | The NUL-terminated ASCII string to write. |
Implemented in ArduinoHAL.
|
pure virtual |
Transmits an ASCII string with trailing newline over serial.
The string s is written, followed by an appropriate end-of-line indicator (e.g., CR-LF).
| s | The NUL-terminated ASCII string to write. |
Implemented in ArduinoHAL.