ZMOD4510 Ultra-Low Power Ozone Firmware Documentation |

zmod4510_config_ulp_o3.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * Copyright (c) 2024 Renesas Electronics Corporation
3 * All Rights Reserved.
4 *
5 * This code is proprietary to Renesas, and is license pursuant to the terms and
6 * conditions that may be accessed at:
7 * https://www.renesas.com/eu/en/document/msc/renesas-software-license-terms-gas-sensor-software
8 *****************************************************************************/
9
17 #ifndef _ZMOD4510_CONFIG_ULP_O3_H_
18 #define _ZMOD4510_CONFIG_ULP_O3_H_
19
20 #include <stdio.h>
21 #include "zmod4xxx_types.h"
22
23 #define INIT 0
24 #define MEASUREMENT 1
25
26 /**********************************/
27 /* < Define product ID > */
28 #define ZMOD4510_PID 0x6320
29
30 /**********************************/
31 /* < Define I2C slase address > */
32 #define ZMOD4510_I2C_ADDR 0x33
33
34 /**********************************/
35 /* < Define product data length > */
36 #define ZMOD4510_PROD_DATA_LEN 10
37
38 /*************************************/
39 /* < Define ADC result data length > */
40 #define ZMOD4510_ADC_DATA_LEN 18
41
42 // time between samples
43 #define ZMOD4510_ULP_O3_SAMPLE_TIME (2000U)
44
45 #define ZMOD4XXX_H_ADDR 0x40
46 #define ZMOD4XXX_D_ADDR 0x50
47 #define ZMOD4XXX_M_ADDR 0x60
48 #define ZMOD4XXX_S_ADDR 0x68
49
50 uint8_t data_set_4510_init[] = {
51 0x00, 0x50,
52 0x00, 0x28, 0xC3, 0xE3,
53 0x00, 0x00, 0x80, 0x40};
54
55 uint8_t data_set_4510_ulp_o3[] = {
56 0x00, 0x50, 0xFE, 0x70,
57 0x00, 0x10,
58 0x23, 0x03,
59 0x00, 0x00, 0x06, 0x41,
60 0x06, 0x41, 0x06, 0x41,
61 0x06, 0x41, 0x06, 0x41,
62 0x06, 0x41, 0x06, 0x41,
63 0x86, 0x41
64 };
65
66 zmod4xxx_conf zmod_ulp_o3_sensor_cfg[] = {
67 [INIT] = {
68 .start = 0x80,
69 .h = { .addr = ZMOD4XXX_H_ADDR, .len = 2, .data_buf = &data_set_4510_init[0]},
70 .d = { .addr = ZMOD4XXX_D_ADDR, .len = 2, .data_buf = &data_set_4510_init[2]},
71 .m = { .addr = ZMOD4XXX_M_ADDR, .len = 2, .data_buf = &data_set_4510_init[4]},
72 .s = { .addr = ZMOD4XXX_S_ADDR, .len = 4, .data_buf = &data_set_4510_init[6]},
73 .r = { .addr = 0x97, .len = 4},
74 },
75
76 [MEASUREMENT] = {
77 .start = 0x80,
78 .h = {.addr = ZMOD4XXX_H_ADDR, .len = 4, .data_buf = &data_set_4510_ulp_o3[0]},
79 .d = {.addr = ZMOD4XXX_D_ADDR, .len = 2, .data_buf = &data_set_4510_ulp_o3[4]},
80 .m = {.addr = ZMOD4XXX_M_ADDR, .len = 2, .data_buf = &data_set_4510_ulp_o3[6]},
81 .s = {.addr = ZMOD4XXX_S_ADDR, .len = 18, .data_buf = &data_set_4510_ulp_o3[8]},
82 .r = {.addr = 0x97, .len = 18},
83 .prod_data_len = ZMOD4510_PROD_DATA_LEN,
84 },
85 };
86
87 #endif //_ZMOD4510_CONFIG_ULP_O3_H_
zmod4xxx_types.h
zmod4xxx types
zmod4xxx_conf
Structure to hold the gas sensor module configuration.
Definition: zmod4xxx_types.h:87