From 8f97a6061ad5e7a9fe42b98f5ec1e2fa8aa7051c Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Tue, 18 Oct 2011 15:11:25 -0400 Subject: wirish: Clean up includes; other fixups. Clean up various core files' includes to fit this pattern: - Header files include what they use. - CPP files include their header first - Include order is libmaple proper headers, then wirish headers (modulo CPP rule above). wirish.h: Move HIGH and LOW to io.h, and the boolean and byte typedefs into wirish_types.h. These don't belong in wirish.h. Add include guards to wirish_debug.h. Oops. wirish_digital.cpp: Use standard bool instead of "boolean". Signed-off-by: Marti Bolivar --- wirish/io.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'wirish/io.h') diff --git a/wirish/io.h b/wirish/io.h index 50e748f..0cb9c04 100644 --- a/wirish/io.h +++ b/wirish/io.h @@ -33,10 +33,9 @@ #ifndef _IO_H_ #define _IO_H_ -#include "gpio.h" -#include "adc.h" +#include "libmaple_types.h" -#include "wirish_time.h" +#include "boards.h" /** * Specifies a GPIO pin behavior. @@ -112,6 +111,9 @@ typedef enum WiringPinMode { */ void pinMode(uint8 pin, WiringPinMode mode); +#define HIGH 0x1 +#define LOW 0x0 + /** * Writes a (digital) value to a pin. The pin must have its * mode set to OUTPUT or OUTPUT_OPEN_DRAIN. @@ -219,4 +221,3 @@ uint8 waitForButtonPress(uint32 timeout_millis=0); void shiftOut(uint8 dataPin, uint8 clockPin, uint8 bitOrder, uint8 value); #endif - -- cgit v1.2.3