Skip to content

Commit 8762418

Browse files
committed
drivers, cc3000: Wrap exported functions in a macro for renaming.
1 parent 9d2bf9c commit 8762418

File tree

17 files changed

+121
-132
lines changed

17 files changed

+121
-132
lines changed

drivers/cc3000/inc/cc3000_common.h

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
*
3434
*****************************************************************************/
35-
#ifndef __COMMON_H__
36-
#define __COMMON_H__
35+
#ifndef __CC3000_COMMON_H__
36+
#define __CC3000_COMMON_H__
3737

3838
#include "data_types.h"
3939

@@ -43,6 +43,11 @@
4343
#include <stdlib.h>
4444
#include <stdint.h>
4545

46+
//*****************************************************************************
47+
// Prefix exported names to avoid name clash
48+
//*****************************************************************************
49+
#define CC3000_EXPORT(name) cc3000_ ## name
50+
4651
//*****************************************************************************
4752
//
4853
// If building with a C++ compiler, make all of the definitions in this header
@@ -53,7 +58,7 @@
5358
extern "C" {
5459
#endif
5560

56-
extern int errno;
61+
extern int CC3000_EXPORT(errno);
5762

5863
//*****************************************************************************
5964
// ERROR CODES
@@ -357,4 +362,4 @@ extern UINT32 STREAM_TO_UINT32_f(CHAR* p, UINT16 offset);
357362
}
358363
#endif // __cplusplus
359364

360-
#endif // __COMMON_H__
365+
#endif // __CC3000_COMMON_H__

drivers/cc3000/inc/ccspi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
*****************************************************************************/
3535

3636

37-
#ifndef __SPI_H__
38-
#define __SPI_H__
37+
#ifndef __CC3000_SPI_H__
38+
#define __CC3000_SPI_H__
3939

4040
//*****************************************************************************
4141
//

drivers/cc3000/inc/data_types.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
*
3434
*****************************************************************************/
35-
#ifndef __DATA_TYPES__
36-
#define __DATA_TYPES__
35+
#ifndef __CC3000_DATA_TYPES__
36+
#define __CC3000_DATA_TYPES__
3737

3838
//*****************************************************************************
3939
//
@@ -104,4 +104,4 @@ typedef char CHAR;
104104
}
105105
#endif /* __cplusplus */
106106

107-
#endif /* __DATA_TYPE__ */
107+
#endif /* __CC3000_DATA_TYPES__ */

drivers/cc3000/inc/evnt_handler.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
*
3434
*****************************************************************************/
35-
#ifndef __EVENT_HANDLER_H__
36-
#define __EVENT_HANDLER_H__
35+
#ifndef __CC3000_EVENT_HANDLER_H__
36+
#define __CC3000_EVENT_HANDLER_H__
3737
#include "hci.h"
3838
#include "socket.h"
3939

@@ -162,5 +162,5 @@ typedef struct _bsd_gethostbyname_return_t
162162
}
163163
#endif // __cplusplus
164164

165-
#endif // __EVENT_HANDLER_H__
165+
#endif // __CC3000_EVENT_HANDLER_H__
166166

drivers/cc3000/inc/hci.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
*
3434
*****************************************************************************/
35-
#ifndef __HCI_H__
36-
#define __HCI_H__
35+
#ifndef __CC3000_HCI_H__
36+
#define __CC3000_HCI_H__
3737

3838
#include "cc3000_common.h"
3939

@@ -327,4 +327,4 @@ extern void hci_patch_send(UINT8 ucOpcode, UINT8 *pucBuff, CHAR *patch, UINT16 u
327327
}
328328
#endif // __cplusplus
329329

330-
#endif // __HCI_H__
330+
#endif // __CC3000_HCI_H__

drivers/cc3000/inc/host_driver_version.h

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,9 @@
3232
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
*
3434
*****************************************************************************/
35-
#ifndef __HOST_DRIVER_VERSION_H__
36-
#define __HOST_DRIVER_VERSION_H__
35+
#ifndef __CC3000_HOST_DRIVER_VERSION_H__
36+
#define __CC3000_HOST_DRIVER_VERSION_H__
3737

3838
#define DRIVER_VERSION_NUMBER 15
3939

40-
41-
42-
#endif // __VERSION_H__
43-
44-
45-
46-
47-
48-
49-
50-
51-
52-
53-
54-
55-
40+
#endif // __CC3000_HOST_DRIVER_VERSION_H__

drivers/cc3000/inc/netapp.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
*
3434
*****************************************************************************/
35-
#ifndef __NETAPP_H__
36-
#define __NETAPP_H__
35+
#ifndef __CC3000_NETAPP_H__
36+
#define __CC3000_NETAPP_H__
3737

3838
#include "data_types.h"
3939

@@ -339,5 +339,5 @@ INT32 netapp_set_debug_level(UINT32 ulLevel);
339339
}
340340
#endif // __cplusplus
341341

342-
#endif // __NETAPP_H__
342+
#endif // __CC3000_NETAPP_H__
343343

drivers/cc3000/inc/nvmem.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
*
3434
*****************************************************************************/
35-
#ifndef __NVRAM_H__
36-
#define __NVRAM_H__
35+
#ifndef __CC3000_NVRAM_H__
36+
#define __CC3000_NVRAM_H__
3737

3838
#include "cc3000_common.h"
3939

@@ -245,4 +245,4 @@ extern INT32 nvmem_create_entry(UINT32 file_id, UINT32 newlen);
245245
}
246246
#endif // __cplusplus
247247

248-
#endif // __NVRAM_H__
248+
#endif // __CC3000_NVRAM_H__

drivers/cc3000/inc/patch_prog.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#ifndef __PATCH_PROG_H__
2-
#define __PATCH_PROG_H__
1+
#ifndef __CC3000_PATCH_PROG_H__
2+
#define __CC3000_PATCH_PROG_H__
33
extern unsigned short fw_length;
44
extern const unsigned char fw_patch[];
55

@@ -8,4 +8,4 @@ extern const unsigned char wlan_drv_patch[];
88
extern const unsigned char cRMdefaultParams[128];
99

1010
void patch_prog_start();
11-
#endif //__PATCH_PROG_H__
11+
#endif //__CC3000_PATCH_PROG_H__

drivers/cc3000/inc/security.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3333
*
3434
*****************************************************************************/
35-
#ifndef __SECURITY__
36-
#define __SECURITY__
35+
#ifndef __CC3000_SECURITY__
36+
#define __CC3000_SECURITY__
3737

3838
#include "nvmem.h"
3939

0 commit comments

Comments
 (0)