School project.

Dependencies:   Timezone NTPClient BSP_DISCO_F746NG Grove_temperature

button_functions.h

Committer:
tuxx0046
Date:
2021-01-21
Revision:
20:9d4450357ce7
Parent:
15:638e65c37d58

File content as of revision 20:9d4450357ce7:

/**
@file    button_functions.h
@author  Tu Tri Huynh
@date    January 18, 2021
@brief   Functions related to Grove Button.
*/

/**
This function reverses the bool value inputted if button press is registered.
@is_fahrenheit Bool value to reverse.
1/18/2021
*/ 
bool button_switch_temp_unit(DigitalIn& button, bool& is_fahrenheit)
{
    if (button.read() == 1 )
    {
       is_fahrenheit = helper_reverse_bool(is_fahrenheit);
       return true;
    }
    return false;
}