|  | Dual Active Bridge Development Board (Part-No. ) |
Content |  |  |  |  |  |

Loading...
Searching...
No Matches
Typedefs | Enumerations | Functions | Variables
dev_fan.c File Reference
Device Layer » Fan Control

Contains fan initialization and execution functions. More...

`#include "dev_fan.h"`
`#include "dev_temp.h"`
`#include "config/macros.h"`
Include dependency graph for dev_fan.c:

Go to the source code of this file.

## Typedefs
typedef enum FAN_SETTINGS_e | FAN_SETTINGS_t

## Enumerations
enum | FAN_SETTINGS_e { NO_CHANGE = 0 , CHANGE_SPEED = 1 }

## Functions
static uint16_t | Convert_From_Percentage (uint8_t percentage_value)
| Converts the percentage value to number of ticks.
static uint8_t | Convert_From_Raw (uint16_t raw)
static void | Override_Speed (void)
| Override the fan speed with maximum speed.
static void | Calculate_Speed (void)
| Calculates the fan speed.
static void | Update_Speed (void)
| Update the fan speed.
void | Dev_Fan_Initialize (void)
| This function initializes the fan object.
void | Dev_Fan_Task_100ms (void)
| this function needs to be called every 100ms it contains the code to update the status of the fan
void | Dev_Fan_Task_1s (void)
| This function needs to be called every 1s to keep the temperature of the board at a certain temperature.
void | Dev_Fan_Set_Override (void)
| Sets the fan override bit and the fan speed.
void | Dev_Fan_Set_Speed (uint8_t target_speed_percent)
| Sets the fan speed.

## Variables
FAN_DATA_t | devFanData
| Data Object of fan.
FAN_DATA_t * | devFanDataPtr = &devFanData
static FAN_SETTINGS_t | changeSpeed = CHANGE_SPEED

## Detailed Description

<>

Definition in file dev_fan.c.

## Typedef Documentation

## ◆ FAN_SETTINGS_t

typedef enum FAN_SETTINGS_e FAN_SETTINGS_t

Definition at line 28 of file dev_fan.c.

## Enumeration Type Documentation

## ◆ FAN_SETTINGS_e

enum FAN_SETTINGS_e

Enumerator
NO_CHANGE |
CHANGE_SPEED |

Definition at line 24 of file dev_fan.c.

## Function Documentation

## ◆ Convert_From_Raw()

static uint8_t Convert_From_Raw | ( | uint16_t | raw | ) |
| static

Returns

Definition at line 251 of file dev_fan.c.

Here is the caller graph for this function:

## Variable Documentation

## ◆ changeSpeed

FAN_SETTINGS_t changeSpeed = CHANGE_SPEED
| static

Definition at line 30 of file dev_fan.c.

## ◆ devFanDataPtr

FAN_DATA_t* devFanDataPtr = &devFanData

Definition at line 22 of file dev_fan.c.