changed the low and high threshold values used in the `load.c` file. Also added documentatin for functions and removed some unused code.

This commit is contained in:
jakeg00dwin 2024-09-24 09:23:08 -07:00
parent cbede38910
commit 854f163556
1 changed files with 23 additions and 6 deletions

View File

@ -10,22 +10,39 @@
#ifndef LOAD_H
#define LOAD_H
#include <stdint.h>
/**
* @brief Low Threshold
*
* Anything below or equal to the value will cause the pin to lock into the disabled
* state.
*/
#define LOWTHRESH 527
#define LOWTHRESH 517
/**
* @brief High Threshold
*
* Anything equal or above the value will cause the pin to lock into the disabled
* state.
*/
#define HIGHTHRESH 1000
#define HIGHTHRESH 830
/**
* @brief Checks if the adc pin is inbetween LOWTHRESH and HIGHTHRESH and then
* sets or disables the output pin on PORTA.
* @param adc_pin the pin number that the load value is read from.
* @param out_pin The pin that is set high if the adc_pin input is valid.
*/
void Load_HandleLoadPortA(uint8_t adc_pin, uint8_t out_pin);
void Load_HandleLoadPortB(uint8_t adc_pin, uint8_t out_pin);
void Load_HandlePinLoads(void);
/**
* @brief Checks if the adc pin is inbetween LOWTHRESH and HIGHTHRESH and then
* sets or disables the output pin on PORTB.
* @param adc_pin the pin number that the load value is read from.
* @param out_pin The pin that is set high if the adc_pin input is valid.
*/
void Load_HandleLoadPortB(uint8_t adc_pin, uint8_t out_pin);
#endif /* LOAD_H */