Option for lwip link status poll interval.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5047 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
fe7aa77ae0
commit
9754c3a6ce
|
@ -177,7 +177,7 @@ typedef struct MACDriver MACDriver;
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
#define magGetNextReceiveBuffer(rdp, sizep) \
|
#define macGetNextReceiveBuffer(rdp, sizep) \
|
||||||
mac_lld_get_next_receive_buffer(rdp, sizep)
|
mac_lld_get_next_receive_buffer(rdp, sizep)
|
||||||
#endif /* MAC_USE_ZERO_COPY */
|
#endif /* MAC_USE_ZERO_COPY */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
|
@ -262,7 +262,7 @@ msg_t lwip_thread(void *p) {
|
||||||
netif_set_up(&thisif);
|
netif_set_up(&thisif);
|
||||||
|
|
||||||
/* Setup event sources.*/
|
/* Setup event sources.*/
|
||||||
evtInit(&evt, S2ST(5));
|
evtInit(&evt, LWIP_LINK_POLL_INTERVAL);
|
||||||
evtStart(&evt);
|
evtStart(&evt);
|
||||||
chEvtRegisterMask(&evt.et_es, &el0, PERIODIC_TIMER_ID);
|
chEvtRegisterMask(&evt.et_es, &el0, PERIODIC_TIMER_ID);
|
||||||
chEvtRegisterMask(macGetReceiveEventSource(ÐD1), &el1, FRAME_RECEIVED_ID);
|
chEvtRegisterMask(macGetReceiveEventSource(ÐD1), &el1, FRAME_RECEIVED_ID);
|
||||||
|
|
|
@ -30,77 +30,82 @@
|
||||||
|
|
||||||
/** @brief MAC thread priority.*/
|
/** @brief MAC thread priority.*/
|
||||||
#ifndef LWIP_THREAD_PRIORITY
|
#ifndef LWIP_THREAD_PRIORITY
|
||||||
#define LWIP_THREAD_PRIORITY LOWPRIO
|
#define LWIP_THREAD_PRIORITY LOWPRIO
|
||||||
#endif
|
|
||||||
|
|
||||||
/** @brief IP Address. */
|
|
||||||
#if !defined(LWIP_IPADDR) || defined(__DOXYGEN__)
|
|
||||||
#define LWIP_IPADDR(p) IP4_ADDR(p, 192, 168, 1, 20)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** @brief IP Gateway. */
|
|
||||||
#if !defined(LWIP_GATEWAY) || defined(__DOXYGEN__)
|
|
||||||
#define LWIP_GATEWAY(p) IP4_ADDR(p, 192, 168, 1, 1)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/** @brief IP netmask. */
|
|
||||||
#if !defined(LWIP_NETMASK) || defined(__DOXYGEN__)
|
|
||||||
#define LWIP_NETMASK(p) IP4_ADDR(p, 255, 255, 255, 0)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief MAC thread stack size. */
|
/** @brief MAC thread stack size. */
|
||||||
#if !defined(LWIP_THREAD_STACK_SIZE) || defined(__DOXYGEN__)
|
#if !defined(LWIP_THREAD_STACK_SIZE) || defined(__DOXYGEN__)
|
||||||
#define LWIP_THREAD_STACK_SIZE 512
|
#define LWIP_THREAD_STACK_SIZE 512
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @brief Link poll interval. */
|
||||||
|
#if !defined(LWIP_LINK_POLL_INTERVAL) || defined(__DOXYGEN__)
|
||||||
|
#define LWIP_LINK_POLL_INTERVAL S2ST(5)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @brief IP Address. */
|
||||||
|
#if !defined(LWIP_IPADDR) || defined(__DOXYGEN__)
|
||||||
|
#define LWIP_IPADDR(p) IP4_ADDR(p, 192, 168, 1, 20)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @brief IP Gateway. */
|
||||||
|
#if !defined(LWIP_GATEWAY) || defined(__DOXYGEN__)
|
||||||
|
#define LWIP_GATEWAY(p) IP4_ADDR(p, 192, 168, 1, 1)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @brief IP netmask. */
|
||||||
|
#if !defined(LWIP_NETMASK) || defined(__DOXYGEN__)
|
||||||
|
#define LWIP_NETMASK(p) IP4_ADDR(p, 255, 255, 255, 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief Transmission timeout. */
|
/** @brief Transmission timeout. */
|
||||||
#if !defined(LWIP_SEND_TIMEOUT) || defined(__DOXYGEN__)
|
#if !defined(LWIP_SEND_TIMEOUT) || defined(__DOXYGEN__)
|
||||||
#define LWIP_SEND_TIMEOUT 50
|
#define LWIP_SEND_TIMEOUT 50
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief Link speed. */
|
/** @brief Link speed. */
|
||||||
#if !defined(LWIP_LINK_SPEED) || defined(__DOXYGEN__)
|
#if !defined(LWIP_LINK_SPEED) || defined(__DOXYGEN__)
|
||||||
#define LWIP_LINK_SPEED 100000000
|
#define LWIP_LINK_SPEED 100000000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief MAC Address byte 0. */
|
/** @brief MAC Address byte 0. */
|
||||||
#if !defined(LWIP_ETHADDR_0) || defined(__DOXYGEN__)
|
#if !defined(LWIP_ETHADDR_0) || defined(__DOXYGEN__)
|
||||||
#define LWIP_ETHADDR_0 0xC2
|
#define LWIP_ETHADDR_0 0xC2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief MAC Address byte 1. */
|
/** @brief MAC Address byte 1. */
|
||||||
#if !defined(LWIP_ETHADDR_1) || defined(__DOXYGEN__)
|
#if !defined(LWIP_ETHADDR_1) || defined(__DOXYGEN__)
|
||||||
#define LWIP_ETHADDR_1 0xAF
|
#define LWIP_ETHADDR_1 0xAF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief MAC Address byte 2. */
|
/** @brief MAC Address byte 2. */
|
||||||
#if !defined(LWIP_ETHADDR_2) || defined(__DOXYGEN__)
|
#if !defined(LWIP_ETHADDR_2) || defined(__DOXYGEN__)
|
||||||
#define LWIP_ETHADDR_2 0x51
|
#define LWIP_ETHADDR_2 0x51
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief MAC Address byte 3. */
|
/** @brief MAC Address byte 3. */
|
||||||
#if !defined(LWIP_ETHADDR_3) || defined(__DOXYGEN__)
|
#if !defined(LWIP_ETHADDR_3) || defined(__DOXYGEN__)
|
||||||
#define LWIP_ETHADDR_3 0x03
|
#define LWIP_ETHADDR_3 0x03
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief MAC Address byte 4. */
|
/** @brief MAC Address byte 4. */
|
||||||
#if !defined(LWIP_ETHADDR_4) || defined(__DOXYGEN__)
|
#if !defined(LWIP_ETHADDR_4) || defined(__DOXYGEN__)
|
||||||
#define LWIP_ETHADDR_4 0xCF
|
#define LWIP_ETHADDR_4 0xCF
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief MAC Address byte 5. */
|
/** @brief MAC Address byte 5. */
|
||||||
#if !defined(LWIP_ETHADDR_5) || defined(__DOXYGEN__)
|
#if !defined(LWIP_ETHADDR_5) || defined(__DOXYGEN__)
|
||||||
#define LWIP_ETHADDR_5 0x46
|
#define LWIP_ETHADDR_5 0x46
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief Interface name byte 0. */
|
/** @brief Interface name byte 0. */
|
||||||
#if !defined(LWIP_IFNAME0) || defined(__DOXYGEN__)
|
#if !defined(LWIP_IFNAME0) || defined(__DOXYGEN__)
|
||||||
#define LWIP_IFNAME0 'm'
|
#define LWIP_IFNAME0 'm'
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** @brief Interface name byte 1. */
|
/** @brief Interface name byte 1. */
|
||||||
#if !defined(LWIP_IFNAME1) || defined(__DOXYGEN__)
|
#if !defined(LWIP_IFNAME1) || defined(__DOXYGEN__)
|
||||||
#define LWIP_IFNAME1 's'
|
#define LWIP_IFNAME1 's'
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -98,6 +98,7 @@
|
||||||
TODO: Create a FatFS wrapper implementing the interface and using a server
|
TODO: Create a FatFS wrapper implementing the interface and using a server
|
||||||
thread for synchronization.
|
thread for synchronization.
|
||||||
TODO: Create an implementation over a read-only file system in code space.
|
TODO: Create an implementation over a read-only file system in code space.
|
||||||
|
- NEW: Added an option to lwipthread to change the link status poll interval.
|
||||||
- NEW: Added new C++ demo for the STM32F4-Discovery.
|
- NEW: Added new C++ demo for the STM32F4-Discovery.
|
||||||
- NEW: Updated C++ wrapper with a much more logical classes structure.
|
- NEW: Updated C++ wrapper with a much more logical classes structure.
|
||||||
TODO: Opdate older C++ demos.
|
TODO: Opdate older C++ demos.
|
||||||
|
|
Loading…
Reference in New Issue