usb: Move LOW_BYTE and HIGH_BYTE to samples code

Move LOW_BYTE and HIGH_BYTE macros from usb_common.h to
samples code.

Change-Id: I26296bde8c5b3991b3bfab71272c861b5360ce97
Signed-off-by: Adrian Bradianu <adrian.bradianu@windriver.com>
Signed-off-by: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
This commit is contained in:
Adrian Bradianu 2016-06-14 19:29:07 +03:00 committed by Inaky Perez-Gonzalez
commit ab2c18b0ad
3 changed files with 8 additions and 4 deletions

View file

@ -78,10 +78,6 @@
*/
#define USB_CONFIGURATION_ATTRIBUTES 0xC0
/* Misc. macros */
#define LOW_BYTE(x) ((x)&0xFF)
#define HIGH_BYTE(x) ((x)>>8)
/* Classes */
#define COMMUNICATION_DEVICE_CLASS 0x02
#define COMMUNICATION_DEVICE_CLASS_DATA 0x0A

View file

@ -62,6 +62,10 @@
#define DFU_FLASH_ADDR (dfu_data.flash_base_addr + \
dfu_data.alt_setting * DFU_ALT_SETTING_OFFSET)
/* Misc. macros */
#define LOW_BYTE(x) ((x) & 0xFF)
#define HIGH_BYTE(x) ((x) >> 8)
static struct usb_cfg_data dfu_config;
/* Device data structure */

View file

@ -74,6 +74,10 @@ static struct uart_driver_api cdc_acm_driver_api;
/* Size of the internal buffer used for storing received data */
#define CDC_ACM_BUFFER_SIZE (2 * CDC_BULK_EP_MPS)
/* Misc. macros */
#define LOW_BYTE(x) ((x) & 0xFF)
#define HIGH_BYTE(x) ((x) >> 8)
struct device *cdc_acm_dev;
/* Device data structure */