Added javadoc comment to userFunctions
This commit is contained in:
@@ -2,6 +2,14 @@
|
||||
#include <constants.h>
|
||||
#include <potControlls.h>
|
||||
|
||||
/**
|
||||
* This function is used to mute the volume. If the function is called while in a muted state it will revert the volume to what it previously was.
|
||||
*
|
||||
* @param userVolume Pointer to the variable used to keep track of the current user volume. It is being passed in so the function can increment it with the potentiometer steps.
|
||||
* @param oldUserVolume Pointer to the variable used to keep track of the user volume while muted or lowered. It is being passed in so the function can increment it with the potentiometer steps.
|
||||
* @param maxVolume The highest point that the volume can be set to.
|
||||
*
|
||||
*/
|
||||
void mute(int *userVolume, int *oldUserVolume, int maxVolume)
|
||||
{
|
||||
// Check if we are in a muted state
|
||||
@@ -43,6 +51,14 @@ void mute(int *userVolume, int *oldUserVolume, int maxVolume)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to significantly lower the volume. If the function is called while in a lowered state it will revert the volume to what it previously was.
|
||||
*
|
||||
* @param userVolume Pointer to the variable used to keep track of the current user volume. It is being passed in so the function can increment it with the potentiometer steps.
|
||||
* @param oldUserVolume Pointer to the variable used to keep track of the user volume while muted or lowered. It is being passed in so the function can increment it with the potentiometer steps.
|
||||
* @param maxVolume The highest point that the volume can be set to.
|
||||
*
|
||||
*/
|
||||
void lowerVolume(int *userVolume, int *oldUserVolume, int maxVolume)
|
||||
{
|
||||
// Check if we volume is already lowered
|
||||
@@ -85,6 +101,14 @@ void lowerVolume(int *userVolume, int *oldUserVolume, int maxVolume)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to increase the volume
|
||||
*
|
||||
* @param userVolume Pointer to the variable used to keep track of the current user volume. It is being passed in so the function can increment it with the potentiometer steps.
|
||||
* @param oldUserVolume Pointer to the variable used to keep track of the user volume while muted or lowered. It is being passed in so the function can increment it with the potentiometer steps.
|
||||
* @param maxVolume The highest point that the volume can be set to.
|
||||
*
|
||||
*/
|
||||
void volumeUp(int *userVolume, int *oldUserVolume, int maxVolume)
|
||||
{
|
||||
if ((*userVolume + USER_STEPS) > maxVolume)
|
||||
@@ -109,6 +133,13 @@ void volumeUp(int *userVolume, int *oldUserVolume, int maxVolume)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is used to decrease the volume
|
||||
*
|
||||
* @param userVolume Pointer to the variable used to keep track of the current user volume. It is being passed in so the function can increment it with the potentiometer steps.
|
||||
* @param oldUserVolume Pointer to the variable used to keep track of the user volume while muted or lowered. It is being passed in so the function can increment it with the potentiometer steps.
|
||||
*
|
||||
*/
|
||||
void volumeDown(int *userVolume, int *oldUserVolume)
|
||||
{
|
||||
if ((*userVolume - USER_STEPS) < 0)
|
||||
|
||||
Reference in New Issue
Block a user