Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
sds011_internal.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018 HAW-Hamburg
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
18
#ifndef SDS011_INTERNAL_H
19
#define SDS011_INTERNAL_H
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
28
#define SDS011_UART_BAUDRATE (9600U)
29
34
#define SDS011_FRAME_SEND_LEN (19U)
35
#define SDS011_FRAME_RECV_LEN (10U)
42
#define SDS011_CMD_DB1_SET_DR_MODE (2U)
43
#define SDS011_CMD_DB1_QUERY_DATA (4U)
44
#define SDS011_CMD_DB1_SET_DEV_ID (5U)
45
#define SDS011_CMD_DB1_SET_SLEEP_WORK (6U)
46
#define SDS011_CMD_DB1_CHECK_FIRMWARE (7U)
47
#define SDS011_CMD_DB1_SET_WORK_PERIOD (8U)
54
#define SDS011_CMD_OPT_QUERY (0U)
55
#define SDS011_CMD_OPT_SET (1U)
56
#define SDS011_CMD_OPT_REPORT_ACTIVE (0U)
57
#define SDS011_CMD_OPT_REPORT_QUERY (1U)
58
#define SDS011_CMD_OPT_SLEEP (0U)
59
#define SDS011_CMD_OPT_WORK (1U)
66
#define SDS011_CMDID_QUERY (0xB4)
67
#define SDS011_RCMDID_REPLY (0xC5)
68
#define SDS011_RCMDID_DATA (0xC0)
69
#define SDS011_FRAME_TAIL (0xAB)
70
#define SDS011_FRAME_HEAD (0xAA)
71
#define SDS011_FRAME_CSUM_MSK (0xFF)
78
#define SDS011_FRAME_HEAD_IDX (0U)
79
#define SDS011_CMDID_IDX (1U)
80
#define SDS011_DB1_IDX (2U)
81
#define SDS011_DB2_IDX (3U)
82
#define SDS011_DB3_IDX (4U)
83
#define SDS011_DB4_IDX (5U)
84
#define SDS011_DB5_IDX (6U)
85
#define SDS011_DB6_IDX (7U)
86
#define SDS011_DEVID1_IDX (15U)
87
#define SDS011_DEVID2_IDX (16U)
88
#define SDS011_FRAME_SEND_TAIL_IDX (SDS011_FRAME_SEND_LEN - 1)
89
#define SDS011_FRAME_RECV_TAIL_IDX (SDS011_FRAME_RECV_LEN - 1)
90
#define SDS011_FRAME_SEND_CSUM_IDX (SDS011_FRAME_SEND_LEN - 2)
91
#define SDS011_FRAME_RECV_CSUM_IDX (SDS011_FRAME_RECV_LEN - 2)
94
#ifdef __cplusplus
95
}
96
#endif
97
98
#endif
/* SDS011_INTERNAL_H */
Generated on Sat Nov 23 2024 19:57:24 by
1.9.8