Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: ad5933.cpp
- Revision:
- 2:93dd1ebfedea
- Parent:
- 0:6a71184e6f66
- Child:
- 3:b844dd14179c
--- a/ad5933.cpp Mon May 11 13:25:03 2015 +0000
+++ b/ad5933.cpp Mon May 11 13:27:26 2015 +0000
@@ -1,3 +1,19 @@
+/* ---------------------------------------------------------------------------------
+Copyright 2015 Marijn Billiet
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ --------------------------------------------------------------------------------- */
+
#include "ad5933.h"
#include "mbed.h"
@@ -181,14 +197,14 @@
int i = 0;
uint8_t data[4];
bool output;
-
+
while((getRegister(0x8F) != 0x02) && i < 10) {
wait_ms(5);
i++;
}
if(i == 10)
return false;
-
+
output = gotoAdressPointer(0x82);
output &= readBlock(data, 4);
real = data[0] | data[1] << 8;