]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - transport-layer/transport-layer.git/blob - tl.h
Adding HTML manifest
[transport-layer/transport-layer.git] / tl.h
1 /**
2   @headerfile:    peripheral.h
3   $Date: 2014-05-22 14:49:51 -0700 (Thu, 22 May 2014) $
4   $Revision: 38618 $
6   @mainpage Transport Layer implementation
8   Copyright (c) 2015, Texas Instruments
9   All rights reserved.
11   Redistribution and use in source and binary forms, with or without
12   modification, are permitted provided that the following conditions are met:
13   1. Redistributions of source code must retain the above copyright
14      notice, this list of conditions and the following disclaimer.
15   2. Redistributions in binary form must reproduce the above copyright
16      notice, this list of conditions and the following disclaimer in the
17      documentation and/or other materials provided with the distribution.
18   3. All advertising materials mentioning features or use of this software
19      must display the following acknowledgement:
20      This product includes software developed by the Texas Instruments.
21   4. Neither the name of the Texas Instruments nor the
22      names of its contributors may be used to endorse or promote products
23      derived from this software without specific prior written permission.
25   THIS SOFTWARE IS PROVIDED BY Texas Instruments ''AS IS'' AND ANY
26   EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
28   DISCLAIMED. IN NO EVENT SHALL Texas Instruments BE LIABLE FOR ANY
29   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30   (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31   LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
32   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 */
37 #ifndef TL_H
38 #define TL_H
40 #ifdef __cplusplus
41 extern "C"
42 {
43 #endif
45 /*********************************************************************
46  * Profile Callbacks
47  */
49 // Callback when data needs to be parsed from TL
50 typedef void (*TLpacketparser_t)( void );
52 typedef struct
53 {
54   TLpacketparser_t        pfnTLpacketparser;  // Called there is data to parse
55 } TLCBs_t;
57 /*********************************************************************
58  * Function APIs
59  */
61 extern void TL_handleISRevent(void);
63 extern void TLinit(ICall_Semaphore *pAppSem, TLCBs_t *appCallbacks,
64                   uint16_t TX_DONE_EVENT, uint16_t RX_EVENT, uint16_t MRDY_EVENT );
66 extern void TLwrite (uint8_t *buf, uint8_t len);
67 extern void TLread (uint8_t *buf, uint8_t len);
68 extern uint16_t TLgetRxBufLen (void);
70 #ifdef __cplusplus
71 }
72 #endif
74 #endif /* TL_H */