diff --git a/lambda-test/avrjunit.c b/lambda-test/avrjunit.c index b8f909e..6177d9c 100644 --- a/lambda-test/avrjunit.c +++ b/lambda-test/avrjunit.c @@ -22,13 +22,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU (Lesser) General Public License for more details. * - * DISCLAIMER: I'm experienced with Java, but new to C. - * - * ATTRIBUTION: This project includes the module USART and the Makefile from - * the code accompanying the book Make: AVR Programming by Elliot Williams, - * a great book and a pleasant read, that helped me tremendously to get - * started with AVR programming. + * DISCLAIMER: I'm experienced with Java and I like C, but I'm new here. */ + #include #include "USART.h" #include "avrjunit.h" diff --git a/lambda-test/avrjunit.h b/lambda-test/avrjunit.h index aaae229..6d7a838 100644 --- a/lambda-test/avrjunit.h +++ b/lambda-test/avrjunit.h @@ -21,15 +21,12 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU (Lesser) General Public License for more details. * - * DISCLAIMER: I'm experienced with Java, but new to C. - * - * ATTRIBUTION: This project includes the module USART and the Makefile from - * the code accompanying the book Make: AVR Programming by Elliot Williams, - * a great book and a pleasant read, that helped me tremendously to get - * started with AVR programming. - * + * DISCLAIMER: I'm experienced with Java and I like C, but I'm new here. */ +#ifndef AVRJUNIT_H_ +#define AVRJUNIT_H_ + /** * A test case with its class, name and pointer to the test function, * which should return true on success and false on failure. @@ -49,3 +46,5 @@ * (stty sane; cat > tests.xml) < /dev/ttyUSB0 */ void runTests(char* suite, test tests[], uint16_t count); + +#endif /* AVRJUNIT_H_ */ diff --git a/lambda-test/lambda-test.c b/lambda-test/lambda-test.c index 32994b3..56b55f5 100644 --- a/lambda-test/lambda-test.c +++ b/lambda-test/lambda-test.c @@ -27,6 +27,8 @@ * the code accompanying the book Make: AVR Programming by Elliot Williams, * a great book and a pleasant read, that helped me tremendously to get * started with AVR programming. + * ATTRIBUTION: This project includes the module lcdroutines from + * http://www.mikrocontroller.net/articles/AVR-GCC-Tutorial/LCD-Ansteuerung */ #include diff --git a/lambda/adc.c b/lambda/adc.c index b584902..b11adb7 100644 --- a/lambda/adc.c +++ b/lambda/adc.c @@ -21,13 +21,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU (Lesser) General Public License for more details. * - * DISCLAIMER: I'm experienced with Java, but new to C. - * - * ATTRIBUTION: This project includes the module USART and the Makefile from - * the code accompanying the book Make: AVR Programming by Elliot Williams, - * a great book and a pleasant read, that helped me tremendously to get - * started with AVR programming. + * DISCLAIMER: I'm experienced with Java and I like C, but I'm new here. */ + #include #include #include "adc.h" diff --git a/lambda/adc.h b/lambda/adc.h index 014329e..71ee2ff 100644 --- a/lambda/adc.h +++ b/lambda/adc.h @@ -21,15 +21,13 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU (Lesser) General Public License for more details. * - * DISCLAIMER: I'm experienced with Java, but new to C. - * - * ATTRIBUTION: This project includes the module USART and the Makefile from - * the code accompanying the book Make: AVR Programming by Elliot Williams, - * a great book and a pleasant read, that helped me tremendously to get - * started with AVR programming. + * DISCLAIMER: I'm experienced with Java and I like C, but I'm new here. */ -// TODO Put in makefile +#ifndef ADC_H_ +#define ADC_H_ + +// TODO put in Makefile // #define AREF_MV 4850 #define AREF_MV 5000 #define ADC_OFFSET_MV 7 @@ -52,3 +50,5 @@ * ADC offset voltages. */ int16_t getVoltage(uint8_t port); + +#endif /* ADC_H_ */ diff --git a/lambda/integers.c b/lambda/integers.c index 6538787..28f4ba0 100644 --- a/lambda/integers.c +++ b/lambda/integers.c @@ -21,13 +21,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU (Lesser) General Public License for more details. * - * DISCLAIMER: I'm experienced with Java, but new to C. - * - * ATTRIBUTION: This project includes the module USART and the Makefile from - * the code accompanying the book Make: AVR Programming by Elliot Williams, - * a great book and a pleasant read, that helped me tremendously to get - * started with AVR programming. + * DISCLAIMER: I'm experienced with Java and I like C, but I'm new here. */ + #include #include "integers.h" diff --git a/lambda/integers.h b/lambda/integers.h index e38e8ae..d5f2ece 100644 --- a/lambda/integers.h +++ b/lambda/integers.h @@ -21,14 +21,12 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU (Lesser) General Public License for more details. * - * DISCLAIMER: I'm experienced with Java, but new to C. - * - * ATTRIBUTION: This project includes the module USART and the Makefile from - * the code accompanying the book Make: AVR Programming by Elliot Williams, - * a great book and a pleasant read, that helped me tremendously to get - * started with AVR programming. + * DISCLAIMER: I'm experienced with Java and I like C, but I'm new here. */ +#ifndef INTEGERS_H_ +#define INTEGERS_H_ + /** * Divides the given numerator by the given denominator, * rounds to the nearest int and returns it. @@ -44,3 +42,5 @@ // TODO function to divide and return result as decimal string? // char* divToDecimalString(int32_t num, int32_t den); + +#endif /* INTEGERS_H_ */ diff --git a/lambda/lambda.c b/lambda/lambda.c index f9632f4..1e121fe 100644 --- a/lambda/lambda.c +++ b/lambda/lambda.c @@ -22,13 +22,16 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU (Lesser) General Public License for more details. * - * DISCLAIMER: I'm experienced with Java, but new to C. + * DISCLAIMER: I'm experienced with Java and I like C, but I'm new here. * * ATTRIBUTION: This project includes the module USART and the Makefile from * the code accompanying the book Make: AVR Programming by Elliot Williams, * a great book and a pleasant read, that helped me tremendously to get * started with AVR programming. + * ATTRIBUTION: This project includes the module lcdroutines from + * http://www.mikrocontroller.net/articles/AVR-GCC-Tutorial/LCD-Ansteuerung */ + #include #include #include "USART.h" diff --git a/lambda/sensors.c b/lambda/sensors.c index 43f5799..dc1f18a 100644 --- a/lambda/sensors.c +++ b/lambda/sensors.c @@ -21,13 +21,9 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU (Lesser) General Public License for more details. * - * DISCLAIMER: I'm experienced with Java, but new to C. - * - * ATTRIBUTION: This project includes the module USART and the Makefile from - * the code accompanying the book Make: AVR Programming by Elliot Williams, - * a great book and a pleasant read, that helped me tremendously to get - * started with AVR programming. + * DISCLAIMER: I'm experienced with Java and I like C, but I'm new here. */ + #include #include #include diff --git a/lambda/sensors.h b/lambda/sensors.h index 432e1ac..2f6fd4a 100644 --- a/lambda/sensors.h +++ b/lambda/sensors.h @@ -21,14 +21,13 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU (Lesser) General Public License for more details. * - * DISCLAIMER: I'm experienced with Java, but new to C. - * - * ATTRIBUTION: This project includes the module USART and the Makefile from - * the code accompanying the book Make: AVR Programming by Elliot Williams, - * a great book and a pleasant read, that helped me tremendously to get - * started with AVR programming. + * DISCLAIMER: I'm experienced with Java and I like C, but I'm new here. */ +#ifndef SENSORS_H_ +#define SENSORS_H_ + +// TODO put in Makefile? #define LEAN "Mager" #define IDEAL "Ideal"; #define RICH "Fett!"; @@ -101,3 +100,5 @@ * a good value, below is rich and above is lean. */ const char* toInfo(int16_t lambda); + +#endif /* SENSORS_H_ */