FreeCalypso > hg > freecalypso-sw
annotate gsm-fw/bsp/abb+spi/spi_api.h @ 587:cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sun, 17 Aug 2014 00:08:50 +0000 |
parents | 971e84124a6f |
children |
rev | line source |
---|---|
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 /****************************************************************************/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 /* File Name: spi_api.h */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 /* Purpose: This file contains data structures and functions prototypes */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 /* used to send events to the SPI SWE. */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 /* Version 0.1 */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 /* Date Modification */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 /* ------------------------------------ */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 /* 20/08/2000 Create */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 /* Author */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 /* */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 /* (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved*/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 /****************************************************************************/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 #ifndef __SPI_API_H_ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 #define __SPI_API_H_ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 |
149
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
21 #include "../../riviera/rv/rv_general.h" |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 |
149
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
23 #include "abb.h" |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 #ifdef __cplusplus |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 extern "C" |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 { |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 #endif |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 /* the message offset must differ for each SWE in order to have unique msg_id in the system */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 #define SPI_MESSAGES_OFFSET (0x34 << 10) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 /* define a first msg id */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 #define SPI_MESSAGE_1 (SPI_MESSAGES_OFFSET | 0x0001) |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 typedef void (*CALLBACK_FUNC_NO_PARAM)(void); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 typedef void (*CALLBACK_FUNC_U16)(UINT16 *); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 /*****************************************/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 /* structures of messages send to SPI */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 /*****************************************/ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 |
149
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
48 typedef struct { |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
49 T_RV_HDR os_hdr; |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
50 UINT16 page; |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
51 UINT16 address; |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
52 UINT16 data; |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 } T_SPI_WRITE; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 |
149
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
56 typedef struct { |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
57 T_RV_HDR os_hdr; |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
58 UINT16 page; |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
59 UINT16 address; |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 } T_SPI_READ; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 |
149
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
63 typedef struct { |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
64 T_RV_HDR os_hdr; |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
65 UINT16 channels; |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
66 UINT16 itval; |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 } T_SPI_ABB_CONF_ADC; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
68 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
69 |
149
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
70 typedef struct { |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
71 T_RV_HDR os_hdr; |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
72 UINT16 *Buff; |
971e84124a6f
gsm-fw/bsp/abb+spi: preening of header files, first pass
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
148
diff
changeset
|
73 CALLBACK_FUNC_NO_PARAM callback_func; |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
74 } T_SPI_ABB_READ_ADC; |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
75 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
76 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
77 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
78 #ifdef __cplusplus |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
79 } |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
80 #endif |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
81 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
82 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
83 /* Prototypes */ |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
84 |
587
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
85 /******************************************************************************/ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
86 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
87 /* Function Name: spi_abb_write */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
88 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
89 /* Purpose: This function is used to send to the SPI mailbox a */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
90 /* WRITE REGISTER rqst msg. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
91 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
92 /* Input Parameters: */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
93 /* - page : ABB Page where to read the register. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
94 /* - address : address of the ABB register to read. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
95 /* - data : data to write in the ABB register */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
96 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
97 /* Return : */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
98 /* - RVM_NOT_READY : the SPI task is not ready */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
99 /* - RV_MEMORY_ERR : the SPI task has not enough memory */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
100 /* - RV_OK : normal processing */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
101 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
102 /* Note: */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
103 /* None. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
104 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
105 /******************************************************************************/ |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
106 T_RV_RET spi_abb_write(UINT16 page, UINT16 address, UINT16 data); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
107 |
587
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
108 /******************************************************************************/ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
109 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
110 /* Function Name: spi_abb_read */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
111 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
112 /* Purpose: This function is used to send a READ REGISTER rqst msg */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
113 /* to the SPI mailbox. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
114 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
115 /* Input Parameters: */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
116 /* - page : ABB Page where to read the register. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
117 /* - address : address of the ABB register to read. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
118 /* - CallBack : callback function called by the spi task */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
119 /* at the end of the read process. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
120 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
121 /* Return : */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
122 /* - RVM_NOT_READY : the SPI task is not ready */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
123 /* - RV_MEMORY_ERR : the SPI task has not enough memory */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
124 /* - RV_OK : normal processing */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
125 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
126 /* Note: */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
127 /* None. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
128 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
129 /******************************************************************************/ |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
130 T_RV_RET spi_abb_read(UINT16 page, UINT16 address, CALLBACK_FUNC_U16 CallBack); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
131 |
587
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
132 /******************************************************************************/ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
133 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
134 /* Function Name: spi_abb_conf_ADC */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
135 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
136 /* Purpose: This function is used to send to the SPI mailbox a rqst msg*/ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
137 /* for configuring ABB MADC for conversions. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
138 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
139 /* Input Parameters: */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
140 /* - channels : ABB channels to be converted. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
141 /* - itval : configure the End Of Conversion IT. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
142 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
143 /* Return : */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
144 /* - RVM_NOT_READY : the SPI task is not ready */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
145 /* - RV_MEMORY_ERR : the SPI task has not enough memory */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
146 /* - RV_OK : normal processing */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
147 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
148 /* Note: */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
149 /* None. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
150 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
151 /******************************************************************************/ |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
152 T_RV_RET spi_abb_conf_ADC(UINT16 channels, UINT16 itval); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
153 |
587
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
154 /******************************************************************************/ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
155 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
156 /* Function Name: spi_abb_read_ADC */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
157 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
158 /* Purpose: This function is used to send to the SPI mailbox a rqst msg*/ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
159 /* for reading the ABB ADC results. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
160 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
161 /* Input Parameters: */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
162 /* - Buff : pointer to the buffer filled with ADC results.*/ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
163 /* - CallBack : callback function called by the spi task */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
164 /* at the end of the read process. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
165 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
166 /* Return : */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
167 /* - RVM_NOT_READY : the SPI task is not ready */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
168 /* - RV_MEMORY_ERR : the SPI task has not enough memory */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
169 /* - RV_OK : normal processing */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
170 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
171 /* Note: */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
172 /* None. */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
173 /* */ |
cc0944d35698
gsm-fw/bsp/abb+spi/*.h: formatting fixes (line length and tabs)
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
149
diff
changeset
|
174 /******************************************************************************/ |
148
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
175 T_RV_RET spi_abb_read_ADC(UINT16 *Buff, CALLBACK_FUNC_NO_PARAM CallBack); |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
176 |
63750f70796d
gsm-fw/bsp/abb+spi: initial import from the Leonardo TCS211 version
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
177 #endif /* __SPI_API_H_ */ |