PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Social
libbadgetools
peb_ee_readInt.c
1
/*
2
ee_readInt.c
3
4
Copyright (c) 2015 Parallax Inc., all rights MIT licensed,
5
see end of file.
6
*/
7
8
#include "
simpletools.h
"
9
#include "
badgetools.h
"
10
11
volatile
int
eei2cLock;
12
13
int
ee_readInt
(
int
addr)
14
{
15
while
(
lockset
(eei2cLock));
16
int
value =
ee_getInt
(addr);
17
lockclr
(eei2cLock);
18
return
value;
19
}
20
21
/*
22
TERMS OF USE: MIT License
23
24
Permission is hereby granted, free of charge, to any person obtaining a
25
copy of this software and associated documentation files (the "Software"),
26
to deal in the Software without restriction, including without limitation
27
the rights to use, copy, modify, merge, publish, distribute, sublicense,
28
and/or sell copies of the Software, and to permit persons to whom the
29
Software is furnished to do so, subject to the following conditions:
30
31
The above copyright notice and this permission notice shall be included in
32
all copies or substantial portions of the Software.
33
34
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
37
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
40
DEALINGS IN THE SOFTWARE.
41
*/
42
ee_getInt
int ee_getInt(int addr)
Get an int value from a certain address in the Propeller Chip's dedicated EEPROM. If you are fetching...
Definition:
eeprom_getInt.c:24
ee_readInt
int ee_readInt(int addr)
Get an int value from a certain address in the Propeller Chip's dedicated EEPROM. If you are fetching...
Definition:
peb_ee_readInt.c:13
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
lockset
#define lockset(lockid)
Set a lock.
Definition:
propeller.h:163
lockclr
#define lockclr(lockid)
Clear lock.
Definition:
propeller.h:170
badgetools.h
This library provides convenient functions for a variety of Parallax eBadge operations.
Generated on Fri May 20 2022 16:48:05 for PropWare by
1.8.17