proximity5  2.0.0.0
proximity5.h
Go to the documentation of this file.
1 /*
2  * MikroSDK - MikroE Software Development Kit
3  * Copyright© 2020 MikroElektronika d.o.o.
4  *
5  * Permission is hereby granted, free of charge, to any person
6  * obtaining a copy of this software and associated documentation
7  * files (the "Software"), to deal in the Software without restriction,
8  * including without limitation the rights to use, copy, modify, merge,
9  * publish, distribute, sublicense, and/or sell copies of the Software,
10  * and to permit persons to whom the Software is furnished to do so,
11  * subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be
14  * included in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
20  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
22  * OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 
33 // ----------------------------------------------------------------------------
34 
35 #ifndef PROXIMITY5_H
36 #define PROXIMITY5_H
37 
38 #include "mikrosdk_version.h"
39 
40 #ifdef __GNUC__
41 #if mikroSDK_GET_VERSION < 20800ul
42 #include "rcu_delays.h"
43 #else
44 #include "delays.h"
45 #endif
46 #endif
47 
48 #include "drv_digital_out.h"
49 #include "drv_digital_in.h"
50 #include "drv_i2c_master.h"
51 
52 // -------------------------------------------------------------- PUBLIC MACROS
62 #define PROXIMITY5_MAP_MIKROBUS( cfg, mikrobus ) \
63  cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
64  cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
65  cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
66 
72 #define PROXIMITY5_RETVAL uint8_t
73 
74 #define PROXIMITY5_OK 0x00
75 #define PROXIMITY5_INIT_ERROR 0xFF
76 
82 #define ALS_SD_ON 0
83 #define ALS_SD_OFF 1
84 #define ALS_INTEN 1
85 #define ALS_INT_DIS 0
86 #define ALS_PERS_1 1
87 #define ALS_PERS_2 2
88 #define ALS_PERS_4 4
89 #define ALS_PERS_8 8
90 #define ALS_IT_50_ms 0
91 #define ALS_IT_100_ms 1
92 #define ALS_IT_200_ms 2
93 #define ALS_IT_400_ms 3
94 #define ALS_IT_800_ms 7
95 
101 #define ALS_WHITE_SD_ON 0
102 #define ALS_WHITE_SD_OFF 1
103 
109 #define PS_DUTY_1_40 0
110 #define PS_DUTY_1_80 1
111 #define PS_DUTY_1_160 2
112 #define PS_DUTY_1_320 3
113 #define PS_PERS_1 0
114 #define PS_PERS_2 1
115 #define PS_PERS_3 2
116 #define PS_PERS_4 3
117 #define PS_IT_1T 0
118 #define PS_IT_1T5 1
119 #define PS_IT_2T 2
120 #define PS_IT_2T5 3
121 #define PS_IT_3T 4
122 #define PS_IT_3T5 5
123 #define PS_IT_4T 6
124 #define PS_IT_8T 7
125 #define PS_SD_ON 0
126 #define PS_SD_OFF 1
127 
133 #define GEST_INT_EN 1
134 #define GEST_INT_DIS 0
135 #define GEST_MODE_EN 1
136 #define GEST_MODE_DIS 0
137 #define PS_GAIN_TWO_STEP 1
138 #define PS_GAIN_SINGLX8 2
139 #define PS_GAIN_SINGLX1 3
140 #define PS_HD_12BIT 0
141 #define PS_HD_16BIT 1
142 #define PS_NS_TWO_STEPX4 0
143 #define PS_NS_TWO_STEP 1
144 #define PS_INT_DIS 0
145 #define PS_INT_CLOS 1
146 #define PS_INT_AWAY 2
147 #define PS_INT_CLOS_AWAY 3
148 
154 #define LED_I_LOW_DIS 0
155 #define LED_I_LOW_EN 1
156 #define IRED_SEL_IRED1 0
157 #define IRED_SEL_IRED2 1
158 #define IRED_SEL_IRED3 2
159 #define PS_SMART_PERS_DIS 0
160 #define PS_SMART_PERS_EN 1
161 #define PS_AF_DIS 0
162 #define PS_AF_EN 1
163 #define PS_TRIG_DIS 0
164 #define PS_TRIG_EN 1
165 #define PS_MS_INT 0
166 #define PS_MS_LOG_OUT 1
167 #define PS_SC_EN_ON 1
168 #define PS_SC_EN_OFF 0
169 
175 #define PS_SC_CUR_1X 0
176 #define PS_SC_CUR_2X 1
177 #define PS_SC_CUR_4X 2
178 #define PS_SC_CUR_8X 3
179 #define PS_SP_TYP 0
180 #define PS_SP_TYPX1_5 1
181 #define PS_SPO_00h 0
182 #define PS_SPO_FFh 1
183 #define LED_I_50MA 0
184 #define LED_I_75MA 1
185 #define LED_I_100MA 2
186 #define LED_I_120MA 3
187 #define LED_I_140MA 4
188 #define LED_I_160MA 5
189 #define LED_I_180MA 6
190 #define LED_I_200MA 7
191 
197 #define CMD_ALS_CONF1 0x00
198 #define CMD_ALS_CONF2 0x00
199 #define CMD_ALS_CONF1_2 0x00
200 #define CMD_ALS_THDH_L 0x01
201 #define CMD_ALS_THDH_H 0x01
202 #define CMD_ALS_THDH_L_M 0x01
203 #define CMD_ALS_THDL_L 0x02
204 #define CMD_ALS_THDL_H 0x02
205 #define CMD_ALS_THDL_L_M 0x02
206 #define CMD_PS_CONF1 0x03
207 #define CMD_PS_CONF2 0x03
208 #define CMD_PS_CONF1_2 0x03
209 #define CMD_PS_CONF3 0x04
210 #define CMD_PS_MS 0x04
211 #define CMD_PS_CONF3_MS 0x04
212 #define CMD_PS_CANC_L 0x05
213 #define CMD_PS_CANC_M 0x05
214 #define CMD_PS_CANC_L_M 0x05
215 #define CMD_PS_THDH_L 0x06
216 #define CMD_PS_THDH_M 0x06
217 #define CMD_PS_THDH_L_M 0x06
218 #define CMD_PS_THDL_L 0x07
219 #define CMD_PS_THDL_M 0x07
220 #define CMD_PS_THDL_L_M 0x07
221 #define CMD_PS1_DATA_L 0x08
222 #define CMD_PS1_DATA_M 0x08
223 #define CMD_PS1_DATA_L_M 0x08
224 #define CMD_PS2_DATA_L 0x09
225 #define CMD_PS2_DATA_M 0x09
226 #define CMD_PS2_DATA_L_M 0x09
227 #define CMD_PS3_DATA_L 0x0A
228 #define CMD_PS3_DATA_M 0x0A
229 #define CMD_PS3_DATA_L_M 0x0A
230 #define CMD_ALS_DATA_L 0x0B
231 #define CMD_ALS_DATA_M 0x0B
232 #define CMD_ALS_DATA_L_M 0x0B
233 #define CMD_WHITE_DATA_L 0x0C
234 #define CMD_WHITE_DATA_M 0x0C
235 #define CMD_WHITE_DATA_L_M 0x0C
236 #define RESERVED 0x0D
237 #define CMD_INT_FLAG 0x0D
238 #define CMD_ID_L 0x0E
239 #define CMD_ID_M 0x0E
240 #define CMD_ID_L_M 0x0E
241 
247 #define PROXIMITY5_ADDR 0x60
248  // End group macro
252 // --------------------------------------------------------------- PUBLIC TYPES
261 typedef struct
262 {
263  // Input pins
264 
265  digital_in_t int_pin;
266 
267  // Modules
268 
269  i2c_master_t i2c;
270 
271  // ctx variable
272 
273  uint8_t slave_address;
274 
275 } proximity5_t;
276 
280 typedef struct
281 {
282  // Communication gpio pins
283 
284  pin_name_t scl;
285  pin_name_t sda;
286 
287  // Additional gpio pins
288 
289  pin_name_t int_pin;
290 
291  // static variable
292 
293  uint32_t i2c_speed;
294  uint8_t i2c_address;
295 
297 
301 typedef union
302 {
303  unsigned char ALL;
304  struct
305  {
306 
307  unsigned char ALS_SD : 1;
308  unsigned char ALS_INT_EN : 1;
309  unsigned char ALS_PERS : 2;
310  unsigned char RES : 1;
311  unsigned char ALS_IT : 3;
312  };
313 
314 } als_conf1_t;
315 
316 typedef union
317 {
318  unsigned char ALL;
319  struct
320  {
321 
322  unsigned char WHITE_SD : 1;
323  unsigned char RES : 7;
324  };
325 
326 } als_conf2_t;
327 
328 typedef union
329 {
330  uint16_t ALL;
331  struct
332  {
333 
334  uint16_t ALS_THDH_L : 8;
335  uint16_t ALS_THDH_M : 8;
336  };
337 
339 
340 typedef union
341 {
342  uint16_t ALL;
343  struct
344  {
345 
346  uint16_t LS_THDL_L : 8;
347  uint16_t LS_THDL_M : 8;
348  };
349 
351 
352 typedef union
353 {
354  uint16_t ALL;
355  struct
356  {
357 
358  uint16_t ALS_DATA_L : 8;
359  uint16_t ALS_DATA_M : 8;
360  };
361 
363 
364 typedef union
365 {
366  uint8_t ALL;
367  struct
368  {
369  uint8_t PS_SD : 1;
370  uint8_t PS_IT : 3;
371  uint8_t PS_PERS : 2;
372  uint8_t PS_DUTY : 2;
373  };
374 
375 } ps_conf1_t;
376 
377 typedef union
378 {
379  uint8_t ALL;
380  struct {
381 
382  uint8_t PS_INT_EN : 2;
383  uint8_t PS_NS : 1;
384  uint8_t PS_HD : 1;
385  uint8_t PS_GAIN : 2;
386  uint8_t GEST_MODE : 1;
387  uint8_t GEST_INTEN : 1;
388  };
389 
390 } ps_conf2_t;
391 
392 typedef union
393 {
394  uint8_t ALL;
395  struct
396  {
397 
398  uint8_t PS_SC_EN : 1;
399  uint8_t PS_MS : 1;
400  uint8_t PS_TRIG : 1;
401  uint8_t PS_AF : 1;
402  uint8_t PS_SMART_PERS : 1;
403  uint8_t IRED_SEL : 2;
404  uint8_t LED_I_LOW : 1;
405  };
406 
407 } ps_conf3_t;
408 
409 typedef union
410 {
411  uint8_t ALL;
412  struct
413  {
414 
415  uint8_t LED_I : 3;
416  uint8_t PS_SPO : 1;
417  uint8_t PS_SP : 1;
418  uint8_t PS_SC_CUR : 2;
419  uint8_t RES : 1;
420 
421  };
422 
423 } ps_ms_t;
424 
425 typedef union
426 {
427  uint16_t ALL;
428  struct
429  {
430 
431  uint16_t PS_CANC_L : 8;
432  uint16_t PS_CANC_M : 8;
433  };
434 
435 } ps_canc_l_m_t;
436 
437 typedef union
438 {
439  uint16_t ALL;
440  struct
441  {
442 
443  uint16_t PS_THDL_L : 8;
444  uint16_t PS_THDL_M : 8;
445  };
446 
447 } ps_thdl_l_m_t;
448 
449 typedef union
450 {
451  uint16_t ALL;
452  struct
453  {
454 
455  uint16_t PS_THDH_L : 8;
456  uint16_t PS_THDH_M : 8;
457  };
458 
459 } ps_thdh_l_m_t;
460 
461 typedef union
462 {
463  uint16_t ALL;
464  struct
465  {
466 
467  uint16_t PS1_DATA_L : 8;
468  uint16_t PS1_DATA_M : 8;
469  };
470 
472 
473 typedef union
474 {
475  uint16_t ALL;
476  struct {
477 
478  uint16_t PS2_DATA_L : 8;
479  uint16_t PS2_DATA_M : 8;
480  };
481 
483 
484 typedef union
485 {
486  uint16_t ALL;
487  struct
488  {
489 
490  uint16_t PS3_DATA_L : 8;
491  uint16_t PS3_DATA_M : 8;
492  };
493 
495 
496 typedef union
497 {
498  uint16_t ALL;
499  struct
500  {
501 
502  uint16_t WHITE_DATA_L : 8;
503  uint16_t WHITE_DATA_M : 8;
504  };
505 
507 
508 
509 typedef union
510 {
511  uint8_t ALL;
512  struct
513  {
514 
515  uint8_t PS_IF_AWAY : 1;
516  uint8_t PS_IF_CLOSE : 1;
517  uint8_t RES1 : 1;
518  uint8_t RES0 : 1;
519  uint8_t ALS_IF_H : 1;
520  uint8_t ALS_IF_L : 1;
521  uint8_t PS_SPFLAG : 1;
522  uint8_t GEST_DATA_RDY_FLG : 1;
523  };
524 
525 } int_flag_t;
526 
527 
528 typedef union
529 {
530  uint16_t ALL;
531  struct
532  {
533 
534  uint16_t ID_L : 8;
535  uint16_t ID_M : 8;
536 
537  };
538 
539 } id_l_m_t;
540  // End types group
542 // ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
543 
549 #ifdef __cplusplus
550 extern "C"{
551 #endif
552 
562 
572 
581 
592 void proximity5_generic_write ( proximity5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
593 
604 void proximity5_generic_read ( proximity5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
605 
617 uint16_t proximity5_read_reg ( proximity5_t *ctx, uint8_t addr );
618 
629 uint16_t proximity5_get_id ( proximity5_t *ctx );
630 
641 void proximity5_get_values ( proximity5_t *ctx, uint16_t *prox_val );
642 
643 
644 #ifdef __cplusplus
645 }
646 #endif
647 #endif // _PROXIMITY5_H_
648  // End public_function group
651 
652 // ------------------------------------------------------------------------- END
ps_conf3_t
Definition: proximity5.h:393
ps_thdh_l_m_t::PS_THDH_M
uint16_t PS_THDH_M
Definition: proximity5.h:456
int_flag_t::RES1
uint8_t RES1
Definition: proximity5.h:517
proximity5_t::int_pin
digital_in_t int_pin
Definition: proximity5.h:265
ps_canc_l_m_t::PS_CANC_L
uint16_t PS_CANC_L
Definition: proximity5.h:431
int_flag_t::ALS_IF_L
uint8_t ALS_IF_L
Definition: proximity5.h:520
als_conf1_t
Click calibration unions.
Definition: proximity5.h:302
proximity5_t
Click ctx object definition.
Definition: proximity5.h:262
als_thdl_l_m_t::LS_THDL_L
uint16_t LS_THDL_L
Definition: proximity5.h:346
als_thdl_l_m_t::LS_THDL_M
uint16_t LS_THDL_M
Definition: proximity5.h:347
id_l_m_t::ID_L
uint16_t ID_L
Definition: proximity5.h:534
ps3_data_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:486
ps_conf3_t::LED_I_LOW
uint8_t LED_I_LOW
Definition: proximity5.h:404
int_flag_t
Definition: proximity5.h:510
als_conf1_t::ALS_SD
unsigned char ALS_SD
Definition: proximity5.h:307
ps_conf3_t::PS_SMART_PERS
uint8_t PS_SMART_PERS
Definition: proximity5.h:402
ps1_data_l_m_t::PS1_DATA_M
uint16_t PS1_DATA_M
Definition: proximity5.h:468
ps3_data_l_m_t::PS3_DATA_M
uint16_t PS3_DATA_M
Definition: proximity5.h:491
proximity5_cfg_t::i2c_speed
uint32_t i2c_speed
Definition: proximity5.h:293
white_data_l_m_t::WHITE_DATA_M
uint16_t WHITE_DATA_M
Definition: proximity5.h:503
als_conf2_t::ALL
unsigned char ALL
Definition: proximity5.h:318
id_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:530
ps_thdl_l_m_t
Definition: proximity5.h:438
ps_conf2_t::GEST_INTEN
uint8_t GEST_INTEN
Definition: proximity5.h:387
ps_conf1_t::PS_DUTY
uint8_t PS_DUTY
Definition: proximity5.h:372
ps_thdl_l_m_t::PS_THDL_L
uint16_t PS_THDL_L
Definition: proximity5.h:443
als_data_l_m_t::ALS_DATA_L
uint16_t ALS_DATA_L
Definition: proximity5.h:358
ps_ms_t
Definition: proximity5.h:410
ps_conf1_t::ALL
uint8_t ALL
Definition: proximity5.h:366
proximity5_get_id
uint16_t proximity5_get_id(proximity5_t *ctx)
16bit read function.
proximity5_generic_write
void proximity5_generic_write(proximity5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic write function.
ps2_data_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:475
ps_ms_t::PS_SP
uint8_t PS_SP
Definition: proximity5.h:417
proximity5_init
PROXIMITY5_RETVAL proximity5_init(proximity5_t *ctx, proximity5_cfg_t *cfg)
Initialization function.
ps_conf2_t::PS_GAIN
uint8_t PS_GAIN
Definition: proximity5.h:385
proximity5_cfg_t::i2c_address
uint8_t i2c_address
Definition: proximity5.h:294
ps_conf2_t
Definition: proximity5.h:378
als_thdh_l_m_t::ALS_THDH_L
uint16_t ALS_THDH_L
Definition: proximity5.h:334
id_l_m_t::ID_M
uint16_t ID_M
Definition: proximity5.h:535
als_data_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:354
proximity5_t::slave_address
uint8_t slave_address
Definition: proximity5.h:273
proximity5_t::i2c
i2c_master_t i2c
Definition: proximity5.h:269
proximity5_default_cfg
void proximity5_default_cfg(proximity5_t *ctx)
Click Default Configuration function.
ps_conf3_t::ALL
uint8_t ALL
Definition: proximity5.h:394
ps_conf2_t::PS_INT_EN
uint8_t PS_INT_EN
Definition: proximity5.h:382
ps_ms_t::RES
uint8_t RES
Definition: proximity5.h:419
white_data_l_m_t::WHITE_DATA_L
uint16_t WHITE_DATA_L
Definition: proximity5.h:502
ps_conf3_t::PS_MS
uint8_t PS_MS
Definition: proximity5.h:399
als_data_l_m_t::ALS_DATA_M
uint16_t ALS_DATA_M
Definition: proximity5.h:359
ps_conf1_t
Definition: proximity5.h:365
int_flag_t::PS_IF_AWAY
uint8_t PS_IF_AWAY
Definition: proximity5.h:515
int_flag_t::PS_SPFLAG
uint8_t PS_SPFLAG
Definition: proximity5.h:521
ps_canc_l_m_t
Definition: proximity5.h:426
proximity5_cfg_t
Click configuration structure definition.
Definition: proximity5.h:281
ps2_data_l_m_t::PS2_DATA_M
uint16_t PS2_DATA_M
Definition: proximity5.h:479
ps_conf3_t::PS_AF
uint8_t PS_AF
Definition: proximity5.h:401
ps1_data_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:463
ps2_data_l_m_t::PS2_DATA_L
uint16_t PS2_DATA_L
Definition: proximity5.h:478
proximity5_cfg_t::int_pin
pin_name_t int_pin
Definition: proximity5.h:289
ps_ms_t::ALL
uint8_t ALL
Definition: proximity5.h:411
als_conf1_t::ALS_INT_EN
unsigned char ALS_INT_EN
Definition: proximity5.h:308
als_thdh_l_m_t::ALS_THDH_M
uint16_t ALS_THDH_M
Definition: proximity5.h:335
ps_conf1_t::PS_SD
uint8_t PS_SD
Definition: proximity5.h:369
proximity5_cfg_setup
void proximity5_cfg_setup(proximity5_cfg_t *cfg)
Config Object Initialization function.
proximity5_cfg_t::scl
pin_name_t scl
Definition: proximity5.h:284
als_conf1_t::ALS_IT
unsigned char ALS_IT
Definition: proximity5.h:311
als_conf2_t::RES
unsigned char RES
Definition: proximity5.h:323
int_flag_t::GEST_DATA_RDY_FLG
uint8_t GEST_DATA_RDY_FLG
Definition: proximity5.h:522
ps_thdh_l_m_t
Definition: proximity5.h:450
ps_thdl_l_m_t::PS_THDL_M
uint16_t PS_THDL_M
Definition: proximity5.h:444
ps_conf3_t::PS_SC_EN
uint8_t PS_SC_EN
Definition: proximity5.h:398
ps_conf1_t::PS_IT
uint8_t PS_IT
Definition: proximity5.h:370
int_flag_t::ALL
uint8_t ALL
Definition: proximity5.h:511
als_thdh_l_m_t
Definition: proximity5.h:329
ps_conf1_t::PS_PERS
uint8_t PS_PERS
Definition: proximity5.h:371
ps_thdl_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:439
ps_conf2_t::ALL
uint8_t ALL
Definition: proximity5.h:379
als_thdl_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:342
ps_conf2_t::GEST_MODE
uint8_t GEST_MODE
Definition: proximity5.h:386
ps_ms_t::LED_I
uint8_t LED_I
Definition: proximity5.h:415
als_data_l_m_t
Definition: proximity5.h:353
white_data_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:498
als_thdl_l_m_t
Definition: proximity5.h:341
proximity5_cfg_t::sda
pin_name_t sda
Definition: proximity5.h:285
als_conf2_t::WHITE_SD
unsigned char WHITE_SD
Definition: proximity5.h:322
ps1_data_l_m_t::PS1_DATA_L
uint16_t PS1_DATA_L
Definition: proximity5.h:467
ps_conf3_t::IRED_SEL
uint8_t IRED_SEL
Definition: proximity5.h:403
ps3_data_l_m_t
Definition: proximity5.h:485
ps_conf2_t::PS_HD
uint8_t PS_HD
Definition: proximity5.h:384
int_flag_t::PS_IF_CLOSE
uint8_t PS_IF_CLOSE
Definition: proximity5.h:516
ps_thdh_l_m_t::PS_THDH_L
uint16_t PS_THDH_L
Definition: proximity5.h:455
als_thdh_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:330
ps_canc_l_m_t::PS_CANC_M
uint16_t PS_CANC_M
Definition: proximity5.h:432
ps_thdh_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:451
ps1_data_l_m_t
Definition: proximity5.h:462
ps_conf3_t::PS_TRIG
uint8_t PS_TRIG
Definition: proximity5.h:400
als_conf1_t::ALL
unsigned char ALL
Definition: proximity5.h:303
proximity5_read_reg
uint16_t proximity5_read_reg(proximity5_t *ctx, uint8_t addr)
16bit read function.
proximity5_get_values
void proximity5_get_values(proximity5_t *ctx, uint16_t *prox_val)
Proximity value get function.
int_flag_t::RES0
uint8_t RES0
Definition: proximity5.h:518
proximity5_generic_read
void proximity5_generic_read(proximity5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
ps3_data_l_m_t::PS3_DATA_L
uint16_t PS3_DATA_L
Definition: proximity5.h:490
ps_ms_t::PS_SPO
uint8_t PS_SPO
Definition: proximity5.h:416
ps_canc_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:427
ps_conf2_t::PS_NS
uint8_t PS_NS
Definition: proximity5.h:383
als_conf1_t::RES
unsigned char RES
Definition: proximity5.h:310
white_data_l_m_t
Definition: proximity5.h:497
ps_ms_t::PS_SC_CUR
uint8_t PS_SC_CUR
Definition: proximity5.h:418
als_conf2_t
Definition: proximity5.h:317
int_flag_t::ALS_IF_H
uint8_t ALS_IF_H
Definition: proximity5.h:519
als_conf1_t::ALS_PERS
unsigned char ALS_PERS
Definition: proximity5.h:309
PROXIMITY5_RETVAL
#define PROXIMITY5_RETVAL
Definition: proximity5.h:72
ps2_data_l_m_t
Definition: proximity5.h:474
id_l_m_t
Definition: proximity5.h:529