FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/gpf/tst_drv/stack1_Serial.h @ 416:c2e14cc15c23
flash erase-program-boot: implemented CRC check before flashing
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Tue, 17 Jun 2014 07:33:25 +0000 |
parents | 5d1e22505446 |
children |
rev | line source |
---|---|
322
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /*============================================================================= |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 * Copyright 1996-2001 Texas Instruments Inc. All rights reserved. |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 */ |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 #ifndef STACK1_SERIAL_HEADER |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 #define STACK1_SERIAL_HEADER |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 //#include "puf_PrimHdr.h" |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 /*============================================================================= |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 * Description: |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 */ |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 //typedef struct{ |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 // Puf_PrimHdr primHdr; |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 //}Stack1_Serial_RxInd; |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 typedef void (*SERIAL_CALLBACK_FUNC)(void); |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 /*=========================================================================== |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 * Description: |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 * Install the Uart interrupt handlers and initialize the Uart. |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 */ |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 int |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 stack1_Serial_PowerUp( SERIAL_CALLBACK_FUNC callback ); |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 /*=========================================================================== |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 * Description: |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 * Copy the data from the Rx buffer into the passed in buffer. If there |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 * aren't dataLen bytes in the Rx buffer all the bytes currently in the rx |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 * buffer are returned. |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 */ |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 unsigned long |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 stack1_Serial_receiveData( unsigned char *dataPtr, |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 unsigned long dataLen ); |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 /*=========================================================================== |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 * Description: |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 * Copy the data to be transmitted into the Tx Buffer and enable the Uart Tx |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 * interrupt. If the Tx buffer is full, discard the data and return a buffer |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 * full indication. |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 */ |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 int |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 stack1_Serial_sendData( unsigned char *dataPtr, |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 unsigned long dataLen ); |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 |
5d1e22505446
GPF: tif library sources imported from Leonardo version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 #endif |