From: Olivier Matz Date: Tue, 1 Oct 2013 20:22:35 +0000 (+0200) Subject: add missing #ifndef to protect header files X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=8fcd09b3ebe4880910ea909e298f2eeb563ac6fe;p=protos%2Fxbee-avr.git add missing #ifndef to protect header files --- diff --git a/cmdline.h b/cmdline.h index 3b8bf50..58798a3 100644 --- a/cmdline.h +++ b/cmdline.h @@ -20,6 +20,8 @@ * */ +#ifndef _CMDLINE_H_ +#define _CMDLINE_H_ #define CMDLINE_UART 1 #define XBEE_UART 0 @@ -55,3 +57,5 @@ static inline uint8_t cmdline_getchar_wait(void) { return uart_recv(CMDLINE_UART); } + +#endif /* _CMDLINE_H_ */ diff --git a/xbee.h b/xbee.h index 0efdb22..81097cf 100644 --- a/xbee.h +++ b/xbee.h @@ -25,6 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _XBEE_H_ +#define _XBEE_H_ + /* Callback when receiving data on a specific channel. The arguments * of the function are the xbee device, the channel ID, the type of * the frame (example: XBEE_TYPE_ATRESP), the pointer to the frame, @@ -86,3 +89,5 @@ int xbee_read(struct xbee_dev *dev); /* process all data in queue */ int xbee_process_queue(struct xbee_dev *dev); + +#endif /* _XBEE_H_ */ diff --git a/xbee_proto.h b/xbee_proto.h index 778ef0b..7608379 100644 --- a/xbee_proto.h +++ b/xbee_proto.h @@ -25,6 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _XBEE_PROTO_H_ +#define _XBEE_PROTO_H_ + /* protocol headers */ #define XBEE_DELIMITER 0x7E @@ -150,3 +153,5 @@ int xbee_proto_xmit(struct xbee_dev *dev, uint8_t id, uint8_t type, void *buf, unsigned len); void xbee_proto_rx(struct xbee_dev *dev); + +#endif /* _XBEE_PROTO_H_ */ diff --git a/xbee_stats.h b/xbee_stats.h index 3747946..539542b 100644 --- a/xbee_stats.h +++ b/xbee_stats.h @@ -25,6 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _XBEE_STATS_H_ +#define _XBEE_STATS_H_ + /* per-device statistics */ struct xbee_stats { int rx_frame; @@ -65,3 +68,5 @@ void xbee_reset_stats(struct xbee_dev *dev); /* dump statistics on stdout */ void xbee_dump_stats(struct xbee_dev *dev); + +#endif /* _XBEE_STATS_H_ */