From b0fcd19d5d83782441e5123ab07a111ce3e7ace7 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Wed, 21 May 2014 23:19:33 +0800 Subject: [PATCH] UDI - Added checks on UDI_[NIC|PHYSIO]_VERSION --- UDI/drivers/gfx_bochs/bochsga_core.c | 1 + UDI/drivers/net_ne2000/ne2000_common.h | 4 ++++ UDI/drivers/net_ne2000/ne2000_core.c | 4 ---- UDI/drivers/uart_16c550/uart16c550.c | 1 + UDI/include/udi_nic.h | 4 ++++ UDI/include/udi_physio.h | 6 +++--- 6 files changed, 13 insertions(+), 7 deletions(-) diff --git a/UDI/drivers/gfx_bochs/bochsga_core.c b/UDI/drivers/gfx_bochs/bochsga_core.c index c851b072..82c3e7a2 100644 --- a/UDI/drivers/gfx_bochs/bochsga_core.c +++ b/UDI/drivers/gfx_bochs/bochsga_core.c @@ -6,6 +6,7 @@ * - Core Code */ #define UDI_VERSION 0x101 +#define UDI_PHYSIO_VERSION 0x101 #define UDI_GFX_VERSION 0x101 #include #include diff --git a/UDI/drivers/net_ne2000/ne2000_common.h b/UDI/drivers/net_ne2000/ne2000_common.h index b6a16896..6850c239 100644 --- a/UDI/drivers/net_ne2000/ne2000_common.h +++ b/UDI/drivers/net_ne2000/ne2000_common.h @@ -8,6 +8,10 @@ #ifndef _NE2000_COMMON_H_ #define _NE2000_COMMON_H_ +#define UDI_VERSION 0x101 +#define UDI_PHYSIO_VERSION 0x101 +#define UDI_NIC_VERSION 0x101 + #include #include #include diff --git a/UDI/drivers/net_ne2000/ne2000_core.c b/UDI/drivers/net_ne2000/ne2000_core.c index 6b9a81a0..1ff7914a 100644 --- a/UDI/drivers/net_ne2000/ne2000_core.c +++ b/UDI/drivers/net_ne2000/ne2000_core.c @@ -5,10 +5,6 @@ * ne2000_core.c * - UDI initialisation */ -#define UDI_VERSION 0x101 -#define UDI_NIC_VERSION 0x101 -#include -#include #include "ne2000_common.h" enum { diff --git a/UDI/drivers/uart_16c550/uart16c550.c b/UDI/drivers/uart_16c550/uart16c550.c index 211dfd7d..4499b29c 100644 --- a/UDI/drivers/uart_16c550/uart16c550.c +++ b/UDI/drivers/uart_16c550/uart16c550.c @@ -6,6 +6,7 @@ * - UDI initialisation */ #define UDI_VERSION 0x101 +#define UDI_PHYSIO_VERSION 0x101 #include #include #include "uart16c550_common.h" diff --git a/UDI/include/udi_nic.h b/UDI/include/udi_nic.h index 169a81bf..7b5659a9 100644 --- a/UDI/include/udi_nic.h +++ b/UDI/include/udi_nic.h @@ -8,6 +8,10 @@ #ifndef _UDI_NIC_H_ #define _UDI_NIC_H_ +#ifndef UDI_NIC_VERSION +# error "UDI_NIC_VERSION must be defined" +#endif + // === CBs === #define UDI_NIC_STD_CB_NUM 1 #define UDI_NIC_BIND_CB_NUM 2 diff --git a/UDI/include/udi_physio.h b/UDI/include/udi_physio.h index f7643c8e..1f7bd8d4 100644 --- a/UDI/include/udi_physio.h +++ b/UDI/include/udi_physio.h @@ -6,9 +6,9 @@ #include -//#ifndef UDI_PHYSIO_VERSION -//# error "UDI_PHYSIO_VERSION must be defined" -//#endif +#ifndef UDI_PHYSIO_VERSION +# error "UDI_PHYSIO_VERSION must be defined" +#endif #define UDI_DL_PIO_HANDLE_T 200 #define UDI_DL_DMA_CONSTRAINTS_T 201 -- 2.20.1