School project.

Dependencies:   Timezone NTPClient BSP_DISCO_F746NG Grove_temperature

Committer:
tuxx0046
Date:
Mon Jan 18 16:13:13 2021 +0000
Revision:
14:3ac7c08dbc52
Parent:
13:41debc0b9063
Child:
15:638e65c37d58
Documentation updated.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tuxx0046 13:41debc0b9063 1 /**
tuxx0046 14:3ac7c08dbc52 2 @file button_functions.h
tuxx0046 13:41debc0b9063 3 @author Tu Tri Huynh
tuxx0046 13:41debc0b9063 4 @date January 18, 2021
tuxx0046 13:41debc0b9063 5 @brief Functions related to Grove Button.
tuxx0046 13:41debc0b9063 6 */
tuxx0046 13:41debc0b9063 7
tuxx0046 13:41debc0b9063 8 /**
tuxx0046 13:41debc0b9063 9 This function reverses the bool value inputted if button press is registered.
tuxx0046 13:41debc0b9063 10 @is_fahrenheit Bool value to reverse.
tuxx0046 13:41debc0b9063 11 1/18/2021
tuxx0046 13:41debc0b9063 12 */
tuxx0046 13:41debc0b9063 13 void button_switch_temp_unit(DigitalIn& button, bool& is_fahrenheit)
tuxx0046 13:41debc0b9063 14 {
tuxx0046 13:41debc0b9063 15 if (button.read() == 1 )
tuxx0046 13:41debc0b9063 16 {
tuxx0046 13:41debc0b9063 17 is_fahrenheit = helper_reverse_bool(is_fahrenheit);
tuxx0046 13:41debc0b9063 18 }
tuxx0046 13:41debc0b9063 19 }