ZMOD4510 Nitrogen Dioxide and Ozone Firmware Documentation |

zmod4510_config_no2_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_NO2_O3_H_
18 #define _ZMOD4510_CONFIG_NO2_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 slave 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 (32)
41
42 // time between samples
43 #define ZMOD4510_NO2_O3_SAMPLE_TIME (6000U)
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_no2_o3[] = {
56 0x00, 0x50, 0xFF, 0x06,
57 0xFE, 0xA2, 0xFE, 0x3E,
58 0x00, 0x10, 0x00, 0x52,
59 0x3F, 0x66, 0x00, 0x42,
60 0x23, 0x03,
61 0x00, 0x00, 0x02, 0x41,
62 0x00, 0x41, 0x00, 0x41,
63 0x00, 0x49, 0x00, 0x50,
64 0x02, 0x42, 0x00, 0x42,
65 0x00, 0x42, 0x00, 0x4A,
66 0x00, 0x50, 0x02, 0x43,
67 0x00, 0x43, 0x00, 0x43,
68 0x00, 0x43, 0x80, 0x5B,
69 };
70
71 zmod4xxx_conf zmod_no2_o3_sensor_cfg[] = {
72 [INIT] = {
73 .start = 0x80,
74 .h = { .addr = ZMOD4XXX_H_ADDR, .len = 2, .data_buf = &data_set_4510_init[0]},
75 .d = { .addr = ZMOD4XXX_D_ADDR, .len = 2, .data_buf = &data_set_4510_init[2]},
76 .m = { .addr = ZMOD4XXX_M_ADDR, .len = 2, .data_buf = &data_set_4510_init[4]},
77 .s = { .addr = ZMOD4XXX_S_ADDR, .len = 4, .data_buf = &data_set_4510_init[6]},
78 .r = { .addr = 0x97, .len = 4},
79 },
80
81 [MEASUREMENT] = {
82 .start = 0x80,
83 .h = {.addr = ZMOD4XXX_H_ADDR, .len = 8, .data_buf = &data_set_4510_no2_o3[0]},
84 .d = {.addr = ZMOD4XXX_D_ADDR, .len = 8, .data_buf = &data_set_4510_no2_o3[8]},
85 .m = {.addr = ZMOD4XXX_M_ADDR, .len = 2, .data_buf = &data_set_4510_no2_o3[16]},
86 .s = {.addr = ZMOD4XXX_S_ADDR, .len = 32, .data_buf = &data_set_4510_no2_o3[18]},
87 .r = {.addr = 0x97, .len = 32},
88 .prod_data_len = ZMOD4510_PROD_DATA_LEN,
89 },
90 };
91
92 #define RMOX3_OFFSET (15 * 2)
93
94 #endif //_ZMOD4510_CONFIG_NO2_O3_H_
zmod4xxx_types.h
zmod4xxx types
zmod4xxx_conf
Structure to hold the gas sensor module configuration.
Definition: zmod4xxx_types.h:87