Added documentation comments. Also removed unused function signiture.
This commit is contained in:
parent
0f3d3b4538
commit
861c5959d9
|
@ -30,7 +30,7 @@ static bool porta_disabled[8] = {0};
|
|||
static bool portb_disabled[8] = {0};
|
||||
|
||||
|
||||
static bool valid_load(uint16_t val)
|
||||
bool valid_load(uint16_t val)
|
||||
{
|
||||
if(val > LOWTHRESH && val < HIGHTHRESH) {
|
||||
return true;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#ifndef LOAD_H
|
||||
#define LOAD_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
|
@ -24,11 +25,27 @@
|
|||
*/
|
||||
#define HIGHTHRESH 1000
|
||||
|
||||
/**
|
||||
* @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);
|
||||
|
||||
/**
|
||||
* @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);
|
||||
|
||||
void Load_HandlePinLoads(void);
|
||||
|
||||
/**
|
||||
* @brief A helper function that handles the valid value range.
|
||||
* @return
|
||||
*/
|
||||
bool valid_load(uint16_t val);
|
||||
|
||||
#endif /* LOAD_H */
|
||||
|
||||
|
|
Loading…
Reference in New Issue