2 * @brief This file contains common macros, APIs for upper layer (DCD, HCD) call,
\r
3 * relating to init/deinit USB core, enable/disable USB interrupt...
\r
6 * Copyright(C) NXP Semiconductors, 2012
\r
7 * All rights reserved.
\r
10 * Software that is described herein is for illustrative purposes only
\r
11 * which provides customers with programming information regarding the
\r
12 * LPC products. This software is supplied "AS IS" without any warranties of
\r
13 * any kind, and NXP Semiconductors and its licensor disclaim any and
\r
14 * all warranties, express or implied, including all implied warranties of
\r
15 * merchantability, fitness for a particular purpose and non-infringement of
\r
16 * intellectual property rights. NXP Semiconductors assumes no responsibility
\r
17 * or liability for the use of the software, conveys no license or rights under any
\r
18 * patent, copyright, mask work right, or any other intellectual property rights in
\r
19 * or to any products. NXP Semiconductors reserves the right to make changes
\r
20 * in the software without notification. NXP Semiconductors also makes no
\r
21 * representation or warranty that such application will be suitable for the
\r
22 * specified use without further testing or modification.
\r
25 * Permission to use, copy, modify, and distribute this software and its
\r
26 * documentation is hereby granted, under NXP Semiconductors' and its
\r
27 * licensor's relevant copyrights in the software, without fee, provided that it
\r
28 * is used in conjunction with NXP Semiconductors microcontrollers. This
\r
29 * copyright, permission, and disclaimer notice must appear in all copies of
\r
33 /** @ingroup Group_USB
\r
34 * @defgroup Group_HAL_LPC Hardware Abstraction Layer
\r
35 * @brief Hardware Abstraction Layer for LPC architecture
\r
39 #ifndef __LPC_HAL_H__
\r
40 #define __LPC_HAL_H__
\r
43 /** These macros used to declare a variable in a defined section (ex: USB RAM section). */
\r
45 #include <cr_section_macros.h>
\r
47 /* Chip Includes: */
\r
48 #if defined(__LPC18XX__) || defined(__LPC43XX__)
\r
49 #include "LPC18XX/HAL_LPC18xx.h"
\r
50 #elif defined(__LPC175X_6X__) || defined(__LPC177X_8X__) || defined(__LPC407X_8X__)
\r
51 #include "LPC17XX/HAL_LPC17xx.h"
\r
52 #elif defined(__LPC11U1X__) || defined(__LPC11U2X_3X__) || defined(__LPC1347__)
\r
53 #include "LPC11UXX/HAL_LPC11Uxx.h"
\r
55 /* Function Prototypes: */
\r
57 * @brief This function is called by void USB_Init(void) to do the initialization for chip's USB core.
\r
58 * Normally, this function will do the following:
\r
59 * - Configure USB pins
\r
60 * - Setup USB core clock
\r
61 * - Call HAL_RESET to setup needed USB operating registers, set device address 0 if running device mode
\r
62 * @param corenum : USB port number
\r
65 void HAL_USBInit(uint8_t corenum);
\r
68 * @brief This function usage is opposite to HAL_USBInit
\r
69 * @param corenum : USB port number
\r
70 * @param mode : USB mode
\r
73 void HAL_USBDeInit(uint8_t corenum, uint8_t mode);
\r
76 * @brief This function used to enable USB interrupt
\r
77 * @param corenum : USB port number
\r
80 void HAL_EnableUSBInterrupt(uint8_t corenum);
\r
83 * @brief This function usage is opposite to HAL_EnableUSBInterrupt
\r
84 * @param corenum : USB port number
\r
87 void HAL_DisableUSBInterrupt(uint8_t corenum);
\r
89 /** This function is used in device mode to pull up resistor on USB pin D+
\r
90 * Normally, this function is called when every setup or initial are done.
\r
93 * @brief This function is used in device mode to pull up resistor on USB pin D+
\r
94 * Normally, this function is called when every setup or initial are done.
\r
95 * @param corenum : USB port number
\r
96 * @param con : connect or disconect
\r
99 void HAL_USBConnect (uint8_t corenum, uint32_t con);
\r
101 /* Selected USB Port Number */
\r
102 extern uint8_t USBPortNum;
\r
103 #endif /*__LPC_HAL_H__*/
\r
104 /* --------------------------------- End Of File ------------------------------ */
\r