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

Loading...
Searching...
No Matches
Data Structures | Typedefs | Functions | Variables
dev_fan.h File Reference
Device Layer » Fan Control

fan device driver More...

`#include <xc.h>`
`#include <stdint.h>`
`#include "pwm/sccp3.h"`
Include dependency graph for dev_fan.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | FAN_DATA_s
| A custom data type for fan. More...

## Macros
#define | MULTIPLIER (CCP3PRL/100)
| These have to be renamed to make the fan device driver abstract.
#define | MAX_SPEED_PERCENT 96
| macros defining the speed limits
#define | INIT_SPEED_PERCENT 1
| intial start fan value
#define | MIN_TICK 1
| fastest possible tick. needed for override flag.
#define | STEP_SIZE 1
| in percent. needed for overide flag.

## Typedefs
typedef struct FAN_DATA_s | FAN_DATA_t

## Functions
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 TargetSpeedPercent)
| Sets the fan speed.

## Variables
FAN_DATA_t * | devFanDataPtr

## Detailed Description

Contains fan public functions.

Author
  M70027

Date
  05/02/2024

<>

Definition in file dev_fan.h.

## Macro Definition Documentation

## ◆ INIT_SPEED_PERCENT

#define INIT_SPEED_PERCENT 1

Definition at line 40 of file dev_fan.h.

## ◆ MAX_SPEED_PERCENT

#define MAX_SPEED_PERCENT 96

upper limit to fan speed

Definition at line 39 of file dev_fan.h.

## ◆ MIN_TICK

#define MIN_TICK 1

Definition at line 41 of file dev_fan.h.

## ◆ MULTIPLIER

#define MULTIPLIER (CCP3PRL/100)

1 percent equals to max period / 100

Definition at line 30 of file dev_fan.h.

## ◆ STEP_SIZE

#define STEP_SIZE 1

Definition at line 42 of file dev_fan.h.

## Typedef Documentation

## ◆ FAN_DATA_t

typedef struct FAN_DATA_s FAN_DATA_t

Definition at line 61 of file dev_fan.h.

## Variable Documentation

## ◆ devFanDataPtr

FAN_DATA_t* devFanDataPtr
| extern

Definition at line 22 of file dev_fan.c.