Skip to content

Commit 0577726

Browse files
committed
Merge remote-tracking branch 'remotes/gitee/master' into gitee_master
2 parents 79fd128 + aeff91b commit 0577726

File tree

1,136 files changed

+75802
-332856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,136 files changed

+75802
-332856
lines changed

.travis.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ env:
6666
# - RTT_BSP='mini4020' # no scons
6767
# - RTT_BSP='mm32l07x' # not support gcc
6868
# - RTT_BSP='nios_ii' # no scons
69-
- RTT_BSP='nuvoton_nuc472' RTT_TOOL_CHAIN='sourcery-arm'
70-
- RTT_BSP='nuvoton_m05x' RTT_TOOL_CHAIN='sourcery-arm'
69+
# - RTT_BSP='nuvoton_nuc472' RTT_TOOL_CHAIN='sourcery-arm'
70+
# - RTT_BSP='nuvoton_m05x' RTT_TOOL_CHAIN='sourcery-arm'
7171
# - RTT_BSP='pic32ethernet' # no scons
7272
- RTT_BSP='qemu-vexpress-a9' RTT_TOOL_CHAIN='sourcery-arm'
7373
- RTT_BSP='qemu-vexpress-gemini' RTT_TOOL_CHAIN='sourcery-arm'
@@ -123,6 +123,7 @@ env:
123123
- RTT_BSP='stm32/stm32l496-ali-developer' RTT_TOOL_CHAIN='sourcery-arm'
124124
- RTT_BSP='stm32/stm32l496-st-nucleo' RTT_TOOL_CHAIN='sourcery-arm'
125125
- RTT_BSP='stm32/stm32mp157a-st-discovery' RTT_TOOL_CHAIN='sourcery-arm'
126+
- RTT_BSP='stm32/stm32mp157a-st-ev1' RTT_TOOL_CHAIN='sourcery-arm'
126127
- RTT_BSP='stm32f20x' RTT_TOOL_CHAIN='sourcery-arm'
127128
- RTT_BSP='swm320-lq100' RTT_TOOL_CHAIN='sourcery-arm'
128129
# - RTT_BSP='taihu' RTT_TOOL_CHAIN='sourcery-ppc'
@@ -132,7 +133,7 @@ env:
132133
- RTT_BSP='zynq7000' RTT_TOOL_CHAIN='sourcery-arm'
133134
- RTT_BSP='frdm-k64f' RTT_TOOL_CHAIN='sourcery-arm'
134135
- RTT_BSP='fh8620' RTT_TOOL_CHAIN='sourcery-arm'
135-
- RTT_BSP='x1000' RTT_TOOL_CHAIN='sourcery-mips'
136+
# - RTT_BSP='x1000' RTT_TOOL_CHAIN='sourcery-mips'
136137
- RTT_BSP='xplorer4330/M4' RTT_TOOL_CHAIN='sourcery-arm'
137138
- RTT_BSP='at32/at32f403a-start' RTT_TOOL_CHAIN='sourcery-arm'
138139
- RTT_BSP='at32/at32f407-start' RTT_TOOL_CHAIN='sourcery-arm'

bsp/allwinner_tina/drivers/drv_gpio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ static const struct rt_pin_ops ops =
538538
pin_attach_irq,
539539
pin_detach_irq,
540540
pin_irq_enable,
541+
RT_NULL,
541542
};
542543
#endif
543544

bsp/apollo2/board/gpio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ const static struct rt_pin_ops am_pin_ops =
212212
am_pin_attach_irq,
213213
am_pin_dettach_irq,
214214
am_pin_irq_enable,
215+
RT_NULL,
215216
};
216217

217218
int rt_hw_pin_init(void)

bsp/at32/Libraries/rt_drivers/drv_eth.c

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,18 @@
3131
#define ETH_RXBUFNB 4
3232
#define ETH_TXBUFNB 2
3333

34+
#define LINK_THREAD_STACK_SIZE 256
35+
#define LINK_THREAD_PREORITY 21
36+
3437
extern ETH_DMADESCTypeDef *DMATxDescToSet;
3538
extern ETH_DMADESCTypeDef *DMARxDescToGet;
3639
extern ETH_DMADESCTypeDef *DMAPTPTxDescToSet;
3740
extern ETH_DMADESCTypeDef *DMAPTPRxDescToGet;
3841

3942
static ETH_DMADESCTypeDef DMARxDscrTab[ETH_RXBUFNB], DMATxDscrTab[ETH_TXBUFNB];
4043
static rt_uint8_t Rx_Buff[ETH_RXBUFNB][ETH_MAX_PACKET_SIZE], Tx_Buff[ETH_TXBUFNB][ETH_MAX_PACKET_SIZE];
44+
static struct rt_thread eth_link_thread;
45+
static rt_uint8_t eth_link_stack[LINK_THREAD_STACK_SIZE];
4146

