PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
Simple-Libraries
Learn
Simple Libraries
Social
libbadgetools
peb_ee_writeShort.c
1
/*
2
ee_writeShort.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
void
ee_writeShort
(
short
value,
int
addr)
14
{
15
while
(
lockset
(eei2cLock));
16
unsigned
char
val[2] = {(
char
) value, (
char
) (value >> 8)};
17
ee_putStr
(val, 2, addr);
18
lockclr
(eei2cLock);
19
return
;
20
}
21
22
/*
23
TERMS OF USE: MIT License
24
25
Permission is hereby granted, free of charge, to any person obtaining a
26
copy of this software and associated documentation files (the "Software"),
27
to deal in the Software without restriction, including without limitation
28
the rights to use, copy, modify, merge, publish, distribute, sublicense,
29
and/or sell copies of the Software, and to permit persons to whom the
30
Software is furnished to do so, subject to the following conditions:
31
32
The above copyright notice and this permission notice shall be included in
33
all copies or substantial portions of the Software.
34
35
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
36
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
37
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
38
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
39
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
40
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
41
DEALINGS IN THE SOFTWARE.
42
*/
43
ee_writeShort
void ee_writeShort(short value, int addr)
Store a short value at a certain address in the Propeller Chip's dedicated EEPROM....
Definition:
peb_ee_writeShort.c:13
simpletools.h
This library provides convenient functions for a variety of microcontroller I/O, timing,...
ee_putStr
void ee_putStr(unsigned char *s, int n, int addr)
Store a string of byte values starting at a certain address in the Propeller Chip's dedicated EEPROM.
Definition:
eeprom_putStr.c:25
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.
char
Generated on Fri May 20 2022 16:48:05 for PropWare by
1.8.17