mirror of
https://github.com/RobTillaart/Arduino.git
synced 2024-10-03 18:09:02 -04:00
0.3.4 AM232X
This commit is contained in:
parent
73ca1cccbb
commit
35bb1d4668
@ -1,7 +1,7 @@
|
||||
//
|
||||
// FILE: AM232X.cpp
|
||||
// AUTHOR: Rob Tillaart
|
||||
// VERSION: 0.3.3
|
||||
// VERSION: 0.3.4
|
||||
// PURPOSE: AM232X library for AM2320 for Arduino.
|
||||
//
|
||||
// HISTORY:
|
||||
@ -22,6 +22,7 @@
|
||||
// 0.3.1 2021-01-28 fix TODO's in code
|
||||
// 0.3.2 2021-03-30 #13 - timeout to isConnected() + wakeUp() + readme.md
|
||||
// 0.3.3 2021-10-19 update build-CI
|
||||
// 0.3.4 2021-12-11 add unit test, update library.json, license
|
||||
|
||||
|
||||
#include "AM232X.h"
|
||||
|
@ -3,7 +3,7 @@
|
||||
// FILE: AM232X.h
|
||||
// AUTHOR: Rob Tillaart
|
||||
// PURPOSE: AM232X library for Arduino
|
||||
// VERSION: 0.3.3
|
||||
// VERSION: 0.3.4
|
||||
// HISTORY: See AM232X.cpp
|
||||
// URL: https://github.com/RobTillaart/AM232X
|
||||
//
|
||||
@ -21,7 +21,7 @@
|
||||
#include "Wire.h"
|
||||
|
||||
|
||||
#define AM232X_LIB_VERSION (F("0.3.3"))
|
||||
#define AM232X_LIB_VERSION (F("0.3.4"))
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017-2021 Rob Tillaart
|
||||
Copyright (c) 2017-2022 Rob Tillaart
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -66,4 +66,5 @@ void loop()
|
||||
delay(2000);
|
||||
}
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
@ -49,4 +49,5 @@ void loop()
|
||||
delay(100);
|
||||
}
|
||||
|
||||
|
||||
// -- END OF FILE --
|
||||
|
@ -29,6 +29,7 @@ wakeUp KEYWORD2
|
||||
|
||||
# Constants (LITERAL1)
|
||||
AM232X_LIB_VERSION LITERAL1
|
||||
|
||||
AM232X_OK LITERAL1
|
||||
AM232X_ERROR_UNKNOWN LITERAL1
|
||||
AM232X_ERROR_CONNECT LITERAL1
|
||||
|
@ -15,8 +15,9 @@
|
||||
"type": "git",
|
||||
"url": "https://github.com/RobTillaart/AM232X"
|
||||
},
|
||||
"version": "0.3.3",
|
||||
"version": "0.3.4",
|
||||
"license": "MIT",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "*"
|
||||
"platforms": "*",
|
||||
"headers": "AM232X.h"
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
name=AM232X
|
||||
version=0.3.3
|
||||
version=0.3.4
|
||||
author=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
|
||||
sentence=Arduino library for AM2320 AM2321 and AM2323 I2C temperature and humidity sensor.
|
||||
|
@ -35,6 +35,24 @@ unittest_teardown()
|
||||
}
|
||||
|
||||
|
||||
unittest(test_constants)
|
||||
{
|
||||
fprintf(stderr, "AM232X_LIB_VERSION: %s\n", (char *) AM232X_LIB_VERSION);
|
||||
|
||||
assertEqual( 0, AM232X_OK );
|
||||
assertEqual(-10, AM232X_ERROR_UNKNOWN );
|
||||
assertEqual(-11, AM232X_ERROR_CONNECT );
|
||||
assertEqual(-12, AM232X_ERROR_FUNCTION );
|
||||
assertEqual(-13, AM232X_ERROR_ADDRESS );
|
||||
assertEqual(-14, AM232X_ERROR_REGISTER );
|
||||
assertEqual(-15, AM232X_ERROR_CRC_1 );
|
||||
assertEqual(-16, AM232X_ERROR_CRC_2 );
|
||||
assertEqual(-17, AM232X_ERROR_WRITE_DISABLED);
|
||||
assertEqual(-18, AM232X_ERROR_WRITE_COUNT );
|
||||
assertEqual(-19, AM232X_MISSING_BYTES );
|
||||
}
|
||||
|
||||
|
||||
unittest(test_demo)
|
||||
{
|
||||
AM232X AM;
|
||||
|
Loading…
x
Reference in New Issue
Block a user