Skip to content

Commit b28b321

Browse files
author
xfp-bot
committed
PAS CO2 Sensor Arduino Library v1.0.2
1 parent 107ab45 commit b28b321

38 files changed

+39
-131
lines changed

examples/pulse-api-test/pulse-api-test.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ void setup()
1010
/**
1111
* Serial Initialization
1212
*/
13-
Serial.begin(115200);
13+
Serial.begin(9600);
1414
Serial.println("[arduino] : serial initialized");
1515

1616
TimerIno t;

examples/pulse-interrupt/pulse-interrupt.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ void isr (void * )
1414

1515
void setup()
1616
{
17-
Serial.begin(115200);
17+
Serial.begin(9600);
1818
Serial.println("pas co2 serial initialized");
1919

2020
err = cotwo.startMeasure(isr);

examples/pulse-polling/pulse-polling.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Error_t err;
88

99
void setup()
1010
{
11-
Serial.begin(115200);
11+
Serial.begin(9600);
1212
Serial.println("pas co2 serial initialized");
1313

1414
err = cotwo.startMeasure();

examples/pulse-reset/pulse-reset.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Error_t err;
88

99
void setup()
1010
{
11-
Serial.begin(115200);
11+
Serial.begin(9600);
1212
Serial.println("pas co2 serial initialized");
1313
}
1414

examples/serial-alarm/serial-alarm.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void isr (void * )
2727

2828
void setup()
2929
{
30-
Serial.begin(115200);
30+
Serial.begin(9600);
3131
Serial.println("pas co2 serial initialized");
3232

3333
err = cotwo.startMeasure(10, 25000, isr);

examples/serial-api-test/serial-api-test.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void setup()
2424
/**
2525
* Serial Initialization
2626
*/
27-
Serial.begin(115200);
27+
Serial.begin(9600);
2828
Serial.println("[arduino] : serial initialized");
2929

3030
TimerIno t;

examples/serial-calibrate/serial-calibrate.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ uint16_t pressRef = 700;
2222

2323
void setup()
2424
{
25-
Serial.begin(115200);
25+
Serial.begin(9600);
2626
Serial.println("pas co2 serial initialized");
2727

2828
Error_t err = cotwo.calibrate(aboc, abocRef, pressRef);

examples/serial-device-id/serial-device-id.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ uint8_t prodId, revId;
2020

2121
void setup()
2222
{
23-
Serial.begin(115200);
23+
Serial.begin(9600);
2424
Serial.println("pas co2 serial initialized");
2525

2626
Error_t err = cotwo.getDeviceID(prodId, revId);

examples/serial-diagnosis/serial-diagnosis.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Diag_t diagnosis;
2020

2121
void setup()
2222
{
23-
Serial.begin(115200);
23+
Serial.begin(9600);
2424
Serial.println("pas co2 serial initialized");
2525

2626
Error_t err = cotwo.getDiagnosis(diagnosis);

examples/serial-oneshot/serial-oneshot.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Error_t err;
2121

2222
void setup()
2323
{
24-
Serial.begin(115200);
24+
Serial.begin(9600);
2525
Serial.println("pas co2 serial initialized");
2626
}
2727

examples/serial-periodic/serial-periodic.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void isr (void * )
2727

2828
void setup()
2929
{
30-
Serial.begin(115200);
30+
Serial.begin(9600);
3131
Serial.println("pas co2 serial initialized");
3232

3333
err = cotwo.startMeasure(7, 0, isr);

examples/serial-reset/serial-reset.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ PASCO2SerialIno cotwo(bus);
1818

1919
void setup()
2020
{
21-
Serial.begin(115200);
21+
Serial.begin(9600);
2222
Serial.println("pas co2 serial initialized");
2323

2424
Error_t err = cotwo.reset();

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url":"https://github.com/Infineon/arduino-pas-co2-sensor.git",
88
"branch":"master"
99
},
10-
"version":"1.0.1",
10+
"version":"1.0.2",
1111
"license":"MIT",
1212
"frameworks":"arduino",
1313
"platforms":[

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=pas-co2-sensor
2-
version=1.0.1
2+
version=1.0.2
33
author=Infineon Technologies
44
maintainer=Infineon Technologies <www.infineon.com>
55
sentence=C++ library for Infineon PAS XENSIV™ CO2 sensor

src/pas-co2-conf-dfl.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212

1313
#include "pas-co2-conf-opts.hpp"
1414

15-
#ifndef PAS_CO2_FRAMEWORK
16-
#error "PAS CO2 error framework undefined" /**< PAS CO2 framework must be defined in conf. or at compilation */
17-
#endif
18-
1915
#ifndef PAS_CO2_INTF
2016
#define PAS_CO2_INTF PAS_CO2_INTF_ALL
2117
#endif

src/pas-co2-conf-opts.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,6 @@
1010
#ifndef PAS_CO2_CONF_OPTS_HPP_
1111
#define PAS_CO2_CONF_OPTS_HPP_
1212

13-
/**
14-
* @name Development framewoks
15-
* @{
16-
*/
17-
18-
#define PAS_CO2_FRMWK_ARDUINO 0x00U /**< Arduino */
19-
#define PAS_CO2_FRMWK_PSOC6HAL 0x01U /**< PSoC6 HAL */
20-
/** @} */
21-
2213
/**
2314
* @name Sensor interfaces
2415
* @{

src/pas-co2-conf.hpp

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@
2727

2828
#include "pas-co2-conf-opts.hpp"
2929

30-
/**
31-
* @brief Development framework
32-
*/
33-
34-
#ifndef PAS_CO2_FRAMEWORK
35-
#define PAS_CO2_FRAMEWORK PAS_CO2_FRMWK_ARDUINO
36-
#endif
37-
3830
/**
3931
* @brief Sensor physical interface
4032
*/
@@ -64,13 +56,13 @@
6456

6557
#if (PAS_CO2_LOGGER_ENABLED == 1)
6658

67-
#define PAS_CO2_CORE_LOGGER_ENABLED 1 /**< Core module */
68-
#define PAS_CO2_SERIAL_LOGGER_ENABLED 1 /**< Serial module */
69-
#define PAS_CO2_I2C_LOGGER_ENABLED 1 /**< I2C module */
70-
#define PAS_CO2_UART_LOGGER_ENABLED 1 /**< UART module */
71-
#define PAS_CO2_PULSE_LOGGER_ENABLED 1 /**< Pulse module */
72-
#define PAS_CO2_PWM_LOGGER_ENABLED 1 /**< PWM SW module */
73-
#define PAS_CO2_REG_LOGGER_ENABLED 1 /**< Register module */
59+
#define PAS_CO2_CORE_LOGGER_ENABLED 0 /**< Core module */
60+
#define PAS_CO2_SERIAL_LOGGER_ENABLED 0 /**< Serial module */
61+
#define PAS_CO2_I2C_LOGGER_ENABLED 0 /**< I2C module */
62+
#define PAS_CO2_UART_LOGGER_ENABLED 0 /**< UART module */
63+
#define PAS_CO2_PULSE_LOGGER_ENABLED 0 /**< Pulse module */
64+
#define PAS_CO2_PWM_LOGGER_ENABLED 0 /**< PWM SW module */
65+
#define PAS_CO2_REG_LOGGER_ENABLED 0 /**< Register module */
7466
#define PAS_CO2_APP_LOGGER_ENABLED 1 /**< Application level module */
7567

7668
#endif

src/pas-co2-i2c.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class I2C : public SBus
3030
{
3131
public:
3232

33-
static const uint32_t dfltFreq = 100000; /**< Default I2C SCKL frequency */
33+
static const uint32_t dfltFreq = 400000; /**< Default I2C SCKL frequency */
3434

3535
I2C (I2CPAL * const i2cpal,
3636
uint32_t freqHz = dfltFreq);

src/pas-co2-pal-gpio-ino.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
*/
99

1010
#include "pas-co2-pal-gpio-ino.hpp"
11-
12-
#if (PAS_CO2_FRAMEWORK == PAS_CO2_FRMWK_ARDUINO)
13-
1411
#include <Arduino.h>
1512

1613
using namespace pasco2;
@@ -168,6 +165,4 @@ inline Error_t GPIOIno::disable()
168165
digitalWrite(this->pin, GPIO_HIGH);
169166
}
170167
return pasco2::OK;
171-
}
172-
173-
#endif /** PAS_CO2_FRAMEWORK **/
168+
}

src/pas-co2-pal-gpio-ino.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
#ifndef PAS_CO2_PAL_GPIO_INO_HPP_
1111
#define PAS_CO2_PAL_GPIO_INO_HPP_
1212

13-
#include "pas-co2-conf.hpp"
14-
15-
#if (PAS_CO2_FRAMEWORK == PAS_CO2_FRMWK_ARDUINO)
16-
1713
#include <stdint.h>
1814
#include "pas-co2-pal-gpio.hpp"
1915

@@ -52,6 +48,5 @@ class GPIOIno : virtual public pasco2::GPIO
5248

5349
/** @} */
5450

55-
#endif /** PAS_CO2_FRAMEWORK **/
5651
#endif /** PAS_CO2_PAL_GPIO_INO_HPP_ **/
5752

src/pas-co2-pal-i2c-ino.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
#include "pas-co2-pal-i2c-ino.hpp"
1111

12-
#if (PAS_CO2_FRAMEWORK == PAS_CO2_FRMWK_ARDUINO)
13-
1412
#if IS_INTF(PAS_CO2_INTF_I2C)
1513

1614
#include <stdarg.h>
@@ -294,5 +292,4 @@ namespace pasco2
294292
I2C i2c(static_cast<I2CPAL *>(&i2cpalino));
295293
}
296294

297-
#endif /** PAS_CO2_INTF **/
298-
#endif /** PAS_CO2_FRAMEWORK **/
295+
#endif /** PAS_CO2_INTF **/

src/pas-co2-pal-i2c-ino.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
#include "pas-co2-conf.hpp"
1414

15-
#if (PAS_CO2_FRAMEWORK == PAS_CO2_FRMWK_ARDUINO)
16-
1715
#if IS_INTF(PAS_CO2_INTF_I2C)
1816

1917
#include <Wire.h>
@@ -50,5 +48,4 @@ class I2CPALIno : virtual public I2CPAL
5048
extern I2CPALIno i2cpalino;
5149

5250
#endif /** PAS_CO2_INTF **/
53-
#endif /** PAS_CO2_FRAMEWORK **/
5451
#endif /** PAS_CO2_PAL_I2C_INO_H_ **/

src/pas-co2-pal-logger-ino.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
#include "pas-co2-pal-logger-ino.hpp"
1111

12-
#if (PAS_CO2_FRAMEWORK == PAS_CO2_FRMWK_ARDUINO)
13-
1412
#if (PAS_CO2_LOGGER_ENABLED == 1)
1513

1614
#include <Arduino.h>
@@ -84,5 +82,4 @@ namespace pasco2
8482
Logger cotwo_log(static_cast<LoggerPAL*>(&logpalino));
8583
}
8684

87-
#endif /* PAS_CO2_LOGGER_ENABLED */
88-
#endif /** PAS_CO2_FRAMEWORK **/
85+
#endif /* PAS_CO2_LOGGER_ENABLED */

src/pas-co2-pal-logger-ino.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@
1111
#define PAS_CO2_PAL_LOGGER_INO_H_
1212

1313
#include "pas-co2-conf.hpp"
14-
15-
#if (PAS_CO2_FRAMEWORK == PAS_CO2_FRMWK_ARDUINO)
16-
1714
#include "pas-co2-pal-logger.hpp"
1815

1916
#if (PAS_CO2_LOGGER_ENABLED == 1)
@@ -43,5 +40,4 @@ class LoggerIno : public LoggerPAL
4340
extern LoggerIno logpalino;
4441

4542
#endif /* PAS_CO2_LOGGER_ENABLED */
46-
#endif /** PAS_CO2_FRAMEWORK **/
4743
#endif /** PAS_CO2_PAL_LOGGER_INO_H_ **/

src/pas-co2-pal-pwm-ino.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
#include "pas-co2-pal-pwm-ino.hpp"
1111

12-
#if (PAS_CO2_FRAMEWORK == PAS_CO2_FRMWK_ARDUINO)
13-
1412
#if IS_INTF(PAS_CO2_INTF_PULSE)
1513

1614
/**
@@ -40,5 +38,4 @@ PWMIno::~PWMIno()
4038

4139
}
4240

43-
#endif /** PAS_CO2_INTF **/
44-
#endif /** PAS_CO2_FRAMEWORK **/
41+
#endif /** PAS_CO2_INTF **/

src/pas-co2-pal-pwm-ino.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
#include "pas-co2-conf.hpp"
1414

15-
#if (PAS_CO2_FRAMEWORK == PAS_CO2_FRMWK_ARDUINO)
16-
1715
#if IS_INTF(PAS_CO2_INTF_PULSE)
1816

1917
#include <Arduino.h>
@@ -42,5 +40,4 @@ class PWMIno: virtual public PWMSW
4240
/** @} */
4341

4442
#endif /** PAS_CO2_INTF **/
45-
#endif /** PAS_CO2_FRAMEWORK **/
4643
#endif /** PAS_CO2_PAL_PWM_INO_HPP_ **/

src/pas-co2-pal-timer-ino.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@
77
* SPDX-License-Identifier: MIT
88
*/
99

10-
#include "pas-co2-conf.hpp"
11-
12-
#if (PAS_CO2_FRAMEWORK == PAS_CO2_FRMWK_ARDUINO)
13-
1410
#include <Arduino.h>
1511
#include "pas-co2-pal-timer-ino.hpp"
1612

@@ -122,6 +118,4 @@ inline Error_t TimerIno::delay(const uint32_t timeout)
122118
t.deinit();
123119

124120
return pasco2::OK;
125-
}
126-
127-
#endif /** PAS_CO2_FRAMEWORK **/
121+
}

src/pas-co2-pal-timer-ino.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
#ifndef PAS_CO2_PAL_TIMER_INO_HPP_
1111
#define PAS_CO2_PAL_TIMER_INO_HPP_
1212

13-
#include "pas-co2-conf.hpp"
14-
15-
#if (PAS_CO2_FRAMEWORK == PAS_CO2_FRMWK_ARDUINO)
16-
1713
#include "pas-co2-pal-timer.hpp"
1814

1915
using namespace pasco2;
@@ -42,5 +38,4 @@ class TimerIno: virtual public Timer
4238

4339
/** @} */
4440

45-
#endif /** PAS_CO2_FRAMEWORK **/
4641
#endif /** PAS_CO2_PAL_TIMER_INO_HPP_ **/

src/pas-co2-pal-uart-ino.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
#include "pas-co2-conf.hpp"
1111

12-
#if (PAS_CO2_FRAMEWORK == PAS_CO2_FRMWK_ARDUINO)
13-
1412
#if IS_INTF(PAS_CO2_INTF_UART)
1513

1614
#include "pas-co2-pal-uart-ino.hpp"
@@ -400,5 +398,4 @@ Error_t UARTPALIno::waitReceive(uint16_t bytesRcvd,
400398
return pasco2::OK;
401399
}
402400

403-
#endif /** PAS_CO2_INTF **/
404-
#endif /** PAS_CO2_FRAMEWORK **/
401+
#endif /** PAS_CO2_INTF **/

0 commit comments

Comments
 (0)