Skip to content

Commit 9f9f263

Browse files
author
Driver Generator 2
committed
Generate SFx6xxx driver from SFx6xxx model version 2.3.1
1 parent 94a0733 commit 9f9f263

File tree

7 files changed

+20
-25
lines changed

7 files changed

+20
-25
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Quality check
22

33
on:
4-
pull_request:
5-
branches:
6-
- master
74
push:
5+
pull_request:
86
branches:
9-
- master
10-
7+
- main
118
jobs:
129
driver-quality:
1310
uses: sensirion/.github/.github/workflows/driver.c.check.yml@main
11+
12+
code-generation-check:
13+
uses: sensirion/.github/.github/workflows/driver.generated.metadata_check.yml@main

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2024, Sensirion AG
3+
Copyright (c) 2025, Sensirion AG
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without

README.md

+2-8
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ If you run `./sfx6xxx_i2c_example_usage` but do not get sensor readings but some
109109

110110
```
111111
Error executing read_product_identifier(): -1
112-
Error executing start_o2_continuous_measurement(): -1
113-
Error executing read_flow(): -1
112+
Error executing stop_continuous_measurement(): -1
113+
Error executing start_air_continuous_measurement(): -1
114114
...
115115
```
116116
then go through the below troubleshooting steps.
@@ -163,12 +163,6 @@ $ sudo vi local.rules
163163

164164
**Contributions are welcome!**
165165

166-
We develop and test this driver using our company internal tools (version
167-
control, continuous integration, code review etc.) and automatically
168-
synchronize the master branch with GitHub. But this doesn't mean that we don't
169-
respond to issues or don't accept pull requests on GitHub. In fact, you're very
170-
welcome to open issues or create pull requests :)
171-
172166
This Sensirion library uses
173167
[`clang-format`](https://releases.llvm.org/download.html) to standardize the
174168
formatting of all our `.c` and `.h` files. Make sure your contributions are

example-usage/sfx6xxx_i2c_example_usage.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
* THIS FILE IS AUTOMATICALLY GENERATED
33
*
4-
* Generator: sensirion-driver-generator 0.40.1
4+
* Generator: sensirion-driver-generator 1.1.2
55
* Product: sfx6xxx
66
* Model-Version: 2.3.1
77
*/
88
/*
9-
* Copyright (c) 2024, Sensirion AG
9+
* Copyright (c) 2025, Sensirion AG
1010
* All rights reserved.
1111
*
1212
* Redistribution and use in source and binary forms, with or without
@@ -58,9 +58,10 @@ int main(void) {
5858
}
5959
printf("product_identifier: %u ", product_identifier);
6060
printf("serial_number: %" PRIx64 "\n", serial_number);
61-
error = sfx6xxx_start_o2_continuous_measurement();
61+
sfx6xxx_stop_continuous_measurement();
62+
error = sfx6xxx_start_air_continuous_measurement();
6263
if (error != NO_ERROR) {
63-
printf("error executing start_o2_continuous_measurement(): %i\n",
64+
printf("error executing start_air_continuous_measurement(): %i\n",
6465
error);
6566
return error;
6667
}

metadata.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# driver generation metadata
2-
generator_version: 0.40.1
2+
generator_version: 1.1.2
33
model_version: 2.3.1
44
dg_status: released
55
is_manually_modified: false
66
first_generated: '2023-10-17 13:54'
7-
last_generated: '2024-04-22 13:55'
7+
last_generated: '2025-04-16 14:45'

sfx6xxx_i2c.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
* THIS FILE IS AUTOMATICALLY GENERATED
33
*
4-
* Generator: sensirion-driver-generator 0.40.1
4+
* Generator: sensirion-driver-generator 1.1.2
55
* Product: sfx6xxx
66
* Model-Version: 2.3.1
77
*/
88
/*
9-
* Copyright (c) 2024, Sensirion AG
9+
* Copyright (c) 2025, Sensirion AG
1010
* All rights reserved.
1111
*
1212
* Redistribution and use in source and binary forms, with or without
@@ -66,7 +66,7 @@ float sfx6xxx_signal_flow(int16_t flow_raw, int16_t flow_scale_factor,
6666
int16_t flow_offset) {
6767
float flow = 0.0;
6868
float scale_factor = (float)(flow_scale_factor);
69-
flow = (float)(flow_raw - flow_offset) / scale_factor;
69+
flow = ((float)(flow_raw) - (float)(flow_offset)) / scale_factor;
7070
return flow;
7171
}
7272

sfx6xxx_i2c.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/*
22
* THIS FILE IS AUTOMATICALLY GENERATED
33
*
4-
* Generator: sensirion-driver-generator 0.40.1
4+
* Generator: sensirion-driver-generator 1.1.2
55
* Product: sfx6xxx
66
* Model-Version: 2.3.1
77
*/
88
/*
9-
* Copyright (c) 2024, Sensirion AG
9+
* Copyright (c) 2025, Sensirion AG
1010
* All rights reserved.
1111
*
1212
* Redistribution and use in source and binary forms, with or without

0 commit comments

Comments
 (0)