renamed `valid_load()` --> `is_valid_load()`

This commit is contained in:
jakeg00dwin 2024-09-23 12:04:44 -07:00
parent 0ca16b207b
commit e3b42aeba9
2 changed files with 6 additions and 6 deletions

View File

@ -30,7 +30,7 @@ static bool porta_disabled[8] = {0};
static bool portb_disabled[8] = {0};
bool valid_load(uint16_t val)
bool is_valid_load(uint16_t val)
{
if(val > LOWTHRESH && val < HIGHTHRESH) {
return true;
@ -54,7 +54,7 @@ void Load_HandleLoadPortA(uint8_t adc_pin, uint8_t out_pin)
uint16_t val = ADC_ReadValue(adc_pin);
ADC_Disable();
if(valid_load(val) && !porta_disabled[adc_pin]){
if(is_valid_load(val) && !porta_disabled[adc_pin]){
RegEdit_SetBit((void *) &PORTA.DIR, out_pin);
RegEdit_SetBit((void *) &PORTA.OUT, out_pin);
}
@ -72,7 +72,7 @@ void Load_HandleLoadPortB(uint8_t adc_pin, uint8_t out_pin)
uint16_t val = ADC_ReadValue(adc_pin);
ADC_Disable();
if(valid_load(val) && !portb_disabled[adc_pin]){
if(is_valid_load(val) && !portb_disabled[adc_pin]){
RegEdit_SetBit((void *) &PORTB.DIR, out_pin);
RegEdit_SetBit((void *) &PORTB.OUT, out_pin);
}

View File

@ -52,15 +52,15 @@ void Load_HandleLoadPortB(uint8_t adc_pin, uint8_t out_pin);
/**
* @brief A helper function that handles the valid value range.
* @return
* @return True/False value.
*/
bool valid_load(uint16_t val);
bool is_valid_load(uint16_t val);
/**
* @brief A helper function that checks if current load value is below target.
* @return
* @return True/False value.
*/
bool is_below_target(uint16_t val);