0.3.4 AM232X

This commit is contained in:
rob tillaart 2021-12-11 19:15:19 +01:00
parent 73ca1cccbb
commit 35bb1d4668
9 changed files with 30 additions and 7 deletions

View File

@ -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"

View File

@ -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"))

View File

@ -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

View File

@ -66,4 +66,5 @@ void loop()
delay(2000);
}
// -- END OF FILE --

View File

@ -49,4 +49,5 @@ void loop()
delay(100);
}
// -- END OF FILE --

View File

@ -29,6 +29,7 @@ wakeUp KEYWORD2
# Constants (LITERAL1)
AM232X_LIB_VERSION LITERAL1
AM232X_OK LITERAL1
AM232X_ERROR_UNKNOWN LITERAL1
AM232X_ERROR_CONNECT LITERAL1

View File

@ -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"
}

View File

@ -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.

View File

@ -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;