Revision 21076167 source/alld_mpr121.c
source/alld_mpr121.c | ||
---|---|---|
65 | 65 |
* |
66 | 66 |
* @return The return status indicates whether the function call was succesfull or a timeout occurred. |
67 | 67 |
*/ |
68 |
inline apalExitStatus_t |
|
69 |
mpr121_lld_read_register(const MPR121Driver* const mprd, const mpr121_lld_register_t regaddr, const uint8_t offset, const uint8_t size, uint8_t* const data, const apalTime_t timeout) |
|
68 |
apalExitStatus_t mpr121_lld_read_register(const MPR121Driver* const mprd, const mpr121_lld_register_t regaddr, const uint8_t offset, const uint8_t size, uint8_t* const data, const apalTime_t timeout) |
|
70 | 69 |
{ |
71 | 70 |
apalDbgAssert(mprd != NULL && mprd->i2cd != NULL); |
72 | 71 |
apalDbgAssert(data != NULL); |
... | ... | |
86 | 85 |
* |
87 | 86 |
* @return The return status indicates whether the function call was succesfull or a timeout occurred. |
88 | 87 |
*/ |
89 |
inline apalExitStatus_t |
|
90 |
mpr121_lld_write_register(const MPR121Driver* const mprd, const mpr121_lld_register_t regaddr, const uint8_t offset, const uint8_t size, const uint8_t* const data, const apalTime_t timeout) |
|
88 |
apalExitStatus_t mpr121_lld_write_register(const MPR121Driver* const mprd, const mpr121_lld_register_t regaddr, const uint8_t offset, const uint8_t size, const uint8_t* const data, const apalTime_t timeout) |
|
91 | 89 |
{ |
92 | 90 |
apalDbgAssert(mprd != NULL && mprd->i2cd != NULL); |
93 | 91 |
apalDbgAssert(data != NULL); |
... | ... | |
105 | 103 |
* |
106 | 104 |
* @return The return status indicates whether the function call was succesfull or a timeout occurred. |
107 | 105 |
*/ |
108 |
inline apalExitStatus_t |
|
109 |
mpr121_lld_soft_reset(const MPR121Driver* const mprd, const apalTime_t timeout) |
|
106 |
apalExitStatus_t mpr121_lld_soft_reset(const MPR121Driver* const mprd, const apalTime_t timeout) |
|
110 | 107 |
{ |
111 | 108 |
apalDbgAssert(mprd != NULL && mprd->i2cd != NULL); |
112 | 109 |
|
... | ... | |
124 | 121 |
* |
125 | 122 |
* @return The return status indicates whether the function call was succesfull or a timeout occurred. |
126 | 123 |
*/ |
127 |
inline apalExitStatus_t |
|
128 |
mpr121_lld_read_filtered_data(const MPR121Driver* const mprd, const uint8_t index, const uint8_t num, uint16_t* const data, const apalTime_t timeout) |
|
124 |
apalExitStatus_t mpr121_lld_read_filtered_data(const MPR121Driver* const mprd, const uint8_t index, const uint8_t num, uint16_t* const data, const apalTime_t timeout) |
|
129 | 125 |
{ |
130 | 126 |
apalDbgAssert(data != NULL); |
131 | 127 |
|
... | ... | |
147 | 143 |
* |
148 | 144 |
* @return The return status indicates whether the function call was succesfull or a timeout occurred. |
149 | 145 |
*/ |
150 |
inline apalExitStatus_t |
|
151 |
mpr121_lld_read_baseline_data(const MPR121Driver* const mprd, const uint8_t index, const uint8_t num, uint8_t* const data, const apalTime_t timeout) |
|
146 |
apalExitStatus_t mpr121_lld_read_baseline_data(const MPR121Driver* const mprd, const uint8_t index, const uint8_t num, uint8_t* const data, const apalTime_t timeout) |
|
152 | 147 |
{ |
153 | 148 |
return mpr121_lld_read_register(mprd, MPR121_LLD_REGISTER_BASELINE, index, num, data, timeout); |
154 | 149 |
} |
... | ... | |
163 | 158 |
* |
164 | 159 |
* @return The return status indicates whether the function call was succesfull or a timeout occurred. |
165 | 160 |
*/ |
166 |
inline apalExitStatus_t |
|
167 |
mpr121_lld_read_electrode_data(const MPR121Driver* const mprd, const uint8_t index, const uint8_t num, uint8_t* const data, const apalTime_t timeout) |
|
161 |
apalExitStatus_t mpr121_lld_read_electrode_data(const MPR121Driver* const mprd, const uint8_t index, const uint8_t num, uint8_t* const data, const apalTime_t timeout) |
|
168 | 162 |
{ |
169 | 163 |
return mpr121_lld_read_register(mprd, MPR121_LLD_REGISTER_ELE_CURRENT, index, num, data, timeout); |
170 | 164 |
} |
... | ... | |
177 | 171 |
* |
178 | 172 |
* @return The return status indicates whether the function call was succesfull or a timeout occurred. |
179 | 173 |
*/ |
180 |
inline apalExitStatus_t |
|
181 |
mpr121_lld_write_config(const MPR121Driver* const mprd, const mpr121_lld_config_t cfg, const apalTime_t timeout) |
|
174 |
apalExitStatus_t mpr121_lld_write_config(const MPR121Driver* const mprd, const mpr121_lld_config_t cfg, const apalTime_t timeout) |
|
182 | 175 |
{ |
183 | 176 |
const apalExitStatus_t status = mpr121_lld_write_register(mprd, MPR121_LLD_REGISTER_AUTOCFG_CTRL_0, 0, 5, cfg.values, timeout); |
184 | 177 |
if (status != APAL_STATUS_OK) { |
... | ... | |
196 | 189 |
* |
197 | 190 |
* @return The return status indicates whether the function call was succesfull or a timeout occurred. |
198 | 191 |
*/ |
199 |
inline apalExitStatus_t |
|
200 |
mpr121_lld_read_config(const MPR121Driver* const mprd, mpr121_lld_config_t* const cfg, const apalTime_t timeout) |
|
192 |
apalExitStatus_t mpr121_lld_read_config(const MPR121Driver* const mprd, mpr121_lld_config_t* const cfg, const apalTime_t timeout) |
|
201 | 193 |
{ |
202 | 194 |
const apalExitStatus_t status = mpr121_lld_read_register(mprd, MPR121_LLD_REGISTER_AUTOCFG_CTRL_0, 0, 5, cfg->values, timeout); |
203 | 195 |
if (status != APAL_STATUS_OK) { |
Also available in: Unified diff