From 2a15f73fd3ed21e96be6ca1874ad51e9a30891f0 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 17 Mar 2016 17:42:48 -0600 Subject: [PATCH] SAMV7 USB: Eliminate a warning --- arch/arm/src/samv7/sam_usbdevhs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/src/samv7/sam_usbdevhs.c b/arch/arm/src/samv7/sam_usbdevhs.c index e141028630..b42f4222a0 100644 --- a/arch/arm/src/samv7/sam_usbdevhs.c +++ b/arch/arm/src/samv7/sam_usbdevhs.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/samv7/sam_usbdevhs.c * - * Copyright (C) 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2015-2016 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * This code derives from the UDPHS device controller driver for the SAMA5D3. @@ -4734,10 +4734,10 @@ static void sam_sw_setup(struct sam_usbdev_s *priv) priv->eplist[epno].ep.maxpacket = SAM_USBHS_MAXPACKETSIZE(epno); } - /* Select a smaller endpoint size for EP0 */ +#if CONFIG_USBDEV_EP0_MAXSIZE < SAM_EP0_MAXPACKET + /* Select a smaller endpoint size for EP0 if so configured */ -#if SAM_EP0MAXPACKET < SAM_MAXPACKET_SIZE - priv->eplist[EP0].ep.maxpacket = SAM_EP0MAXPACKET; + priv->eplist[EP0].ep.maxpacket = CONFIG_USBDEV_EP0_MAXSIZE; #endif }