This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// callback4.cpp - C++11 Lambda Callback | |
// To build: | |
// g++ -std=c++11 callback4.cpp | |
// Situation: A "Caller" class allows another class "Callee" | |
// to connect to it via callback. How to implement this? | |
// A C++11 lambda function can be used. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <string.h> | |
#include "msp430.h" | |
unsigned int CV = 0; | |
unsigned int DV = 0; | |
char RO = '0'; | |
const double CRITICAL_OXYGEN_LEVEL = 1.5; | |
volatile double oxygenThreshold = 2; | |
volatile double oxygen = 15; // assign a value greater than 2 |