Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
PeripheralController.cpp File Reference

Implementation of the PeripheralController class. More...

Go to the source code of this file.

Data Structures

union  i2c_smbus_data
 Represents data formats for I2C SMBus communication. More...
 

Macros

#define I2C_SMBUS_WRITE   0
 
#define I2C_SMBUS_READ   1
 
#define I2C_SMBUS_BYTE_DATA   2
 

Functions

template<typename T>
clamp (T value, T min_val, T max_val)
 Clamps a value to a given range.
 

Detailed Description

Implementation of the PeripheralController class.

Version
0.1
Date
2025-02-12

This file contains the implementation of the PeripheralController class, which is responsible for controlling the peripherals of the car.

Author
Félix LE BIHAN (@Fle-bihh)
Tiago Pereira (@t-pereira06)
Ricardo Melo (@reomelo)
Michel Batista (@MicchelFAB)

Definition in file PeripheralController.cpp.

Macro Definition Documentation

◆ I2C_SMBUS_BYTE_DATA

#define I2C_SMBUS_BYTE_DATA   2

Definition at line 35 of file PeripheralController.cpp.

◆ I2C_SMBUS_READ

#define I2C_SMBUS_READ   1

Definition at line 34 of file PeripheralController.cpp.

◆ I2C_SMBUS_WRITE

#define I2C_SMBUS_WRITE   0

Definition at line 33 of file PeripheralController.cpp.

Function Documentation

◆ clamp()

template<typename T>
T clamp ( T value,
T min_val,
T max_val )

Clamps a value to a given range.

Parameters
valueValue to be clamped.
min_valMinimum value of the range.
max_valMaximum value of the range.
Returns
The clamped value, or the original value if it is within the range.

Definition at line 45 of file PeripheralController.cpp.