usbhw.h
Go to the documentation of this file.
1 /********************************************************************************************************
2  * @file usbhw.h
3  *
4  * @brief This is the header file for TLSR8258
5  *
6  * @author Driver Group
7  * @date May 8, 2018
8  *
9  * @par Copyright (c) 2018, Telink Semiconductor (Shanghai) Co., Ltd.
10  * All rights reserved.
11  *
12  * The information contained herein is confidential property of Telink
13  * Semiconductor (Shanghai) Co., Ltd. and is available under the terms
14  * of Commercial License Agreement between Telink Semiconductor (Shanghai)
15  * Co., Ltd. and the licensee or the terms described here-in. This heading
16  * MUST NOT be removed from this file.
17  *
18  * Licensees are granted free, non-transferable use of the information in this
19  * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
20  * @par History:
21  * 1.initial release(DEC. 26 2018)
22  *
23  * @version A001
24  *
25  *******************************************************************************************************/
26 #pragma once
27 
28 #include "register.h"
29 #include "analog.h"
30 #include "gpio.h"
38 
45 
53 void usbhw_write_ep(unsigned int ep, unsigned char * data, int len);
54 
61 void usbhw_write_ctrl_ep_u16(unsigned short v);
62 
68 unsigned short usbhw_read_ctrl_ep_u16(void);
69 
void usbhw_write_ep(unsigned int ep, unsigned char *data, int len)
This function sends a bulk of data to host via the specified endpoint.
void usbhw_write_ctrl_ep_u16(unsigned short v)
This function sends two bytes data to host via the control endpoint (handy help function) ...
void usbhw_disable_manual_interrupt(int m)
This function disables the manual interrupt (Endpont8 is the alias of endpoint0)
void usbhw_enable_manual_interrupt(int m)
This function enable the manual interrupt.
unsigned short usbhw_read_ctrl_ep_u16(void)
This function reads two bytes data from host via the control endpoint.