From 854f1635569b69865dce41e54d16a2240384ef17 Mon Sep 17 00:00:00 2001 From: jakeg00dwin Date: Tue, 24 Sep 2024 09:23:08 -0700 Subject: [PATCH] changed the low and high threshold values used in the `load.c` file. Also added documentatin for functions and removed some unused code. --- src/load/load.h | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/load/load.h b/src/load/load.h index 1b3112f..e13924b 100644 --- a/src/load/load.h +++ b/src/load/load.h @@ -10,22 +10,39 @@ #ifndef LOAD_H #define LOAD_H +#include + /** * @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 */