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 
42 #ifdef PREINIT_SUPPORTED
43 #include "preinit.h"
44 #endif
45 
46 #ifdef MikroCCoreVersion
47  #if MikroCCoreVersion >= 1
48  #include "delays.h"
49  #endif
50 #endif
51 
52 #include "drv_digital_out.h"
53 #include "drv_digital_in.h"
54 #include "drv_i2c_master.h"
55 
56 // -------------------------------------------------------------- PUBLIC MACROS
66 #define PROXIMITY5_MAP_MIKROBUS( cfg, mikrobus ) \
67  cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
68  cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
69  cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
70 
76 #define PROXIMITY5_RETVAL uint8_t
77 
78 #define PROXIMITY5_OK 0x00
79 #define PROXIMITY5_INIT_ERROR 0xFF
80 
86 #define ALS_SD_ON 0
87 #define ALS_SD_OFF 1
88 #define ALS_INTEN 1
89 #define ALS_INT_DIS 0
90 #define ALS_PERS_1 1
91 #define ALS_PERS_2 2
92 #define ALS_PERS_4 4
93 #define ALS_PERS_8 8
94 #define ALS_IT_50_ms 0
95 #define ALS_IT_100_ms 1
96 #define ALS_IT_200_ms 2
97 #define ALS_IT_400_ms 3
98 #define ALS_IT_800_ms 7
99 
105 #define ALS_WHITE_SD_ON 0
106 #define ALS_WHITE_SD_OFF 1
107 
113 #define PS_DUTY_1_40 0
114 #define PS_DUTY_1_80 1
115 #define PS_DUTY_1_160 2
116 #define PS_DUTY_1_320 3
117 #define PS_PERS_1 0
118 #define PS_PERS_2 1
119 #define PS_PERS_3 2
120 #define PS_PERS_4 3
121 #define PS_IT_1T 0
122 #define PS_IT_1T5 1
123 #define PS_IT_2T 2
124 #define PS_IT_2T5 3
125 #define PS_IT_3T 4
126 #define PS_IT_3T5 5
127 #define PS_IT_4T 6
128 #define PS_IT_8T 7
129 #define PS_SD_ON 0
130 #define PS_SD_OFF 1
131 
137 #define GEST_INT_EN 1
138 #define GEST_INT_DIS 0
139 #define GEST_MODE_EN 1
140 #define GEST_MODE_DIS 0
141 #define PS_GAIN_TWO_STEP 1
142 #define PS_GAIN_SINGLX8 2
143 #define PS_GAIN_SINGLX1 3
144 #define PS_HD_12BIT 0
145 #define PS_HD_16BIT 1
146 #define PS_NS_TWO_STEPX4 0
147 #define PS_NS_TWO_STEP 1
148 #define PS_INT_DIS 0
149 #define PS_INT_CLOS 1
150 #define PS_INT_AWAY 2
151 #define PS_INT_CLOS_AWAY 3
152 
158 #define LED_I_LOW_DIS 0
159 #define LED_I_LOW_EN 1
160 #define IRED_SEL_IRED1 0
161 #define IRED_SEL_IRED2 1
162 #define IRED_SEL_IRED3 2
163 #define PS_SMART_PERS_DIS 0
164 #define PS_SMART_PERS_EN 1
165 #define PS_AF_DIS 0
166 #define PS_AF_EN 1
167 #define PS_TRIG_DIS 0
168 #define PS_TRIG_EN 1
169 #define PS_MS_INT 0
170 #define PS_MS_LOG_OUT 1
171 #define PS_SC_EN_ON 1
172 #define PS_SC_EN_OFF 0
173 
179 #define PS_SC_CUR_1X 0
180 #define PS_SC_CUR_2X 1
181 #define PS_SC_CUR_4X 2
182 #define PS_SC_CUR_8X 3
183 #define PS_SP_TYP 0
184 #define PS_SP_TYPX1_5 1
185 #define PS_SPO_00h 0
186 #define PS_SPO_FFh 1
187 #define LED_I_50MA 0
188 #define LED_I_75MA 1
189 #define LED_I_100MA 2
190 #define LED_I_120MA 3
191 #define LED_I_140MA 4
192 #define LED_I_160MA 5
193 #define LED_I_180MA 6
194 #define LED_I_200MA 7
195 
201 #define CMD_ALS_CONF1 0x00
202 #define CMD_ALS_CONF2 0x00
203 #define CMD_ALS_CONF1_2 0x00
204 #define CMD_ALS_THDH_L 0x01
205 #define CMD_ALS_THDH_H 0x01
206 #define CMD_ALS_THDH_L_M 0x01
207 #define CMD_ALS_THDL_L 0x02
208 #define CMD_ALS_THDL_H 0x02
209 #define CMD_ALS_THDL_L_M 0x02
210 #define CMD_PS_CONF1 0x03
211 #define CMD_PS_CONF2 0x03
212 #define CMD_PS_CONF1_2 0x03
213 #define CMD_PS_CONF3 0x04
214 #define CMD_PS_MS 0x04
215 #define CMD_PS_CONF3_MS 0x04
216 #define CMD_PS_CANC_L 0x05
217 #define CMD_PS_CANC_M 0x05
218 #define CMD_PS_CANC_L_M 0x05
219 #define CMD_PS_THDH_L 0x06
220 #define CMD_PS_THDH_M 0x06
221 #define CMD_PS_THDH_L_M 0x06
222 #define CMD_PS_THDL_L 0x07
223 #define CMD_PS_THDL_M 0x07
224 #define CMD_PS_THDL_L_M 0x07
225 #define CMD_PS1_DATA_L 0x08
226 #define CMD_PS1_DATA_M 0x08
227 #define CMD_PS1_DATA_L_M 0x08
228 #define CMD_PS2_DATA_L 0x09
229 #define CMD_PS2_DATA_M 0x09
230 #define CMD_PS2_DATA_L_M 0x09
231 #define CMD_PS3_DATA_L 0x0A
232 #define CMD_PS3_DATA_M 0x0A
233 #define CMD_PS3_DATA_L_M 0x0A
234 #define CMD_ALS_DATA_L 0x0B
235 #define CMD_ALS_DATA_M 0x0B
236 #define CMD_ALS_DATA_L_M 0x0B
237 #define CMD_WHITE_DATA_L 0x0C
238 #define CMD_WHITE_DATA_M 0x0C
239 #define CMD_WHITE_DATA_L_M 0x0C
240 #define RESERVED 0x0D
241 #define CMD_INT_FLAG 0x0D
242 #define CMD_ID_L 0x0E
243 #define CMD_ID_M 0x0E
244 #define CMD_ID_L_M 0x0E
245 
251 #define PROXIMITY5_ADDR 0x60
252  // End group macro
256 // --------------------------------------------------------------- PUBLIC TYPES
265 typedef struct
266 {
267  // Input pins
268 
269  digital_in_t int_pin;
270 
271  // Modules
272 
273  i2c_master_t i2c;
274 
275  // ctx variable
276 
277  uint8_t slave_address;
278 
279 } proximity5_t;
280 
284 typedef struct
285 {
286  // Communication gpio pins
287 
288  pin_name_t scl;
289  pin_name_t sda;
290 
291  // Additional gpio pins
292 
293  pin_name_t int_pin;
294 
295  // static variable
296 
297  uint32_t i2c_speed;
298  uint8_t i2c_address;
299 
301 
305 typedef union
306 {
307  unsigned char ALL;
308  struct
309  {
310 
311  unsigned char ALS_SD : 1;
312  unsigned char ALS_INT_EN : 1;
313  unsigned char ALS_PERS : 2;
314  unsigned char RES : 1;
315  unsigned char ALS_IT : 3;
316  };
317 
318 } als_conf1_t;
319 
320 typedef union
321 {
322  unsigned char ALL;
323  struct
324  {
325 
326  unsigned char WHITE_SD : 1;
327  unsigned char RES : 7;
328  };
329 
330 } als_conf2_t;
331 
332 typedef union
333 {
334  uint16_t ALL;
335  struct
336  {
337 
338  uint16_t ALS_THDH_L : 8;
339  uint16_t ALS_THDH_M : 8;
340  };
341 
343 
344 typedef union
345 {
346  uint16_t ALL;
347  struct
348  {
349 
350  uint16_t LS_THDL_L : 8;
351  uint16_t LS_THDL_M : 8;
352  };
353 
355 
356 typedef union
357 {
358  uint16_t ALL;
359  struct
360  {
361 
362  uint16_t ALS_DATA_L : 8;
363  uint16_t ALS_DATA_M : 8;
364  };
365 
367 
368 typedef union
369 {
370  uint8_t ALL;
371  struct
372  {
373  uint8_t PS_SD : 1;
374  uint8_t PS_IT : 3;
375  uint8_t PS_PERS : 2;
376  uint8_t PS_DUTY : 2;
377  };
378 
379 } ps_conf1_t;
380 
381 typedef union
382 {
383  uint8_t ALL;
384  struct {
385 
386  uint8_t PS_INT_EN : 2;
387  uint8_t PS_NS : 1;
388  uint8_t PS_HD : 1;
389  uint8_t PS_GAIN : 2;
390  uint8_t GEST_MODE : 1;
391  uint8_t GEST_INTEN : 1;
392  };
393 
394 } ps_conf2_t;
395 
396 typedef union
397 {
398  uint8_t ALL;
399  struct
400  {
401 
402  uint8_t PS_SC_EN : 1;
403  uint8_t PS_MS : 1;
404  uint8_t PS_TRIG : 1;
405  uint8_t PS_AF : 1;
406  uint8_t PS_SMART_PERS : 1;
407  uint8_t IRED_SEL : 2;
408  uint8_t LED_I_LOW : 1;
409  };
410 
411 } ps_conf3_t;
412 
413 typedef union
414 {
415  uint8_t ALL;
416  struct
417  {
418 
419  uint8_t LED_I : 3;
420  uint8_t PS_SPO : 1;
421  uint8_t PS_SP : 1;
422  uint8_t PS_SC_CUR : 2;
423  uint8_t RES : 1;
424 
425  };
426 
427 } ps_ms_t;
428 
429 typedef union
430 {
431  uint16_t ALL;
432  struct
433  {
434 
435  uint16_t PS_CANC_L : 8;
436  uint16_t PS_CANC_M : 8;
437  };
438 
439 } ps_canc_l_m_t;
440 
441 typedef union
442 {
443  uint16_t ALL;
444  struct
445  {
446 
447  uint16_t PS_THDL_L : 8;
448  uint16_t PS_THDL_M : 8;
449  };
450 
451 } ps_thdl_l_m_t;
452 
453 typedef union
454 {
455  uint16_t ALL;
456  struct
457  {
458 
459  uint16_t PS_THDH_L : 8;
460  uint16_t PS_THDH_M : 8;
461  };
462 
463 } ps_thdh_l_m_t;
464 
465 typedef union
466 {
467  uint16_t ALL;
468  struct
469  {
470 
471  uint16_t PS1_DATA_L : 8;
472  uint16_t PS1_DATA_M : 8;
473  };
474 
476 
477 typedef union
478 {
479  uint16_t ALL;
480  struct {
481 
482  uint16_t PS2_DATA_L : 8;
483  uint16_t PS2_DATA_M : 8;
484  };
485 
487 
488 typedef union
489 {
490  uint16_t ALL;
491  struct
492  {
493 
494  uint16_t PS3_DATA_L : 8;
495  uint16_t PS3_DATA_M : 8;
496  };
497 
499 
500 typedef union
501 {
502  uint16_t ALL;
503  struct
504  {
505 
506  uint16_t WHITE_DATA_L : 8;
507  uint16_t WHITE_DATA_M : 8;
508  };
509 
511 
512 
513 typedef union
514 {
515  uint8_t ALL;
516  struct
517  {
518 
519  uint8_t PS_IF_AWAY : 1;
520  uint8_t PS_IF_CLOSE : 1;
521  uint8_t RES1 : 1;
522  uint8_t RES0 : 1;
523  uint8_t ALS_IF_H : 1;
524  uint8_t ALS_IF_L : 1;
525  uint8_t PS_SPFLAG : 1;
526  uint8_t GEST_DATA_RDY_FLG : 1;
527  };
528 
529 } int_flag_t;
530 
531 
532 typedef union
533 {
534  uint16_t ALL;
535  struct
536  {
537 
538  uint16_t ID_L : 8;
539  uint16_t ID_M : 8;
540 
541  };
542 
543 } id_l_m_t;
544  // End types group
546 // ----------------------------------------------- PUBLIC FUNCTION DECLARATIONS
547 
553 #ifdef __cplusplus
554 extern "C"{
555 #endif
556 
566 
576 
585 
596 void proximity5_generic_write ( proximity5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
597 
608 void proximity5_generic_read ( proximity5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len );
609 
621 uint16_t proximity5_read_reg ( proximity5_t *ctx, uint8_t addr );
622 
633 uint16_t proximity5_get_id ( proximity5_t *ctx );
634 
645 void proximity5_get_values ( proximity5_t *ctx, uint16_t *prox_val );
646 
647 
648 #ifdef __cplusplus
649 }
650 #endif
651 #endif // _PROXIMITY5_H_
652  // End public_function group
655 
656 // ------------------------------------------------------------------------- END
ps_conf3_t
Definition: proximity5.h:397
ps_thdh_l_m_t::PS_THDH_M
uint16_t PS_THDH_M
Definition: proximity5.h:460
int_flag_t::RES1
uint8_t RES1
Definition: proximity5.h:521
proximity5_t::int_pin
digital_in_t int_pin
Definition: proximity5.h:269
ps_canc_l_m_t::PS_CANC_L
uint16_t PS_CANC_L
Definition: proximity5.h:435
int_flag_t::ALS_IF_L
uint8_t ALS_IF_L
Definition: proximity5.h:524
als_conf1_t
Click calibration unions.
Definition: proximity5.h:306
proximity5_t
Click ctx object definition.
Definition: proximity5.h:266
als_thdl_l_m_t::LS_THDL_L
uint16_t LS_THDL_L
Definition: proximity5.h:350
als_thdl_l_m_t::LS_THDL_M
uint16_t LS_THDL_M
Definition: proximity5.h:351
id_l_m_t::ID_L
uint16_t ID_L
Definition: proximity5.h:538
ps3_data_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:490
ps_conf3_t::LED_I_LOW
uint8_t LED_I_LOW
Definition: proximity5.h:408
int_flag_t
Definition: proximity5.h:514
als_conf1_t::ALS_SD
unsigned char ALS_SD
Definition: proximity5.h:311
ps_conf3_t::PS_SMART_PERS
uint8_t PS_SMART_PERS
Definition: proximity5.h:406
ps1_data_l_m_t::PS1_DATA_M
uint16_t PS1_DATA_M
Definition: proximity5.h:472
ps3_data_l_m_t::PS3_DATA_M
uint16_t PS3_DATA_M
Definition: proximity5.h:495
proximity5_cfg_t::i2c_speed
uint32_t i2c_speed
Definition: proximity5.h:297
white_data_l_m_t::WHITE_DATA_M
uint16_t WHITE_DATA_M
Definition: proximity5.h:507
als_conf2_t::ALL
unsigned char ALL
Definition: proximity5.h:322
id_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:534
ps_thdl_l_m_t
Definition: proximity5.h:442
ps_conf2_t::GEST_INTEN
uint8_t GEST_INTEN
Definition: proximity5.h:391
ps_conf1_t::PS_DUTY
uint8_t PS_DUTY
Definition: proximity5.h:376
ps_thdl_l_m_t::PS_THDL_L
uint16_t PS_THDL_L
Definition: proximity5.h:447
als_data_l_m_t::ALS_DATA_L
uint16_t ALS_DATA_L
Definition: proximity5.h:362
ps_ms_t
Definition: proximity5.h:414
ps_conf1_t::ALL
uint8_t ALL
Definition: proximity5.h:370
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:479
ps_ms_t::PS_SP
uint8_t PS_SP
Definition: proximity5.h:421
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:389
proximity5_cfg_t::i2c_address
uint8_t i2c_address
Definition: proximity5.h:298
ps_conf2_t
Definition: proximity5.h:382
als_thdh_l_m_t::ALS_THDH_L
uint16_t ALS_THDH_L
Definition: proximity5.h:338
id_l_m_t::ID_M
uint16_t ID_M
Definition: proximity5.h:539
als_data_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:358
proximity5_t::slave_address
uint8_t slave_address
Definition: proximity5.h:277
proximity5_t::i2c
i2c_master_t i2c
Definition: proximity5.h:273
proximity5_default_cfg
void proximity5_default_cfg(proximity5_t *ctx)
Click Default Configuration function.
ps_conf3_t::ALL
uint8_t ALL
Definition: proximity5.h:398
ps_conf2_t::PS_INT_EN
uint8_t PS_INT_EN
Definition: proximity5.h:386
ps_ms_t::RES
uint8_t RES
Definition: proximity5.h:423
white_data_l_m_t::WHITE_DATA_L
uint16_t WHITE_DATA_L
Definition: proximity5.h:506
ps_conf3_t::PS_MS
uint8_t PS_MS
Definition: proximity5.h:403
als_data_l_m_t::ALS_DATA_M
uint16_t ALS_DATA_M
Definition: proximity5.h:363
ps_conf1_t
Definition: proximity5.h:369
int_flag_t::PS_IF_AWAY
uint8_t PS_IF_AWAY
Definition: proximity5.h:519
int_flag_t::PS_SPFLAG
uint8_t PS_SPFLAG
Definition: proximity5.h:525
ps_canc_l_m_t
Definition: proximity5.h:430
proximity5_cfg_t
Click configuration structure definition.
Definition: proximity5.h:285
ps2_data_l_m_t::PS2_DATA_M
uint16_t PS2_DATA_M
Definition: proximity5.h:483
ps_conf3_t::PS_AF
uint8_t PS_AF
Definition: proximity5.h:405
ps1_data_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:467
ps2_data_l_m_t::PS2_DATA_L
uint16_t PS2_DATA_L
Definition: proximity5.h:482
proximity5_cfg_t::int_pin
pin_name_t int_pin
Definition: proximity5.h:293
ps_ms_t::ALL
uint8_t ALL
Definition: proximity5.h:415
als_conf1_t::ALS_INT_EN
unsigned char ALS_INT_EN
Definition: proximity5.h:312
als_thdh_l_m_t::ALS_THDH_M
uint16_t ALS_THDH_M
Definition: proximity5.h:339
ps_conf1_t::PS_SD
uint8_t PS_SD
Definition: proximity5.h:373
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:288
als_conf1_t::ALS_IT
unsigned char ALS_IT
Definition: proximity5.h:315
als_conf2_t::RES
unsigned char RES
Definition: proximity5.h:327
int_flag_t::GEST_DATA_RDY_FLG
uint8_t GEST_DATA_RDY_FLG
Definition: proximity5.h:526
ps_thdh_l_m_t
Definition: proximity5.h:454
ps_thdl_l_m_t::PS_THDL_M
uint16_t PS_THDL_M
Definition: proximity5.h:448
ps_conf3_t::PS_SC_EN
uint8_t PS_SC_EN
Definition: proximity5.h:402
ps_conf1_t::PS_IT
uint8_t PS_IT
Definition: proximity5.h:374
int_flag_t::ALL
uint8_t ALL
Definition: proximity5.h:515
als_thdh_l_m_t
Definition: proximity5.h:333
ps_conf1_t::PS_PERS
uint8_t PS_PERS
Definition: proximity5.h:375
ps_thdl_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:443
ps_conf2_t::ALL
uint8_t ALL
Definition: proximity5.h:383
als_thdl_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:346
ps_conf2_t::GEST_MODE
uint8_t GEST_MODE
Definition: proximity5.h:390
ps_ms_t::LED_I
uint8_t LED_I
Definition: proximity5.h:419
als_data_l_m_t
Definition: proximity5.h:357
white_data_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:502
als_thdl_l_m_t
Definition: proximity5.h:345
proximity5_cfg_t::sda
pin_name_t sda
Definition: proximity5.h:289
als_conf2_t::WHITE_SD
unsigned char WHITE_SD
Definition: proximity5.h:326
ps1_data_l_m_t::PS1_DATA_L
uint16_t PS1_DATA_L
Definition: proximity5.h:471
ps_conf3_t::IRED_SEL
uint8_t IRED_SEL
Definition: proximity5.h:407
ps3_data_l_m_t
Definition: proximity5.h:489
ps_conf2_t::PS_HD
uint8_t PS_HD
Definition: proximity5.h:388
int_flag_t::PS_IF_CLOSE
uint8_t PS_IF_CLOSE
Definition: proximity5.h:520
ps_thdh_l_m_t::PS_THDH_L
uint16_t PS_THDH_L
Definition: proximity5.h:459
als_thdh_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:334
ps_canc_l_m_t::PS_CANC_M
uint16_t PS_CANC_M
Definition: proximity5.h:436
ps_thdh_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:455
ps1_data_l_m_t
Definition: proximity5.h:466
ps_conf3_t::PS_TRIG
uint8_t PS_TRIG
Definition: proximity5.h:404
als_conf1_t::ALL
unsigned char ALL
Definition: proximity5.h:307
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:522
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:494
ps_ms_t::PS_SPO
uint8_t PS_SPO
Definition: proximity5.h:420
ps_canc_l_m_t::ALL
uint16_t ALL
Definition: proximity5.h:431
ps_conf2_t::PS_NS
uint8_t PS_NS
Definition: proximity5.h:387
als_conf1_t::RES
unsigned char RES
Definition: proximity5.h:314
white_data_l_m_t
Definition: proximity5.h:501
ps_ms_t::PS_SC_CUR
uint8_t PS_SC_CUR
Definition: proximity5.h:422
als_conf2_t
Definition: proximity5.h:321
int_flag_t::ALS_IF_H
uint8_t ALS_IF_H
Definition: proximity5.h:523
als_conf1_t::ALS_PERS
unsigned char ALS_PERS
Definition: proximity5.h:313
PROXIMITY5_RETVAL
#define PROXIMITY5_RETVAL
Definition: proximity5.h:76
ps2_data_l_m_t
Definition: proximity5.h:478
id_l_m_t
Definition: proximity5.h:533