commit
36538b2914
|
@ -141,10 +141,11 @@ __Vectors DCD __initial_sp ; Top of Stack
|
|||
DCD TRNG_IRQHandler ; 96:TRNG
|
||||
DCD FPU_IRQHandler ; 97:FPU
|
||||
DCD UART6_IRQHandler ; 98:UART6
|
||||
DCD UART7_IRQHandler ; 98:UART7
|
||||
DCD UART7_IRQHandler ; 99:UART7
|
||||
DCD SPI3_IRQHandler ; 100:SPI3
|
||||
DCD SPI4_IRQHandler ; 101:SPI4
|
||||
DCD SPI5_IRQHandler ; 102:SPI5
|
||||
DCD 0 ; 103:Reserved
|
||||
DCD TLI_IRQHandler ; 104:TLI
|
||||
DCD TLI_ER_IRQHandler ; 105:TLI Error
|
||||
DCD IPA_IRQHandler ; 106:IPA
|
||||
|
|
|
@ -104,6 +104,7 @@ g_pfnVectors:
|
|||
.word CAN1_TX_IRQHandler // 79:CAN1 TX
|
||||
.word CAN1_RX0_IRQHandler // 80:CAN1 RX0
|
||||
.word CAN1_RX1_IRQHandler // 81:CAN1 RX1
|
||||
.word CAN1_EWMC_IRQHandler // 82:CAN1 EWMC
|
||||
.word USBFS_IRQHandler // 83:USBFS
|
||||
.word DMA1_Channel5_IRQHandler // 84:DMA1 Channel5
|
||||
.word DMA1_Channel6_IRQHandler // 85:DMA1 Channel6
|
||||
|
@ -120,10 +121,11 @@ g_pfnVectors:
|
|||
.word TRNG_IRQHandler // 96:TRNG
|
||||
.word FPU_IRQHandler // 97:FPU
|
||||
.word UART6_IRQHandler // 98:UART6
|
||||
.word UART7_IRQHandler // 98:UART7
|
||||
.word UART7_IRQHandler // 99:UART7
|
||||
.word SPI3_IRQHandler // 100:SPI3
|
||||
.word SPI4_IRQHandler // 101:SPI4
|
||||
.word SPI5_IRQHandler // 102:SPI5
|
||||
.word 0 // 103:Reserved
|
||||
.word TLI_IRQHandler // 104:TLI
|
||||
.word TLI_ER_IRQHandler // 105:TLI Error
|
||||
.word IPA_IRQHandler // 106:IPA
|
||||
|
|
|
@ -125,10 +125,11 @@ __vector_table
|
|||
DCD TRNG_IRQHandler ; 96:TRNG
|
||||
DCD FPU_IRQHandler ; 97:FPU
|
||||
DCD UART6_IRQHandler ; 98:UART6
|
||||
DCD UART7_IRQHandler ; 98:UART7
|
||||
DCD UART7_IRQHandler ; 99:UART7
|
||||
DCD SPI3_IRQHandler ; 100:SPI3
|
||||
DCD SPI4_IRQHandler ; 101:SPI4
|
||||
DCD SPI5_IRQHandler ; 102:SPI5
|
||||
DCD 0 ; 103:Reserved
|
||||
DCD TLI_IRQHandler ; 104:TLI
|
||||
DCD TLI_ER_IRQHandler ; 105:TLI Error
|
||||
DCD IPA_IRQHandler ; 106:IPA
|
||||
|
|
|
@ -233,7 +233,7 @@ int stm32_flash_erase(rt_uint32_t addr, size_t size)
|
|||
HAL_FLASH_Unlock();
|
||||
|
||||
/* Clear OPTVERR bit set on virgin samples */
|
||||
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR);
|
||||
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR | FLASH_FLAG_PGSERR);
|
||||
/* Get the 1st page to erase */
|
||||
FirstPage = GetPage(addr);
|
||||
/* Get the number of pages to erase from 1st page */
|
||||
|
|
|
@ -109,7 +109,7 @@ int rt_wdt_init(void)
|
|||
|
||||
stm32_wdt.hiwdg.Init.Reload = 0x00000FFF;
|
||||
#if defined(SOC_SERIES_STM32F0) || defined(SOC_SERIES_STM32L4) || defined(SOC_SERIES_STM32F7) \
|
||||
|| defined(SOC_SERIES_STM32H7) || defined(SOC_SERIES_STM32L0)
|
||||
|| defined(SOC_SERIES_STM32H7) || defined(SOC_SERIES_STM32L0) || defined(SOC_SERIES_STM32G0)
|
||||
stm32_wdt.hiwdg.Init.Window = 0x00000FFF;
|
||||
#endif
|
||||
stm32_wdt.is_start = 0;
|
||||
|
|
|
@ -264,6 +264,10 @@ static void client_cli_parser(at_client_t client)
|
|||
}
|
||||
else
|
||||
{
|
||||
if(cur_line_len >= FINSH_CMD_SIZE)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
rt_kprintf("%c", ch);
|
||||
cur_line[cur_line_len++] = ch;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,14 @@
|
|||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#ifdef RT_USING_BIG_ENDIAN
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#else
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif /* RT_USING_BIG_ENDIAN */
|
||||
#endif /* BYTE_ORDER */
|
||||
|
||||
typedef uint8_t u8_t;
|
||||
typedef int8_t s8_t;
|
||||
typedef uint16_t u16_t;
|
||||
|
|
|
@ -39,14 +39,10 @@
|
|||
|
||||
#include <rtthread.h>
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#define SYS_MBOX_NULL RT_NULL
|
||||
#define SYS_SEM_NULL RT_NULL
|
||||
|
||||
typedef u32_t sys_prot_t;
|
||||
typedef rt_uint32_t sys_prot_t;
|
||||
|
||||
#define SYS_MBOX_SIZE 10
|
||||
#define SYS_LWIP_TIMER_NAME "timer"
|
||||
|
|
|
@ -37,10 +37,6 @@
|
|||
|
||||
#define LWIP_PLATFORM_BYTESWAP 0
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
/* #define RT_LWIP_DEBUG */
|
||||
|
||||
#ifdef RT_LWIP_DEBUG
|
||||
|
|
|
@ -39,6 +39,14 @@
|
|||
#include <rtthread.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#ifdef RT_USING_BIG_ENDIAN
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#else
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif /* RT_USING_BIG_ENDIAN */
|
||||
#endif /* BYTE_ORDER */
|
||||
|
||||
#define U16_F "hu"
|
||||
#define S16_F "hd"
|
||||
#define X16_F "hx"
|
||||
|
|
|
@ -39,14 +39,10 @@
|
|||
|
||||
#include <rtthread.h>
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#define SYS_MBOX_NULL RT_NULL
|
||||
#define SYS_SEM_NULL RT_NULL
|
||||
|
||||
typedef u32_t sys_prot_t;
|
||||
typedef rt_uint32_t sys_prot_t;
|
||||
|
||||
#define SYS_MBOX_SIZE 10
|
||||
#define SYS_LWIP_TIMER_NAME "timer"
|
||||
|
|
|
@ -45,10 +45,6 @@
|
|||
|
||||
#define LWIP_PLATFORM_BYTESWAP 0
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
/* #define RT_LWIP_DEBUG */
|
||||
|
||||
#ifdef RT_LWIP_DEBUG
|
||||
|
|
|
@ -39,6 +39,13 @@
|
|||
#include <rtthread.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#ifdef RT_USING_BIG_ENDIAN
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#else
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif /* RT_USING_BIG_ENDIAN */
|
||||
#endif /* BYTE_ORDER */
|
||||
|
||||
#define U16_F "hu"
|
||||
#define S16_F "hd"
|
||||
|
|
|
@ -36,17 +36,12 @@
|
|||
#define __ARCH_SYS_ARCH_H__
|
||||
|
||||
#include "arch/cc.h"
|
||||
|
||||
#include <rtthread.h>
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#define SYS_MBOX_NULL RT_NULL
|
||||
#define SYS_SEM_NULL RT_NULL
|
||||
|
||||
typedef u32_t sys_prot_t;
|
||||
typedef rt_uint32_t sys_prot_t;
|
||||
|
||||
#define SYS_MBOX_SIZE 10
|
||||
#define SYS_LWIP_TIMER_NAME "timer"
|
||||
|
|
|
@ -45,10 +45,6 @@
|
|||
|
||||
#define LWIP_PLATFORM_BYTESWAP 0
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
/* #define RT_LWIP_DEBUG */
|
||||
|
||||
#ifdef RT_LWIP_DEBUG
|
||||
|
|
|
@ -39,6 +39,14 @@
|
|||
#include <rtthread.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#ifdef RT_USING_BIG_ENDIAN
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#else
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif /* RT_USING_BIG_ENDIAN */
|
||||
#endif /* BYTE_ORDER */
|
||||
|
||||
#define U16_F "hu"
|
||||
#define S16_F "hd"
|
||||
#define X16_F "hx"
|
||||
|
|
|
@ -36,17 +36,12 @@
|
|||
#define __ARCH_SYS_ARCH_H__
|
||||
|
||||
#include "arch/cc.h"
|
||||
|
||||
#include <rtthread.h>
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#define SYS_MBOX_NULL RT_NULL
|
||||
#define SYS_SEM_NULL RT_NULL
|
||||
|
||||
typedef u32_t sys_prot_t;
|
||||
typedef rt_uint32_t sys_prot_t;
|
||||
|
||||
#define SYS_MBOX_SIZE 10
|
||||
#define SYS_LWIP_TIMER_NAME "timer"
|
||||
|
|
|
@ -360,7 +360,7 @@ err_t sys_mutex_new(sys_mutex_t *mutex)
|
|||
rt_snprintf(tname, RT_NAME_MAX, "%s%d", SYS_LWIP_MUTEX_NAME, counter);
|
||||
counter ++;
|
||||
|
||||
tmpmutex = rt_mutex_create(tname, RT_IPC_FLAG_FIFO);
|
||||
tmpmutex = rt_mutex_create(tname, RT_IPC_FLAG_PRIO);
|
||||
if (tmpmutex == RT_NULL)
|
||||
return ERR_MEM;
|
||||
else
|
||||
|
@ -779,6 +779,32 @@ void ppp_trace(int level, const char *format, ...)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef LWIP_HOOK_IP4_ROUTE_SRC
|
||||
struct netif *lwip_ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src)
|
||||
{
|
||||
struct netif *netif;
|
||||
|
||||
/* iterate through netifs */
|
||||
for (netif = netif_list; netif != NULL; netif = netif->next)
|
||||
{
|
||||
/* is the netif up, does it have a link and a valid address? */
|
||||
if (netif_is_up(netif) && netif_is_link_up(netif) && !ip4_addr_isany_val(*netif_ip4_addr(netif)))
|
||||
{
|
||||
/* gateway matches on a non broadcast interface? (i.e. peer in a point to point interface) */
|
||||
if (src != NULL)
|
||||
{
|
||||
if (ip4_addr_cmp(src, netif_ip4_addr(netif)))
|
||||
{
|
||||
return netif;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
netif = netif_default;
|
||||
return netif;
|
||||
}
|
||||
#endif /* LWIP_HOOK_IP4_ROUTE_SRC */
|
||||
|
||||
/*
|
||||
* export bsd socket symbol for RT-Thread Application Module
|
||||
*/
|
||||
|
|
|
@ -47,10 +47,6 @@
|
|||
|
||||
#define LWIP_PLATFORM_BYTESWAP 0
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
/* #define RT_LWIP_DEBUG */
|
||||
|
||||
#ifdef RT_LWIP_DEBUG
|
||||
|
@ -648,4 +644,8 @@
|
|||
#endif
|
||||
|
||||
|
||||
#define LWIP_HOOK_IP4_ROUTE_SRC(dest, src) lwip_ip4_route_src(dest, src)
|
||||
#include "lwip/ip_addr.h"
|
||||
struct netif *lwip_ip4_route_src(const ip4_addr_t *dest, const ip4_addr_t *src);
|
||||
|
||||
#endif /* __LWIPOPTS_H__ */
|
||||
|
|
Loading…
Reference in New Issue