Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NuttX RTOS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
NuttX RTOS
Commits
5053d803
Commit
5053d803
authored
11 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
CC3000 driver updates from David Sidrane
parent
4cf95405
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/nuttx/wireless/cc3000/include/cc3000_upif.h
+3
-5
3 additions, 5 deletions
include/nuttx/wireless/cc3000/include/cc3000_upif.h
include/nuttx/wireless/cc3000/include/sys/socket.h
+18
-11
18 additions, 11 deletions
include/nuttx/wireless/cc3000/include/sys/socket.h
with
21 additions
and
16 deletions
include/nuttx/wireless/cc3000/include/cc3000_upif.h
+
3
−
5
View file @
5053d803
...
...
@@ -80,7 +80,7 @@
* See http://processors.wiki.ti.com/index.php/CC3000_Serial_Port_Interface_(SPI)
*/
# define CONFIG_CC3000_SPIMODE SPIDEV_MODE
0
# define CONFIG_CC3000_SPIMODE SPIDEV_MODE
1
#endif
/* Check for some required settings. This can save the user a lot of time
...
...
@@ -91,9 +91,6 @@
# error "Signals are required. CONFIG_DISABLE_SIGNALS must not be selected."
#endif
#ifndef CONFIG_SCHED_WORKQUEUE
# error "Work queue support required. CONFIG_SCHED_WORKQUEUE must be selected."
#endif
/****************************************************************************
* Public Types
...
...
@@ -146,7 +143,8 @@ struct cc3000_config_s
void
(
*
irq_clear
)(
FAR
struct
cc3000_config_s
*
state
);
void
(
*
power_enable
)(
FAR
struct
cc3000_config_s
*
state
,
bool
enable
);
void
(
*
chip_select
)(
FAR
struct
cc3000_config_s
*
state
,
bool
enable
);
bool
(
*
busy
)(
FAR
struct
cc3000_config_s
*
state
);
bool
(
*
irq_read
)(
FAR
struct
cc3000_config_s
*
state
);
};
/****************************************************************************
...
...
This diff is collapsed.
Click to expand it.
include/nuttx/wireless/cc3000/include/sys/socket.h
+
18
−
11
View file @
5053d803
...
...
@@ -39,6 +39,9 @@
* Pre-processor Definitions
*****************************************************************************/
#define CC3000_SOCKETS
/* Indicate using CC3000 sockets */
#define CC3000_SOCKETS_ST
/* Indicate single threaded version */
#define HOSTNAME_MAX_LENGTH (230)
/* 230 bytes + header shouldn't exceed 8
* bit value */
...
...
@@ -47,6 +50,10 @@
#define AF_INET 2
#define AF_INET6 23
#define PF_INET AF_INET
/* IPv4 Internet protocols */
#define PF_INET6 AF_INET6
/* IPv6 Internet protocols */
/*------------ Socket Types ------------*/
#define SOCK_STREAM 1
...
...
@@ -112,12 +119,12 @@
* the array isn't too big.
*/
#define __FD_ZERO(set)
\
do {
\
unsigned int __i;
\
TICC3000fd_set *__arr = (set);
\
#define __FD_ZERO(set) \
do { \
unsigned int __i; \
TICC3000fd_set *__arr = (set); \
for (__i = 0; __i < sizeof (TICC3000fd_set) / sizeof (__fd_mask); ++__i) \
__FDS_BITS (__arr)[__i] = 0;
\
__FDS_BITS (__arr)[__i] = 0; \
} while (0)
#define __FD_SET(d, set) (__FDS_BITS (set)[__FDELT (d)] |= __FDMASK (d))
#define __FD_CLR(d, set) (__FDS_BITS (set)[__FDELT (d)] &= ~__FDMASK (d))
...
...
@@ -149,11 +156,11 @@
/* mDNS port - 5353 mDNS multicast address - 224.0.0.251 */
#define SET_mDNS_ADD(sockaddr) sockaddr.sa_data[0] = 0x14; \
sockaddr.sa_data[1] = 0xe9; \
sockaddr.sa_data[2] = 0xe0; \
sockaddr.sa_data[3] = 0x0; \
sockaddr.sa_data[4] = 0x0; \
sockaddr.sa_data[5] = 0xfb;
sockaddr.sa_data[1] = 0xe9; \
sockaddr.sa_data[2] = 0xe0; \
sockaddr.sa_data[3] = 0x0; \
sockaddr.sa_data[4] = 0x0; \
sockaddr.sa_data[5] = 0xfb;
/*****************************************************************************
* Public Types
...
...
@@ -164,7 +171,7 @@ typedef struct _in_addr_t
unsigned
long
s_addr
;
/* load with inet_aton() */
}
in_addr
;
typedef
struct
_
sockaddr
_t
typedef
struct
sockaddr
{
uint16_t
sa_family
;
uint8_t
sa_data
[
14
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment