annotate src/cs/drivers/drv_app/spi/spi_api.h @ 303:f76436d19a7a default tip

!GPRS config: fix long-standing AT+COPS chance hanging bug There has been a long-standing bug in FreeCalypso going back years: sometimes in the AT command bring-up sequence of an ACI-only MS, the AT+COPS command would produce only a power scan followed by cessation of protocol stack activity (only L1 ADC traces), instead of the expected network search sequence. This behaviour was seen in different FC firmware versions going back to Citrine, and seemed to follow some law of chance, not reliably repeatable. This bug has been tracked down and found to be specific to !GPRS configuration, stemming from our TCS2/TCS3 hybrid and reconstruction of !GPRS support that was bitrotten in TCS3.2/LoCosto version. ACI module psa_mms.c, needed only for !GPRS, was missing in the TCS3 version and had to be pulled from TCS2 - but as it turns out, there is a new field in the MMR_REG_REQ primitive that needs to be set correctly, and that psa_mms.c module is the place where this initialization needed to be added.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 08 Jun 2023 08:23:37 +0000
parents 34b7059b9337
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /****************************************************************************/
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 /* */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 /* File Name: spi_api.h */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 /* */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 /* Purpose: This file contains data structures and functions prototypes */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 /* used to send events to the SPI SWE. */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 /* */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 /* Version 0.1 */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 /* */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 /* Date Modification */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 /* ------------------------------------ */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 /* 20/08/2000 Create */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 /* */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 /* Author */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 /* */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 /* (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved*/
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 /****************************************************************************/
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 #ifndef __SPI_API_H_
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 #define __SPI_API_H_
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 #include "rv/rv_general.h"
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 #include "abb/abb.h"
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 #ifdef __cplusplus
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 extern "C"
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 {
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #endif
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 /* the message offset must differ for each SWE in order to have unique msg_id in the system */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 #define SPI_MESSAGES_OFFSET (0x34 << 10)
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 /* define a first msg id */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 #define SPI_MESSAGE_1 (SPI_MESSAGES_OFFSET | 0x0001)
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 typedef void (*CALLBACK_FUNC_NO_PARAM)(void);
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 typedef void (*CALLBACK_FUNC_U16)(UINT16 *);
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 /*****************************************/
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 /* structures of messages send to SPI */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 /*****************************************/
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 typedef struct
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 { T_RV_HDR os_hdr;
260
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
49 UINT16 page;
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
50 UINT16 address;
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 UINT16 data;
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 } T_SPI_WRITE;
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 typedef struct
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 { T_RV_HDR os_hdr;
260
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
57 UINT16 page;
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
58 UINT16 address;
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 } T_SPI_READ;
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 typedef struct
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 { T_RV_HDR os_hdr;
260
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
64 UINT16 channels;
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
65 UINT16 itval;
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 } T_SPI_ABB_CONF_ADC;
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69 typedef struct
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 { T_RV_HDR os_hdr;
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 UINT16 *Buff;
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 CALLBACK_FUNC_NO_PARAM callback_func;
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 } T_SPI_ABB_READ_ADC;
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 #ifdef __cplusplus
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 }
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 #endif
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 /* Prototypes */
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82
260
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
83 /******************************************************************************/
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
84 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
85 /* Function Name: spi_abb_write */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
86 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
87 /* Purpose: This function is used to send to the SPI mailbox a */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
88 /* WRITE REGISTER rqst msg. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
89 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
90 /* Input Parameters: */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
91 /* - page : ABB Page where to read the register. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
92 /* - address : address of the ABB register to read. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
93 /* - data : data to write in the ABB register */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
94 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
95 /* Return : */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
96 /* - RVM_NOT_READY : the SPI task is not ready */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
97 /* - RV_MEMORY_ERR : the SPI task has not enough memory */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
98 /* - RV_OK : normal processing */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
99 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
100 /* Note: */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
101 /* None. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
102 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
103 /******************************************************************************/
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 T_RV_RET spi_abb_write(UINT16 page, UINT16 address, UINT16 data);
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105
260
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
106 /******************************************************************************/
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
107 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
108 /* Function Name: spi_abb_read */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
109 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
110 /* Purpose: This function is used to send a READ REGISTER rqst msg */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
111 /* to the SPI mailbox. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
112 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
113 /* Input Parameters: */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
114 /* - page : ABB Page where to read the register. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
115 /* - address : address of the ABB register to read. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
116 /* - CallBack : callback function called by the spi task */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
117 /* at the end of the read process. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
118 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
119 /* Return : */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
120 /* - RVM_NOT_READY : the SPI task is not ready */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
121 /* - RV_MEMORY_ERR : the SPI task has not enough memory */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
122 /* - RV_OK : normal processing */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
123 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
124 /* Note: */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
125 /* None. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
126 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
127 /******************************************************************************/
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 T_RV_RET spi_abb_read(UINT16 page, UINT16 address, CALLBACK_FUNC_U16 CallBack);
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129
260
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
130 /******************************************************************************/
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
131 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
132 /* Function Name: spi_abb_conf_ADC */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
133 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
134 /* Purpose: This function is used to send to the SPI mailbox a rqst msg*/
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
135 /* for configuring ABB MADC for conversions. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
136 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
137 /* Input Parameters: */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
138 /* - channels : ABB channels to be converted. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
139 /* - itval : configure the End Of Conversion IT. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
140 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
141 /* Return : */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
142 /* - RVM_NOT_READY : the SPI task is not ready */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
143 /* - RV_MEMORY_ERR : the SPI task has not enough memory */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
144 /* - RV_OK : normal processing */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
145 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
146 /* Note: */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
147 /* None. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
148 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
149 /******************************************************************************/
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 T_RV_RET spi_abb_conf_ADC(UINT16 channels, UINT16 itval);
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151
260
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
152 /******************************************************************************/
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
153 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
154 /* Function Name: spi_abb_read_ADC */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
155 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
156 /* Purpose: This function is used to send to the SPI mailbox a rqst msg*/
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
157 /* for reading the ABB ADC results. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
158 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
159 /* Input Parameters: */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
160 /* - Buff : pointer to the buffer filled with ADC results.*/
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
161 /* - CallBack : callback function called by the spi task */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
162 /* at the end of the read process. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
163 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
164 /* Return : */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
165 /* - RVM_NOT_READY : the SPI task is not ready */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
166 /* - RV_MEMORY_ERR : the SPI task has not enough memory */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
167 /* - RV_OK : normal processing */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
168 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
169 /* Note: */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
170 /* None. */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
171 /* */
34b7059b9337 drv_app/spi/*: code readability fixes
Mychaela Falconia <falcon@freecalypso.org>
parents: 259
diff changeset
172 /******************************************************************************/
0
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 T_RV_RET spi_abb_read_ADC(UINT16 *Buff, CALLBACK_FUNC_NO_PARAM CallBack);
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174
4e78acac3d88 src/{condat,cs,gpf,nucleus}: import from Selenite
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 #endif /* __SPI_API_H_ */