usbprv.h
2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef __usbprv_h__
#define __usbprv_h__ 1
/*HEADER******************************************************************
**************************************************************************
***
*** Copyright (c) 2001-2002 ARC International.
*** All rights reserved
***
*** This software embodies materials and concepts which are
*** confidential to ARC International and is made
*** available solely pursuant to the terms of a written license
*** agreement with ARC International
***
*** File: usbprv.h
***
*** Comments:
*** This file contains the internal USB speicifc type definitions
***
**************************************************************************
*END*********************************************************************/
#ifndef __USB_OS_MQX__
#include "stdlib.h"
#include "string.h"
#define USB_lock() _disable_interrupts()
#define USB_unlock() _enable_interrupts()
#define USB_memalloc(n) malloc(n)
#define USB_memfree(ptr)
#define USB_memzero(ptr,n) memset(ptr,0,n)
#define USB_memcopy(src,dst,n) memcpy(dst,src,n)
#define USB_install_isr(vector, isr, data) USB_int_install_isr(vector, isr, data)
extern uint_8 _bsp_get_usb_vector(uint_8);
extern pointer _bsp_get_usb_base(uint_8);
#else
#define USB_lock() _int_disable()
#define USB_unlock() _int_enable()
#define USB_memalloc(n) _mem_alloc_system_zero(n)
#define USB_memfree(ptr) _mem_free(ptr)
#define USB_memzero(ptr,n) _mem_zero(ptr,n)
#define USB_memcopy(src,dst,n) _mem_copy(src,dst,n)
#define USB_install_isr(vector, isr, data) _int_install_isr(vector, isr, data)
#endif
#endif
/* EOF */