sync: from 61124bba

1. driver:
  1). Fix hw_timer issue, #96;
  2). Fix SPI output data error;
  3). Fix SPI read data bug;
  4). Fix driver lib compile issue;
  5). Fix uart flow control issue;

2. lwip:
  1). Enable lwip ETHARP_TRUS_IP_MAC;
  2). Modify dhcp/dhcps timer from 60 seconds to 1 second;

3. WiFi:
  1). Support CSA;
This commit is contained in:
Espressif Systems
2017-05-27 11:13:46 +08:00
parent fdd3346291
commit e1e17a12c3
18 changed files with 102 additions and 31 deletions

View File

@ -16,7 +16,7 @@ extern "C" {
#endif
/** period (in seconds) of the application calling dhcp_coarse_tmr() */
#define DHCP_COARSE_TIMER_SECS 60
#define DHCP_COARSE_TIMER_SECS 1
/** period (in milliseconds) of the application calling dhcp_coarse_tmr() */
#define DHCP_COARSE_TIMER_MSECS (DHCP_COARSE_TIMER_SECS * 1000UL)
/** period (in milliseconds) of the application calling dhcp_fine_tmr() */
@ -46,9 +46,9 @@ struct dhcp
struct pbuf *p_out; /* pbuf of outcoming msg */
struct dhcp_msg *msg_out; /* outgoing msg */
u16_t options_out_len; /* outgoing msg options length */
u16_t request_timeout; /* #ticks with period DHCP_FINE_TIMER_SECS for request timeout */
u16_t t1_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for renewal time */
u16_t t2_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for rebind time */
u32_t request_timeout; /* #ticks with period DHCP_FINE_TIMER_SECS for request timeout */
u32_t t1_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for renewal time */
u32_t t2_timeout; /* #ticks with period DHCP_COARSE_TIMER_SECS for rebind time */
ip_addr_t server_ip_addr; /* dhcp server address that offered this lease */
ip_addr_t offered_ip_addr;
ip_addr_t offered_sn_mask;

View File

@ -48,6 +48,7 @@ typedef struct _list_node{
}list_node;
extern u32_t dhcps_lease_time;
#define DHCPS_COARSE_TIMER_SECS 1
#define DHCPS_LEASE_TIMER dhcps_lease_time //0x05A0
#define DHCPS_MAX_LEASE 0x64
#define BOOTP_BROADCAST 0x8000

View File

@ -163,6 +163,19 @@
*/
#define IP_REASS_MAX_PBUFS 10
/**
* ETHARP_TRUST_IP_MAC==1: Incoming IP packets cause the ARP table to be
* updated with the source MAC and IP addresses supplied in the packet.
* You may want to disable this if you do not trust LAN peers to have the
* correct addresses, or as a limited approach to attempt to handle
* spoofing. If disabled, lwIP will need to make a new ARP request if
* the peer is not already in the ARP table, adding a little latency.
* The peer *is* in the ARP table if it requested our address before.
* Also notice that this slows down input processing of every IP packet!
*/
#define ETHARP_TRUST_IP_MAC 1
/*
----------------------------------
---------- ICMP options ----------