4247
#define MAX_ADDR_LEN 6
4348
/* Gloable variables ---------------------------------------------------------*/
@@ -634,6 +639,37 @@ struct pbuf *rt_at32_eth_rx(rt_device_t dev)
634639
return p;
635640
}
636641

642+
static void eth_link_thread_entry(void *paramter)
643+
{
644+
uint8_t linked_down = 1;
645+
646+
struct netif *pnetif = at32_eth_device.parent.netif;
647+
648+
while(1){
649+
if((ETH_ReadPHYRegister(PHY_ADDRESS, PHY_BSR) & PHY_Linked_Status) && (linked_down == 1))
650+
{
651+
/* link up */
652+
linked_down = 0;
653+
#ifndef RT_LWIP_DHCP
654+
pnetif->ip_addr = inet_addr(RT_LWIP_IPADDR);
655+
pnetif->gw = inet_addr(RT_LWIP_GWADDR);
656+
pnetif->netmask = inet_addr(RT_LWIP_MSKADDR);
657+
#else
658+
IP4_ADDR(&(pnetif->ip_addr), 0, 0, 0, 0);
659+
IP4_ADDR(&(pnetif->netmask), 0, 0, 0, 0);
660+
IP4_ADDR(&(pnetif->gw), 0, 0, 0, 0);
661+
#endif
662+
eth_device_linkchange(&(at32_eth_device.parent), RT_TRUE);
663+
}else if(!(ETH_ReadPHYRegister(PHY_ADDRESS, PHY_BSR) & PHY_Linked_Status) && (linked_down == 0))
664+
{
665+
/* link down */
666+
linked_down = 1;
667+
eth_device_linkchange(&(at32_eth_device.parent), RT_FALSE);
668+
}
669+
rt_thread_mdelay(500);
670+
}
671+
}
672+
637673
/* interrupt service routine */
638674
void ETH_IRQHandler(void)
639675
{
@@ -707,9 +743,17 @@ static int rt_hw_at32_eth_init(void)
707743

708744
/* register eth device */
709745
state = eth_device_init(&(at32_eth_device.parent), "e0");
746+
710747
if (RT_EOK == state)
711748
{
712749
LOG_D("emac device init success");
750+
751+
state = rt_thread_init(&eth_link_thread, "eth_link_detect", eth_link_thread_entry, RT_NULL,
752+
&eth_link_stack[0], LINK_THREAD_STACK_SIZE, LINK_THREAD_PREORITY, 20);
753+
if (state == RT_EOK)
754+
{
755+
rt_thread_startup(&eth_link_thread);
756+
}
713757
}
714758
else
715759
{

bsp/at32/Libraries/rt_drivers/drv_gpio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ const static struct rt_pin_ops _at32_pin_ops =
496496
at32_pin_attach_irq,
497497
at32_pin_dettach_irq,
498498
at32_pin_irq_enable,
499+
RT_NULL,
499500
};
500501

501502
rt_inline void pin_irq_hdr(int irqno)

bsp/beaglebone/drivers/gpio.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ static struct rt_pin_ops am33xx_pin_ops =
8484
am33xx_pin_mode,
8585
am33xx_pin_write,
8686
am33xx_pin_read,
87+
RT_NULL,
88+
RT_NULL,
89+
RT_NULL,
90+
RT_NULL,
8791
};
8892

8993
int rt_hw_gpio_init(void)

bsp/efm32/rtconfig.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@
213213
/* SECTION: Runtime library */
214214
// #define RT_USING_NOLIBC
215215
// #define RT_USING_NEWLIB
216+
#define RT_LIBC_USING_TIME
216217

217218
/* SECTION: Console options */
218219
#define RT_USING_CONSOLE

bsp/essemi/es32f0271/drivers/drv_gpio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ const static struct rt_pin_ops _es32f0_pin_ops =
450450
es32f0_pin_attach_irq,
451451
es32f0_pin_detach_irq,
452452
es32f0_pin_irq_enable,
453+
RT_NULL,
453454
};
454455

455456
int rt_hw_pin_init(void)

bsp/essemi/es32f0334/drivers/drv_gpio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ const static struct rt_pin_ops _es32f0_pin_ops =
408408
es32f0_pin_attach_irq,
409409
es32f0_pin_detach_irq,
410410
es32f0_pin_irq_enable,
411+
RT_NULL,
411412
};
412413

413414
int rt_hw_pin_init(void)

bsp/essemi/es32f0654/drivers/drv_gpio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ const static struct rt_pin_ops _es32f0_pin_ops =
408408
es32f0_pin_attach_irq,
409409
es32f0_pin_detach_irq,
410410
es32f0_pin_irq_enable,
411+
RT_NULL,
411412
};
412413

413414
int rt_hw_pin_init(void)

0 commit comments

Comments
 (0)