This repository has been archived by the owner on Mar 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
common.h
56 lines (46 loc) · 1.68 KB
/
common.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* @file common.h
* @brief Global header file for the project (for constant/global definitions)
* @author Shawn Hymel (SparkFun Electronics)
*
* @copyright This code is public domain but you buy me a beer if you use
* this and we meet someday (Beerware license).
*/
#ifndef COMMON_H
#define COMMON_H
/* Sets the name of the device. Used by SmartConfig. */
#define DEVICE_NAME "CC3000"
/* Debug setting. Set to 0 for no debug output. Set to 1 for debug output
* If you enable debugging, make sure you call Serial.begin()! */
#define DEBUG 0
/* Clock divider for SPI */
#define SPI_CLK_DIV SPI_CLOCK_DIV2
/* Define success and failure constants for CC3000 library functions. For
* whatever reason, TI assigned 0 as success. */
#define CC3000_SUCCESS 0
/* Define other constants used by the CC3000 library */
#define DISABLE 0
#define ENABLE 1
#define IP_ADDR_LEN 4 // Length of IP address in bytes
/* Includes needed for defined types */
#include "utility/netapp.h"
/* Global variable declarations */
extern uint8_t g_int_pin;
extern uint8_t g_int_num;
extern uint8_t g_en_pin;
extern uint8_t g_cs_pin;
extern bool g_socket_connected;
extern uint8_t g_saved_data_mode;
extern uint8_t g_saved_bit_order;
extern uint8_t g_saved_clock_div;
extern volatile unsigned long ulSmartConfigFinished;
extern volatile unsigned long ucStopSmartConfig;
extern volatile unsigned long ulCC3000Connected;
extern volatile unsigned long ulCC3000DHCP;
extern volatile unsigned long ulCC3000DHCP_configured;
extern volatile unsigned long OkToDoShutDown;
extern netapp_pingreport_args_t g_ping_report;
#if (DEBUG == 1)
extern volatile long g_debug_interrupt;
#endif
#endif