Merge remote-tracking branch 'origin/master' into ieee802154

This commit is contained in:
Gregory Nutt
2017-06-19 07:53:57 -06:00
3 changed files with 30 additions and 4 deletions
+5
View File
@@ -67,6 +67,7 @@
#include "up_internal.h"
#include "up_arch.h"
#include "cache.h"
#include "chip.h"
#include "stm32_rcc.h"
#include "stm32_tim.h"
@@ -1131,6 +1132,9 @@ static void adc_dmaconvcallback(DMA_HANDLE handle, uint8_t isr, FAR void *arg)
FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv;
int i;
arch_invalidate_dcache((uintptr_t)priv->dmabuffer,
(uintptr_t)priv->dmabuffer + sizeof(priv->dmabuffer));
/* Verify that the upper-half driver has bound its callback functions */
if (priv->cb != NULL)
@@ -1149,6 +1153,7 @@ static void adc_dmaconvcallback(DMA_HANDLE handle, uint8_t isr, FAR void *arg)
}
}
}
/* Restart DMA for the next conversion series */
adc_modifyreg(priv, STM32_ADC_DMAREG_OFFSET, ADC_DMAREG_DMA, 0);
+18 -2
View File
@@ -156,7 +156,15 @@ int ipv4_getsockname(FAR struct socket *psock, FAR struct sockaddr *addr,
net_lock();
#ifdef CONFIG_NETDEV_MULTINIC
/* Find the device matching the IPv4 address in the connection structure */
/* Find the device matching the IPv4 address in the connection structure.
* NOTE: listening sockets have no ripaddr. Work around is to use the
* lipaddr when ripaddr is not available.
*/
`
if (ripaddr == 0)
{
ripaddr = lipaddr;
}
dev = netdev_findby_ipv4addr(lipaddr, ripaddr);
#else
@@ -279,7 +287,15 @@ int ipv6_getsockname(FAR struct socket *psock, FAR struct sockaddr *addr,
net_lock();
#ifdef CONFIG_NETDEV_MULTINIC
/* Find the device matching the IPv6 address in the connection structure */
/* Find the device matching the IPv6 address in the connection structure.
* NOTE: listening sockets have no ripaddr. Work around is to use the
* lipaddr when ripaddr is not available.
*/
if (net_ipv6addr_cmp(ripaddr, g_ipv6_allzeroaddr))
{
ripaddr = lipaddr;
}
dev = netdev_findby_ipv6addr(*lipaddr, *ripaddr);
#else
+6 -1
View File
@@ -151,7 +151,12 @@ int psock_listen(FAR struct socket *psock, int backlog)
* accept() is called and enables poll()/select() logic.
*/
tcp_listen(conn);
errcode = tcp_listen(conn);
if (errcode < 0)
{
errcode = -errcode;
goto errout;
}
#else
errcode = EOPNOTSUPP;
goto errout;