PropWare
C++ objects and CMake build system for Parallax Propeller
Home
Download
Getting Started
Documentation
Reference
About
Related Links
Namespace List
Class List
File List
Examples
Build System
File List
File Members
propsideworkspace
Learn
Simple Libraries
Utility
libsimpletools
source
eeprom_getStr.c
1
/*
2
* @file eeprom.c
3
*
4
* @author Andy Lindsay
5
*
6
* @version 0.87
7
*
8
* @copyright Copyright (C) Parallax, Inc. 2013. See end of file for
9
* terms of use (MIT License).
10
*
11
* @brief eeprom functions source, see simpletools.h for documentation.
12
*
13
* @detail Please submit bug reports, suggestions, and improvements to
14
* this code to editor@parallax.com.
15
*/
16
17
#include "simpletools.h"
// simpletools function prototypes
18
19
i2c
*st_eeprom;
20
int
st_eeInitFlag;
21
22
void
ee_init();
23
24
unsigned
char
* ee_get_str(
unsigned
char
*s,
int
n,
int
addr)
25
{
26
if
(!st_eeInitFlag) ee_init();
27
// const unsigned char addrArray[] = {(char)(addr >> 8), (char)(addr&0xFF)};
28
// i2c_in(st_eeprom, 0xA0, addrArray, 2, s, n);
29
i2c_in(st_eeprom, 0x50, addr, 2, s, n);
30
return
s;
31
}
32
i2c_st
Definition:
simplei2c.h:25
Generated on Sat Aug 27 2016 00:58:09 for PropWare by
1.8.12